Confirm Order quantities
POST REST API request for suppliers, requiring a JSON body and an authorization token, to confirm quantities for each item of an order. For each item, it is necessary to pass the warehouseAddressId.
Request
HTTP Method | POST | |||||
URL | Stage | https://api.stage.ananastest.com/ws-inventory/api/v1/supplier-integration/order/{orderId}/confirmation | ||||
Production | https://api.ananas.rs/ws-inventory/api/v1/supplier-integration/order/{orderId}/confirmation | |||||
HTTP Headers |
|
Request Body:
Fields name | Type | Description |
products | List<OrderItemConfirmationDetails> | List of products with confirmation details |
OrderItemConfirmationDetails
Fields name | Type | Description |
id | Long | Product id |
warehouseQuantities | List<WarehouseQuantityDetails> | List of warehouse quantity details |
WarehouseQuantityDetails
Fields name | Type | Description |
warehouseId | Integer | Warehouse address id |
quantity | Integer | Quantity (min 0) |
Example of the request:
{
"products": [
{
"id": 197208,
"warehouseQuantities": [
{
"warehouseId": 4755,
"quantity": 2
}
]
}
]
}
Response
There are several scenarios where the endpoint will return a status of 4xx:
- If order does not exist, or if it does not belong to the supplier - 404
- If order is already cancelled, confirmed or partially confirmed - 400
- If wrong product is specified in the list of order items - 400
- If wrong warehouse (does not belong to the supplier) is specified in the list of warehouse quantities for an item - 400
- If confirmed quantity of an item is greater than ordered quantity - 400
User can specify all quantities of items to be 0, in which case the order will be CANCELLED. If order was confirmed, the response will be newly created Shipment. If order was cancelled, response will be in format of a Shipment, except all values but orderId and status will be non null.
Response Body:
Field Name | Type | Description |
shipmentId | String | Unique shipment identifier |
orderId | String | Unique order identifier |
createdDate | LocalDateTime | Created date of shipment in UTC |
status | String | Shipment status. Possible values:
|
weight | BigDecimal | Total weight of order items |
numberOfBoxes | Integer | Number of boxes in which order will be packed |
totalPrice | BigDecimal | Total purchase price of an order |
confirmedQuantity | BigDecimal | Total confirmed quantity of items of an order |
packedQuantity | BigDecimal | Total packed quantity of items of an order |
warehouseId | Integer | Warehouse id |
warehouseName | String | Warehouse name |
carrierName | String | Name of carrier |
deliveryPromiseFrom | LocalDate | Earliest date for shipment to be delivered |
deliveryPromiseTo | LocalDate | Latest date for shipment to be delivered |
items | List<ItemDetails> | List of items |
ItemDetails
Field Name | Type | Description |
productId | Long | Unique item identifier - id of product |
productEan | String | European Article Number |
productSku | String | Stock Keeping Unit of product |
productName | String | Product name |
orderedQuantity | Integer | Ordered quantity of an item |
confirmedQuantity | Integer | Confirmed quantity of an item |
packedQuantity | Integer | Packed quantity of an item |
unitPrice | BigDecimal | Purchase price of an item unit - Represents price that product was purchased from supplier |
totalPrice | BigDecimal | Total purchase price of an item |
Example of response:
JSON:
{
"shipmentId": "A28DD-FEUGN-DS-1",
"orderId": "A28DD-FEUGN",
"createdDate": "2024-11-19T11:34:36.734848",
"status": "DELIVERED",
"weight": 6.00,
"numberOfBoxes": 2,
"totalPrice": 3000.00,
"confirmedQuantity": 6,
"packedQuantity": 6,
"warehouseId": 4755,
"warehouseName": "AVTERA SR DOO BEOGRAD Avtera Primary Pickup",
"carrierName": "Gebruder Weiss",
"deliveryPromiseFrom": "2024-11-25",
"deliveryPromiseTo": "2024-11-28",
"items": [
{
"productId": 197208,
"productEan": "8801643206772",
"productSku": "Azxxcn415",
"productName": "SAMSUNG Usisivač VCC4320S3A/BOL",
"orderedQuantity": 6,
"confirmedQuantity": 6,
"packedQuantity": 6,
"unitPrice": 500.00,
"totalPrice": 3000.00
}
]
}