GetShipmentsByQuery (automation API)

This function retrieves all shipments which fulfill certain search criteria. Shipments are a way of organizing outgoing and inbound deliveries.

Note that the goods owner SOAP API contains a function with the exact same name. So we have:

  1. GetShipmentsByQuery in the goods owner SOAP API.
  2. GetShipmentsByQuery in the automation API (the function described on this page).
These two functions are very similar, indeed they return the same type of object. The difference lies in the fact that the GetShipmentsByQuery function in the automation API does not have as many ways to query for shipments, and it also gives you access to shipments from all goods owners in the system.

Tags: GetShipmentsByQuery, query

Request XML

POST /xxx/automation.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: ""

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
      <GetShipmentsByQuery xmlns="">
            <CustomsStatus>All or NoStatus or PendingForApproval or Approved</CustomsStatus>

Request specification

UserName str(50) Req. Your username
Password str(50) Req. Your password
query object Req. Specifies the query/search criteria
ShipmentStatusFrom int Shipment status, from
ShipmentStatusTo int Shipment status, to
GetOrders bool If true, then the response will also contain information about each order which the the shipment contains
ShipmentIdsToGet object The shipment ids which you want to retrieve
int int[] Shipment ids to get
CustomsStatus enum Filter by customs status:
 - All
 - NoStatus
 - PendingForApproval
 - Approved


For the response specification, please see the documentation for the GetShipmentsByQuery function in the goods owner SOAP API. The response will contain a list of objects which each have the same type as the Shipment object from GetShipmentsByQuery.