Get Shipments
GET REST API request that returns a list of shipments linked to a supplier. The response example is shown below.
The parameter shipmentId
will try to find an shipment by shipmentId and return it in the response list. This parameter is optional.
The parameter orderId
will try to find an shipment by orderId and return it in the response list. There can be multiple shipments per orderId depending on how the packing was done. This parameter is optional.
The parameters createdDateFrom
and createdDateTo
will filter shipments by the date the shipment was created. The dates are in in yyyy-MM-dd'T'HH:mm:ss.SSSXXX format (e.g., 2024-11-15T00:00:00). Both parameters are optional. Filter createdDateTo
can not be after createdDateFrom
.
The parameter statuses
will filter shipments by shipment statuses. Multiple statuses can be specified, separated by comma.Only statuses from the same group can be specified (if multiple are specified in the filter):
- PENDING, PARTIALLY_CONFIRMED, CONFIRMED
- PARTIALLY_PACKED, PACKED, TRANSPORT_INITIATED, ON_DELIVERY
- DELIVERED, CANCELLED, NOT_DELIVERED
- FAILED_DELIVERY
The parameter warehouseId
will filter shipments by id of warehouse. The ids of supplier warehouse addresses can be fetched using aforementioned "get addresses" endpoint. This parameter is optional.
The other two parameters are page
and size
, which are used for pagination. If not passed, by default, only 10 shipments will be listed. However, by setting the size to higher values, the list can be increased. The maximum number of shipments per page is 500.
Request
HTTP Method | GET | |||||||||||||||||||
URL | Stage | https://api.stage.ananastest.com/ws-inventory/api/v1/supplier-integration/shipments | ||||||||||||||||||
Production | https://api.ananas.rs/ws-inventory/api/v1/supplier-integration/shipments | |||||||||||||||||||
HTTP Headers |
| |||||||||||||||||||
URL Parameters |
|
Response
There is one scenario where the endpoint will return a status of 4xx:
- If multiple statuses, that belong to different group of statuses, are specified in the filter - 400
Response is a collection of shipment details.
The API method defaults sorting by created date of shipment in descending order.
Field Name | Type | Description |
content | List<ShipmentDetails> | List of shipments with details |
pageable | Pageable | Details of pagination |
totalPages | int | Number of total pages |
totalElements | long | Total amount of elements |
last | boolean | Indicates if it's the last page |
size | Integer | Size |
number | int | Number of items on that page |
sort | Sort | Details about sorting |
numberOfElements | long | Number of elements |
first | boolean | First |
empty | boolean | Empty |
Pageable
Field Name | Type | Description |
sort | Sort | Details about sorting |
offset | Long | Offset |
pageSize | int | Page size |
pageNumber | int | Page number |
paged | boolean | Paged |
unpaged | boolean | Unpaged |
Sort:
Field Name | Type | Description |
empty | boolean | Empty |
unsorted | boolean | Unsorted |
sorted | boolean | Sorted |
ShipmentDetails
Field Name | Type | Description |
shipmentId | String | Unique shipment identifier |
orderId | String | Unique order identifier |
createdDate | LocalDateTime | Date and time of creation in UTC |
status | String | Shipment status |
weight | BigDecimal | Total weight of items in shipment |
numberOfBoxes | Integer | Number of boxes that shipment will be packed in |
totalPrice | BigDecimal | Total purchase price of a shipment |
confirmedQuantity | BigDecimal | Total confirmed quantity of items in shipment |
packedQuantity | BigDecimal | Total packed quantity of items in shipment |
warehouseId | Integer | Id of warehouse from which shipment is shipped |
warehouseName | String | Name of warehouse from which shipment is shipped |
carrierName | String | Name of carrier responsible for shipping |
deliveryPromiseFrom | LocalDate | Earliest date that shipment will be shipped to customer in UTC |
deliveryPromiseTo | LocalDate | Latest date that shipment will be shipped to customer in UTC |
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 | Represents price that product was purchased from supplier |
totalPrice | BigDecimal | Total purchase price of an item |
Example of response:
JSON:
{
"content": [
{
"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
}
]
}
],
"pageable": {
"sort": [
{
"direction": "DESC",
"property": "id",
"ignoreCase": false,
"nullHandling": "NATIVE",
"ascending": false,
"descending": true
}
],
"offset": 0,
"pageNumber": 0,
"pageSize": 10,
"unpaged": false,
"paged": true
},
"totalPages": 1,
"totalElements": 1,
"last": true,
"size": 10,
"number": 0,
"sort": [
{
"direction": "DESC",
"property": "id",
"ignoreCase": false,
"nullHandling": "NATIVE",
"ascending": false,
"descending": true
}
],
"numberOfElements": 1,
"first": true,
"empty": false
}