path: /banana
method: post
payload:
{
'user_id':899
'lot' : {
'name' : 'Red Dacca',
'locality': 'Costa Rica',
'harvested_at': 'July 27, 2018',
'weight': 1500,
}
}
response
code: 201 CREATED
message: banana lot created 1881
path: /banana
method: post
payload:
{
'user_id':899
'lot' : {
'name' : 'Red Dacca',
'locality': 'Costa Rica',
'harvested_at': 'July 27, 2018',
'weight': 500,
}
}
response
code: 400
message: Minimum weight allowed is 1000kg
path: /banana/1881
method: PATCH
payload:
{
'user_id':899
'harvested_at': 'June 14, 2018',
}
response
code: 200 OK
message: Banana lot 1881 updated its harvested_at date
path: /auction
method: POST
payload:
{
'user_id':899
'lot_id': 1881,
'start_at': 'September 04, 2018 00:00:00',
'end_at': 'September 04, 2018 23:59:00',
'rate': 1.20
'currency': 'USD'
}
response
code : 201 CREATED
message: auction item created with id 2222
path: /auction/2222/bid
method: POST
payload:
{
'user_id': 72,
'rate': 1.21,
'currency: USD,
}
response
code : 201 CREATED
message: bid created for autcion item 2222 with bid_id 5555
path: /auction/2222/bid
method: GET payload:
{}
response
code : 200 OK message:
5555 : {
'rate': 1.21,
'currency': 'USD',
'bidder_id': 72,
}
}
path: /banana/1881
method: DELETE
payload:
{
'user_id': 899
}
response
code: 202 MARKED FOR DELETION
message: banana lot 1881 deleted