Ongoing Warehouse logo

Ongoing Warehouse Developer

GetOrdersByQuery

This function allows fetching multiple orders which fulfil a certain search critera. A common way to use this function is to filter for a certain status and use last updated in order to just get the latest orders.

Tags: GetOrdersByQuery, query, GetOrdersByQueryResult

Request XML

POST /xxx/service.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/WSI/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/WSI">
         <GoodsOwnerCode>string</GoodsOwnerCode>
         <UserName>string</UserName>
         <Password>string</Password>
         <query>
            <DeliveryDateFrom>dateTime</DeliveryDateFrom>
            <DeliveryDateTo>dateTime</DeliveryDateTo>
            <ShippedTimeFrom>dateTime</ShippedTimeFrom>
            <ShippedTimeTo>dateTime</ShippedTimeTo>
            <ShippedTimeToExact>dateTime</ShippedTimeToExact>
            <LastPickingTimeFrom>dateTime</LastPickingTimeFrom>
            <LastPickingTimeTo>dateTime</LastPickingTimeTo>
            <LastReturnedFrom>dateTime</LastReturnedFrom>
            <LastPrintedTimeFrom>dateTime</LastPrintedTimeFrom>
            <OrderStatusFrom>int</OrderStatusFrom>
            <OrderStatusTo>int</OrderStatusTo>
            <LastUpdatedFrom>dateTime</LastUpdatedFrom>
            <LastUpdatedTo>dateTime</LastUpdatedTo>
            <OrderNumbersToGet>
               <string>string</string>
               <string>string</string>
            </OrderNumbersToGet>
            <OrderIdsToGet>
               <int>int</int>
               <int>int</int>
            </OrderIdsToGet>
            <GoodsOwnerOrderIdToGet>
               <string>string</string>
               <string>string</string>
            </GoodsOwnerOrderIdToGet>
            <ReferenceNumber>string</ReferenceNumber>
            <PickOrderIdFrom>int</PickOrderIdFrom>
            <PickOrderIdTo>int</PickOrderIdTo>
            <OrderSpecialFilters>
               <OnlyOrdersWithOrderLinesToReport>boolean</OnlyOrdersWithOrderLinesToReport>
               <OnlyOrdersAssignedToRequestingUser>boolean</OnlyOrdersAssignedToRequestingUser>
               <OnlyOrdersWithOrderLinesToReportReturned>boolean</OnlyOrdersWithOrderLinesToReportReturned>
               <OnlyOrdersWithOrderLinesWhereAcknowledgedLessThanReturned>boolean</OnlyOrdersWithOrderLinesWhereAcknowledgedLessThanReturned>
            </OrderSpecialFilters>
            <CurrentTripId>int</CurrentTripId>
            <MaxOrdersToGet>int</MaxOrdersToGet>
            <OrderIdFrom>int</OrderIdFrom>
         </query>
      </GetOrdersByQuery>
   </soap:Body>
</soap:Envelope>
+

Request specification

GetOrdersByQuery
GoodsOwnerCode str(400) Req. The name/code of your client
UserName str(50) Req. Your username
Password str(50) Req. Your password
query object Req. Specifies the query/search criteria
query
DeliveryDateFrom datetime Delivery date from
DeliveryDateTo datetime Delivery date to
ShippedTimeFrom datetime Shipped datetime from (order marked as shipped from warehouse)
ShippedTimeToExact datetime Shipped datetime to (order marked as shipped from warehouse).
ShippedTimeTo datetime Obsolete, only left in the API for legacy reasons. Use ShippedTimeToExact instead.

ShippedTimeTo will filter for the date when the order was marked as shipped from the warehouse. It will not take the time into account.

This means that if you set ShippedTimeTo = 2020-10-03 13:15, the system will actually give you all orders which were marked as shipped up until 2020-10-04 00:00 (thus including all of October 3).

ShippedTimeToExact will take the time into account.
LastPickingTimeFrom datetime Last datetime an article was picked, from
LastPickingTimeTo datetime Last datetime an article was picked, to
LastReturnedFrom datetime Last datetime an article was returned, from
LastPrintedTimeFrom datetime Last datetime the order was printed, from
OrderStatusFrom int Order status from
OrderStatusTo int Order status to
LastUpdatedFrom datetime Last datetime an order was updated, from
LastUpdatedTo datetime Last datetime an order was update, to
OrderNumbersToGet object Containing elements of string, defining order numbers to get
> string str(50)[] Order number to get
OrderIdsToGet object Containing elements of int, defining order ids to get
> int int[] System order id to get
GoodsOwnerOrderIdToGet object Containing elements of string, defining goods owner order ids to get
> string str(40)[] Goods owner order id to get
ReferenceNumber string Defining which reference number to get
PickOrderIdFrom int Pick order id from
PickOrderIdTo int Pick order id to
CurrentTripId int Id of the trip which the order is planned on
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.
OrderSpecialFilters object Special filters
OnlyOrdersWithOrderLinesToReport bool Only show orders where there are order lines with ReportedNumberOfItems < Picked
OnlyOrdersAssignedToRequestingUser bool Only show orders which have been assigned to the same user which is making the API request
OnlyOrdersWithOrderLinesToReportReturned bool Only show orders where there are orderes line with ReportedReturnedNumberOfItems < ReturnedNumberOfItems
OnlyOrdersWithOrderLines... ...WhereAcknowledgedLessThanReturned bool Only show orders where there are orderes line with AcknowledgedNumberOfItems < ReturnedNumberOfItems

Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?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>
      <GetOrdersByQueryResponse xmlns="http://ongoingsystems.se/WSI">
         <GetOrdersByQueryResult>
            <Orders>
               <Order>
                  <MessageId>string</MessageId>
                  <Consignee xsi:nil="true" />
                  <Consignor xsi:nil="true" />
                  <GoodsOwnerInfo xsi:nil="true" />
                  <TransportPayer xsi:nil="true" />
                  <Financial xsi:nil="true" />
                  <GoodsInfo xsi:nil="true" />
                  <OrderInfo xsi:nil="true" />
                  <CommunicationInfo xsi:nil="true" />
                  <Success>boolean</Success>
                  <GoodsItems xsi:nil="true" />
                  <PickedOrderLines xsi:nil="true" />
                  <PickedArticleItems xsi:nil="true" />
                  <Transporter xsi:nil="true" />
                  <WsiSystem xsi:nil="true" />
                  <OrderPalletItems xsi:nil="true" />
                  <OrderShipments xsi:nil="true" />
                  <ExternalSystemId>int</ExternalSystemId>
               </Order>
               <Order>
                  <MessageId>string</MessageId>
                  <Consignee xsi:nil="true" />
                  <Consignor xsi:nil="true" />
                  <GoodsOwnerInfo xsi:nil="true" />
                  <TransportPayer xsi:nil="true" />
                  <Financial xsi:nil="true" />
                  <GoodsInfo xsi:nil="true" />
                  <OrderInfo xsi:nil="true" />
                  <CommunicationInfo xsi:nil="true" />
                  <Success>boolean</Success>
                  <GoodsItems xsi:nil="true" />
                  <PickedOrderLines xsi:nil="true" />
                  <PickedArticleItems xsi:nil="true" />
                  <Transporter xsi:nil="true" />
                  <WsiSystem xsi:nil="true" />
                  <OrderPalletItems xsi:nil="true" />
                  <OrderShipments xsi:nil="true" />
                  <ExternalSystemId>int</ExternalSystemId>
               </Order>
            </Orders>
         </GetOrdersByQueryResult>
      </GetOrdersByQueryResponse>
   </soap:Body>
</soap:Envelope>
+

Response specification

GetOrdersByQueryResult
Orders object Containing elements of Order
> Order object[] Orders that fit the search critera. Order is the same object as GetOrderResult in GetOrder.