Fetch shipments and shipment data

GET REST API request for merchants, that returns shipments and shipments data.

  • At least one of the parameters search or statusGroup must be provided. If neither is present, the request will result in a 4xx client error.
  • Parameter search will 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 (purchaseDate DESC).
  • When both statusGroup and statuses are provided:
    • The backend computes the intersection between:
      • the statuses implied by statusGroup (its subgroupStatuses), and
      • the explicit statuses provided in the request.
    • If none of the requested statuses belong to the selectedstatusGroup (i.e. the intersection is empty), the endpoint returns anempty page (content: [], totalElements: 0) with HTTP200 OK.

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_PACKAGINGSSG_PARTIALLY_CONFIRMED, SSG_PENDING, SSG_CONFIRMED
  • SG_SHIPMENT_ON_DELIVERYSSG_PARTIALLY_PACKED, SSG_TRANSPORT_INITIATED, SSG_PACKED, SSG_ON_DELIVERY
  • SG_COMPLETEDSSG_DELIVERED, SSG_CANCELLED, SSG_NOT_DELIVERED

  • If only statusGroup is provided (no statuses), results are filtered by all subgroup statuses mapped from that group.
  • If both statusGroup and statuses are provided, results are filtered by the intersection of:
    • subgroupStatuses(statusGroup) and
    • statuses from the request.
    If the intersection is empty, an empty page is returned.

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 MethodGET
URLStagehttps://api.qa2.ananastest.com/order/api/v1/merchant-integration/outbound-orders/shipments
Productionhttps://api.ananas.rs/order/api/v1/merchant-integration/outbound-orders/shipments
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}
URL Parameters
Parameter nameParameter description
searchRefers to the id of an order or shipment
statusGroupStatus group of an order. Can have three values: SG_FOR_PACKAGING, SG_SHIPMENT_ON_DELIVERY, and SG_COMPLETED
warehouseIdsReferes to unique merchant address identifiers
statusesInternal suborder statuses used for filtering. Valid values:CREATED,PENDING,CANCELLED,CONFIRMED,PARTIALLY_PACKED,PARTIALLY_PACKED_IN_TRANSIT,PARTIALLY_PACKED_ON_THE_BORDER,PACKED,PACKED_IN_TRANSIT,PACKED_ON_THE_BORDER,READY_FOR_COLLECTION,COLLECTED,RETURN_TO_SELLER,DELIVERED . When combined with statusGroup, only statuses belonging to that group are considered; if none match, an empty page is returned.
paymentMethodsPayment methods used to filter shipments (for example PBC, COD). Multiple values are allowed.
carriersCarrier identifiers (code/name) used to filter shipments. Multiple values are allowed.
confirmedFromLower bound for confirmed date/time (ISO 8601). Returns shipments confirmed on or after this value.
confirmedToUpper bound for confirmed date/time (ISO 8601). Returns shipments confirmed on or before this value.
suborderTypesSuborder types (for example DS) used to filter shipments. Multiple values are allowed.
pagePage number
sizeNumber of orders shown by page

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

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