Fetch shipments and shipment data
GET REST API request for merchants, that returns shipments and shipments data.
- At least one of the parameters
searchorstatusGroupmust be provided. If neither is present, the request will result in a4xxclient error. - Parameter
searchwill find shipment by shipment id or multiple shipments if order id is used as a search parameter. - Results are sorted by purchase date descending by default (
purchaseDateDESC). - When both
statusGroupandstatusesare provided:- The backend computes the intersection between:
- the statuses implied by
statusGroup(itssubgroupStatuses), and - the explicit
statusesprovided in the request.
- the statuses implied by
- If none of the requested
statusesbelong to the selectedstatusGroup(i.e. the intersection is empty), the endpoint returns anempty page (content: [],totalElements: 0) with HTTP200 OK.
- The backend computes the intersection between:
Parameter statusGroup will filter orders per order status group.
Three values for this parameter are SG_FOR_PACKAGING, SG_SHIPMENT_ON_DELIVERY and SG_COMPLETED.
Each of these status groups is internally expanded into corresponding subgroupStatuses used for filtering:
- SG_FOR_PACKAGING →
SSG_PARTIALLY_CONFIRMED,SSG_PENDING,SSG_CONFIRMED - SG_SHIPMENT_ON_DELIVERY →
SSG_PARTIALLY_PACKED,SSG_TRANSPORT_INITIATED,SSG_PACKED,SSG_ON_DELIVERY - SG_COMPLETED →
SSG_DELIVERED,SSG_CANCELLED,SSG_NOT_DELIVERED
- If only
statusGroupis provided (nostatuses), results are filtered by all subgroup statuses mapped from that group. - If both
statusGroupandstatusesare provided, results are filtered by the intersection of:subgroupStatuses(statusGroup)andstatusesfrom the request.
The other 2 parameters are page and size are used for pagination. The default value for page size is 10. The default value for page number is 0. The maximum allowed page size is 100. If page size specified in the request is bigger than 100, the default page size of 100 will be used.
Request
| HTTP Method | GET | |||||||||||||||||||||||||
| URL | Stage | https://api.qa2.ananastest.com/order/api/v1/merchant-integration/outbound-orders/shipments | ||||||||||||||||||||||||
| Production | https://api.ananas.rs/order/api/v1/merchant-integration/outbound-orders/shipments | |||||||||||||||||||||||||
| HTTP Headers |
| |||||||||||||||||||||||||
| URL Parameters |
|
Examples:
https://api.qa2.ananastest.com/order/api/v1/merchant-integration/outbound-orders/shipments?search=TV4YK-OLZRU-DS-1
https://api.qa2.ananastest.com/order/api/v1/merchant-integration/outbound-orders/shipments?statusGroup=SG_FOR_PACKAGING
Response
Response is a collection of shipment details
JSON
{
"content": [
{
"orderId": "H7SRK-Z2IAO",
"suborderId": "H7SRK-Z2IAO-DS-1",
"status": "READY_FOR_COLLECTION",
"statusSubgroup": "SSG_TRANSPORT_INITIATED",
"totalPrice": 5000.00,
"packedQuantity": 1,
"confirmedQuantity": 1,
"warehouseName": "CEZAR PLUS d.o.o. CEZAR Skladište",
"warehouseId": 2096,
"carrierName": "City Express",
"type": "Standard",
"createdDate": "2023-11-07T00:10:32.779083Z",
"items": [
{
"packedQuantity": 1,
"confirmedQuantity": 1,
"merchantInventoryId": 1777104,
"unitPrice": 5000.00,
"totalPrice": 5000.00,
"orderedQuantity": 1,
"productName": "Slušalice05",
"productEan": "8606108800409",
"productSku": "Slušalice05",
"productSpecifications": "{\"attributes\": []}"
}
]
},
{
"orderId": "XLOGV-0RTNL",
"suborderId": "XLOGV-0RTNL-DS-1",
"status": "READY_FOR_COLLECTION",
"statusSubgroup": "SSG_TRANSPORT_INITIATED",
"totalPrice": 20000.00,
"packedQuantity": 2,
"confirmedQuantity": 2,
"warehouseName": "Test3335 WH1",
"warehouseId": 1853,
"carrierName": "City Express",
"type": "Standard",
"createdDate": "2023-11-01T14:47:41.616218Z",
"items": [
{
"packedQuantity": 2,
"confirmedQuantity": 2,
"merchantInventoryId": 1777105,
"unitPrice": 10000.00,
"totalPrice": 20000.00,
"orderedQuantity": 2,
"productName": "Slušalice10",
"productEan": "6995019102118",
"productSku": "Slušalice10",
"productSpecifications": "{\"attributes\": []}"
}
]
}
],
"pageable": {
"sort": {
"empty": false,
"unsorted": false,
"sorted": true
},
"offset": 0,
"pageNumber": 0,
"pageSize": 100,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 1,
"totalElements": 2,
"first": true,
"size": 100,
"number": 0,
"sort": {
"empty": false,
"unsorted": false,
"sorted": true
},
"numberOfElements": 2,
"empty": false
}