Reservation
Create reservation
Set cookie: session_id value what we got from authenticate
POST /api/v1/stock/create-products-stock-context
Headers:
{ "Content-Type": "application/json", "Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"}Request Body:
{ "partner_uid": "AABBCCDD", "first_name": "John", "last_name": "Doe"}Response:
Get from response context_uid and partner_id
Add products to reservation
Set cookie: session_id value what we got from authenticate
POST /api/v1/stock/update-products-stock-context
Headers:
{ "Content-Type": "application/json", "Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"}Request Body:
{ "context_uid": "WH/OUT/00020", "products": [ { "product_id": 13, "qty": 2 }, { "product_id": 27, "qty": 1 } ]}Response:
Get Stock Information
Set cookie: session_id value what we got from authenticate
POST /api/v1/models/stock_quant
Headers:
{ "Content-Type": "application/json", "Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"}Request Body:
{ "fields": [ "id", { "name": "location_id", "fields": ["id", "name"] }, { "name": "product_id", "fields": ["id", "name"] }, "quantity" ], "offset": 0, "limit": 2}Response:
[ { "id": 174, "location_id": [ { "id": 8, "name": "Stock" } ], "product_id": [ { "id": 4, "name": "Mini-Pizza Salami", "translation": { "de_DE": { "name": "Mini-Pizza Salami" } } } ], "quantity": -1 }, { "id": 176, "location_id": [ { "id": 8, "name": "Stock" } ], "product_id": [ { "id": 8, "name": "Grilled Sandwich Tonno", "translation": { "de_DE": { "name": "Grilled Sandwich Tonno" } } } ], "quantity": -1 }]