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 createdDateTowill 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
This parameter is optional.

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 MethodGET
URLStagehttps://api.stage.ananastest.com/ws-inventory/api/v1/supplier-integration/shipments
Productionhttps://api.ananas.rs/ws-inventory/api/v1/supplier-integration/shipments
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}
URL Parameters
Parameter nameParameter description
shipmentIdFind shipment by shipmentId and return it in the response list
orderIdFind shipments by orderId and return it in the response list
createdDateFromShipment created date from filter in yyyy-MM-dd'T'HH:mm:ss.SSSXXX format (e.g., 2024-11-15T00:00:00Z)
createdDateToShipment created date to filter in yyyy-MM-dd'T'HH:mm:ss.SSSXXX format (e.g., 2024-11-16T00:00:00Z)
statusesFilter shipments by shipment statuses (PENDING, PARTIALLY_CONFIRMED, CONFIRMED, PARTIALLY_PACKED, PACKED, TRANSPORT_INITIATED, ON_DELIVERY, DELIVERED, CANCELLED, NOT_DELIVERED, FAILED_DELIVERY). Multiple can be specified, separated by comma.
warehouseIdFind shipments by warehouseId from which they will be shipped
pagePagination - page number
sizePagination - number of shipments per page (max 500)

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 NameTypeDescription
contentList<ShipmentDetails>List of shipments with details
pageablePageableDetails of pagination
totalPagesintNumber of total pages
totalElementslongTotal amount of elements
lastbooleanIndicates if it's the last page
sizeIntegerSize
numberintNumber of items on that page
sortSortDetails about sorting
numberOfElementslongNumber of elements
firstbooleanFirst
emptybooleanEmpty

Pageable

Field NameTypeDescription
sortSortDetails about sorting
offsetLongOffset
pageSizeintPage size
pageNumberintPage number
pagedbooleanPaged
unpagedbooleanUnpaged

Sort:

Field NameTypeDescription
emptybooleanEmpty
unsortedbooleanUnsorted
sortedbooleanSorted

ShipmentDetails

Field NameTypeDescription
shipmentIdStringUnique shipment identifier
orderIdStringUnique order identifier
createdDateLocalDateTimeDate and time of creation in UTC
statusStringShipment status
weightBigDecimalTotal weight of items in shipment
numberOfBoxesIntegerNumber of boxes that shipment will be packed in
totalPriceBigDecimalTotal purchase price of a shipment
confirmedQuantityBigDecimalTotal confirmed quantity of items in shipment
packedQuantityBigDecimalTotal packed quantity of items in shipment
warehouseIdIntegerId of warehouse from which shipment is shipped
warehouseNameStringName of warehouse from which shipment is shipped
carrierNameStringName of carrier responsible for shipping
deliveryPromiseFromLocalDateEarliest date that shipment will be shipped to customer in UTC
deliveryPromiseToLocalDateLatest date that shipment will be shipped to customer in UTC
itemsList<ItemDetails>List of items

ItemDetails

Field NameTypeDescription
productIdLongUnique item identifier - id of product
productEanStringEuropean Article Number
productSkuStringStock Keeping Unit of product
productNameStringProduct name
orderedQuantityIntegerOrdered quantity of an item
confirmedQuantityIntegerConfirmed quantity of an item
packedQuantityIntegerPacked quantity of an item
unitPriceBigDecimalRepresents price that product was purchased from supplier
totalPriceBigDecimalTotal purchase price of an item

Example of response:

JSON:

Click to copy
Success!
{
    "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
}
Copyright © Ananas 2023. All right reserved.