18 lines
454 B
HTTP
18 lines
454 B
HTTP
|
|
### List Books with their current stocks
|
|
GET http://localhost:4004/admin/Books?$select=ID,stock
|
|
|
|
### List all Orders
|
|
GET http://localhost:4004/admin/Orders?
|
|
&$expand=Items
|
|
|
|
### Submit Orders
|
|
POST http://localhost:4004/browse/Orders
|
|
Content-Type: application/json
|
|
|
|
{ "OrderNo":"2019-09...", "Items":[
|
|
{ "book_ID":201, "amount":5 },
|
|
{ "book_ID":207, "amount":3 }
|
|
]}
|
|
|
|
# Sending this three times should result in a 409: 5 exceeds stock for book #201 |