Ongoing Warehouse logo
Ongoing Warehouse Developer

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
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/Automation/GetShipmentsByQuery"

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <GetShipmentsByQuery xmlns="http://ongoingsystems.se/Automation">
         <UserName>string</UserName>
         <Password>string</Password>
         <Query>
            <ShipmentStatusFrom>int</ShipmentStatusFrom>
            <ShipmentStatusTo>int</ShipmentStatusTo>
            <GetOrders>boolean</GetOrders>
            <ShipmentIdsToGet>
               <int>int</int>
               <int>int</int>
            </ShipmentIdsToGet>
            <CustomsStatus>All or NoStatus or PendingForApproval or Approved</CustomsStatus>
         </Query>
      </GetShipmentsByQuery>
   </soap:Body>
</soap:Envelope>
+

Request specification

GetShipmentsByQuery
UserName str(50) Req. Your username
Password str(50) Req. Your password
query object Req. Specifies the query/search criteria
query
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

Response

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