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>
            <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>
            </OrderSpecialFilters>
            <CurrentTripId>int</CurrentTripId>
         </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)
ShippedTimeTo datetime Shipped datetime to (order marked as shipped from warehouse)
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
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

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.