Pack shipment
POST REST API request for suppliers, requiring a JSON body and an authorization token, in order to confirm packing is completed and that a shipment should be created.
Request
HTTP Method | POST |
URL | Stage | https://api.stage.ananastest.com/order/api/v1/supplier-integration/shipment/{shipmentId}/pack |
Production | https://api.ananas.rs/order/api/v1/supplier-integration/shipment/{shipmentId}/pack |
HTTP Headers | | Header name | Header value | Authorization | Bearer {access_token} |
|
Request Body:
Fields name | Type | Description |
numberOfBoxes | Integer | Number of boxes (min 0) |
products | List<ShipmentItemPackingDetails> | List of products with packing details |
ShipmentItemPackingDetails
Fields name | Type | Description |
id | Long | Product id |
quantity | Integer | Quantity (min 0) |
Example of the request:
{
"numberOfBoxes": 2,
"products": [
{
"id": 197208,
"quantity": 2
},
{
"id": 196253,
"quantity": 1
}
]
}
Error Response
There are several scenarios where the endpoint will return a status of 4xx:
- If shipment does not exist, or if it does not belong to the supplier - 404
- If shipment is already processed it cannot be packed - 400
- If not all products of orders are specified for packing (if product of order is missing for packing) - 400
- If packed quantity of an item is greater than ordered or confirmed quantity - 400
Success Response
The endpoint will return status 204 - No Content.