POST /api/lots
Request Payload: { "seller": "Delicious Apples LTD", "cultivar": "Red Dacca", "origin_country": "Costa Rica", "harvest_date": "2018-07-27", "weight": 500 }
Response Payload: { "id": "12345", "seller": "Delicious Apples LTD", "cultivar": "Red Dacca", "origin_country": "Costa Rica", "harvest_date": "2018-07-27", "weight": 500, "auction_status": "Not started" }
Response Status Code:
201 Created
PATCH /api/lots/12345
Request Payload: { "harvest_date": "2018-06-14" }
Response Payload: { "id": "12345", "seller": "Delicious Apples LTD", "cultivar": "Red Dacca", "origin_country": "Costa Rica", "harvest_date": "2018-06-14", "weight": 500, "auction_status": "Not started" }
Response Status Code: 200 OK
POST /api/lots/validate
Request Payload: { "seller": "Delicious Apples LTD", "cultivar": "Red Dacca", "origin_country": "Costa Rica", "harvest_date": "2018-07-27", "weight": 500 }
Response Payload: { "error": "Minimum lot weight allowed is 1000kg" }
Response Status Code: 400 Bad Request