Ongoing Warehouse logo
Ongoing Warehouse Developer

GetOrdersByQuery (automation API)

This function allows you to query for information about specific orders.

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

  1. GetOrdersByQuery in the goods owner SOAP API.
  2. GetOrdersByQuery 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 GetOrdersByQuery function in the automation API does not have as many ways to query for orders, and it also gives you access to orders from all goods owners in the system.

Tags: GetOrdersByQuery

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/GetOrdersByQuery"

<?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>
    <GetOrdersByQuery xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Query>
         <OrderIds>
            <int>int</int>
            <int>int</int>
         </OrderIds>
         <LastPickingTimeFrom>dateTime</LastPickingTimeFrom>
         <LastPickingTimeTo>dateTime</LastPickingTimeTo>
         <LastReturnTimeFrom>dateTime</LastReturnTimeFrom>
         <LastReturnTimeTo>dateTime</LastReturnTimeTo>
         <OrderStatusFrom>int</OrderStatusFrom>
         <OrderStatusTo>int</OrderStatusTo>
         <OrderStatusChangedTimeFrom>dateTime</OrderStatusChangedTimeFrom>
         <MaxOrdersToGet>int</MaxOrdersToGet>
         <OrderIdFrom>int</OrderIdFrom>
         <CreatedTimeFrom>dateTime</CreatedTimeFrom>
         <CreatedTimeTo>dateTime</CreatedTimeTo>
      </Query>
    </GetOrdersByQuery>
  </soap:Body>
</soap:Envelope>
+

Request specification

GetOrdersByQuery
UserName str(50) Req. Your username.
Password str(50) Req. Your password.
OrderIds int[] A list of order ids
LastPickingTimeFrom datetime Filter for orders where goods have been picked after this time
LastPickingTimeTo datetime Filter for orders where goods have been picked before this time
LastReturnTimeFrom datetime Filter for orders where goods have been returned after this time
LastReturnTimeTo datetime Filter for orders where goods have been returned before this time
OrderStatusFrom int Filter for orders where status is equal to or above this status
OrderStatusTo int Filter for orders where status is equal to or below this status
OrderStatusChangedTimeFrom datetime Filter for orders where the order has been changed after this time. May not be set to earlier than 14 days before current date.
MaxOrdersToGet int Max number of orders to return in response
OrderIdFrom int If specified, the API will only respond with orders whose system Ids are greater than or equal to (>=) the specified id. In conjunction with MaxOrdersToGet this allows you to request orders in batches of e.g. 100, rather than having to request all orders at once.
CreatedTimeFrom datetime Filter for orders which were created after this time.
CreatedTimeTo datetime Filter for orders which were created before this time.

Response XML

For the response specification, please see the documentation for the regular GetOrder function. You will receive a list of objects which each have the same type as the Order object from GetOrder.