GetReturnOrdersByQuery

This function allows getting multiple return orders within a certain search critera.

Tags: GetReturnOrdersByQuery, GetReturnOrdersQuery, GetReturnOrdersByQueryResponse, GetReturnOrdersResult, ReturnOrderInfo, GetReturnOrdersError, ReturnOrderLineInfo, ReturnOrderWarehouseInfo, ReturnedArticleItem, ReturnCause_ReturnedArticleItem, ArticleItemStatus_ReturnedArticleItem, ArticleItemCategory_ReturnedArticleItem

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

<?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>
    <GetReturnOrdersByQuery xmlns="http://ongoingsystems.se/WSI">
      <GoodsOwnerCode>string</GoodsOwnerCode>
      <UserName>string</UserName>
      <Password>string</Password>
      <ReturnOrdersQuery>
        <CustomerOrderNumbersToGet>
          <string>string</string>
          <string>string</string>
        </CustomerOrderNumbersToGet>
        <ReturnOrderNumbersToGet>
          <string>string</string>
          <string>string</string>
        </ReturnOrderNumbersToGet>
        <GoodsReturnedFromDate>dateTime</GoodsReturnedFromDate>
        <ReturnOrderStatusFrom>int</ReturnOrderStatusFrom>
        <RetunOrderStatusTo>int</RetunOrderStatusTo>
      </ReturnOrdersQuery>
    </GetReturnOrdersByQuery>
  </soap:Body>
</soap:Envelope>

Request specification

GetReturnOrdersByQuery
GoodsOwnerCode string(400) Req. The name/code of your client
UserName string(50) Req. Your username
Password string(50) Req. Your password
ReturnOrdersQuery GetReturnOrdersQuery Req. The query object
GetReturnOrdersQuery
CustomerOrderNumbersToGet string[] A list of goods owners order number.
ReturnOrderNumbersToGet string[] A list of goods owners return order numbers
GoodsReturnedFromDate dateTime Filter only return orders return from a certain date. Preferably used with current date when polling.
ReturnOrderStatusFrom int Return order status from.
RetunOrderStatusTo int Return order status to.

Response XML

<?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>
    <GetReturnOrdersByQueryResponse xmlns="http://ongoingsystems.se/WSI">
      <GetReturnOrdersByQueryResult>
        <Success>boolean</Success>
        <ReturnOrders>
          <ReturnOrderInfo>
            <OrderId>int</OrderId>
            <OrderNumber>string</OrderNumber>
            <ReturnOrderId>int</ReturnOrderId>
            <ReturnOrderNumber>string</ReturnOrderNumber>
            <ReturnOrderComment>string</ReturnOrderComment>
            <ReturnInDate>dateTime</ReturnInDate>
            <ReturnCauseCode>string</ReturnCauseCode>
            <ReturnCauseName>string</ReturnCauseName>
            <ReturnCauseId>int</ReturnCauseId>
            <ReturnOrderLines>
              <ReturnOrderLineInfo>
                <ArticleName>string</ArticleName>
                <ArticleNumber>string</ArticleNumber>
                <ReturnOrderLineId>int</ReturnOrderLineId>
                <ExternalOrderLineCode>string</ExternalOrderLineCode>
                <PickedNumberOfItems>decimal</PickedNumberOfItems>
                <ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
                <ReturnedNumberOfItems>decimal</ReturnedNumberOfItems>
                <ReturnCauseCode>string</ReturnCauseCode>
                <ReturnCauseName>string</ReturnCauseName>
                <ReturnOrderRowNumber>string</ReturnOrderRowNumber>
                <ReturnCauseId>int</ReturnCauseId>
                <ParentReturnOrderLineId>int</ParentReturnOrderLineId>
                <ReturnedArticleItems>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                </ReturnedArticleItems>
                <ReturnedRemovedByInventoryNumberOfItems>decimal</ReturnedRemovedByInventoryNumberOfItems>
              </ReturnOrderLineInfo>
              <ReturnOrderLineInfo>
                <ArticleName>string</ArticleName>
                <ArticleNumber>string</ArticleNumber>
                <ReturnOrderLineId>int</ReturnOrderLineId>
                <ExternalOrderLineCode>string</ExternalOrderLineCode>
                <PickedNumberOfItems>decimal</PickedNumberOfItems>
                <ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
                <ReturnedNumberOfItems>decimal</ReturnedNumberOfItems>
                <ReturnCauseCode>string</ReturnCauseCode>
                <ReturnCauseName>string</ReturnCauseName>
                <ReturnOrderRowNumber>string</ReturnOrderRowNumber>
                <ReturnCauseId>int</ReturnCauseId>
                <ParentReturnOrderLineId>int</ParentReturnOrderLineId>
                <ReturnedArticleItems>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                </ReturnedArticleItems>
                <ReturnedRemovedByInventoryNumberOfItems>decimal</ReturnedRemovedByInventoryNumberOfItems>
              </ReturnOrderLineInfo>
            </ReturnOrderLines>
            <ReturnOrderStatusId>int</ReturnOrderStatusId>
            <ReturnOrderStatusText>string</ReturnOrderStatusText>
            <Warehouse>
              <Name>string</Name>
              <Code>string</Code>
              <Id>int</Id>
            </Warehouse>
          </ReturnOrderInfo>
          <ReturnOrderInfo>
            <OrderId>int</OrderId>
            <OrderNumber>string</OrderNumber>
            <ReturnOrderId>int</ReturnOrderId>
            <ReturnOrderNumber>string</ReturnOrderNumber>
            <ReturnOrderComment>string</ReturnOrderComment>
            <ReturnInDate>dateTime</ReturnInDate>
            <ReturnCauseCode>string</ReturnCauseCode>
            <ReturnCauseName>string</ReturnCauseName>
            <ReturnCauseId>int</ReturnCauseId>
            <ReturnOrderLines>
              <ReturnOrderLineInfo>
                <ArticleName>string</ArticleName>
                <ArticleNumber>string</ArticleNumber>
                <ReturnOrderLineId>int</ReturnOrderLineId>
                <ExternalOrderLineCode>string</ExternalOrderLineCode>
                <PickedNumberOfItems>decimal</PickedNumberOfItems>
                <ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
                <ReturnedNumberOfItems>decimal</ReturnedNumberOfItems>
                <ReturnCauseCode>string</ReturnCauseCode>
                <ReturnCauseName>string</ReturnCauseName>
                <ReturnOrderRowNumber>string</ReturnOrderRowNumber>
                <ReturnCauseId>int</ReturnCauseId>
                <ParentReturnOrderLineId>int</ParentReturnOrderLineId>
                <ReturnedArticleItems>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                </ReturnedArticleItems>
                <ReturnedRemovedByInventoryNumberOfItems>decimal</ReturnedRemovedByInventoryNumberOfItems>
              </ReturnOrderLineInfo>
              <ReturnOrderLineInfo>
                <ArticleName>string</ArticleName>
                <ArticleNumber>string</ArticleNumber>
                <ReturnOrderLineId>int</ReturnOrderLineId>
                <ExternalOrderLineCode>string</ExternalOrderLineCode>
                <PickedNumberOfItems>decimal</PickedNumberOfItems>
                <ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
                <ReturnedNumberOfItems>decimal</ReturnedNumberOfItems>
                <ReturnCauseCode>string</ReturnCauseCode>
                <ReturnCauseName>string</ReturnCauseName>
                <ReturnOrderRowNumber>string</ReturnOrderRowNumber>
                <ReturnCauseId>int</ReturnCauseId>
                <ParentReturnOrderLineId>int</ParentReturnOrderLineId>
                <ReturnedArticleItems>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                  <ReturnedArticleItem>
                    <OriginalArticleItemId>int</OriginalArticleItemId>
                    <NumberOfItems>decimal</NumberOfItems>
                    <Batch>string</Batch>
                    <Serial>string</Serial>
                    <ExpiryDate>dateTime</ExpiryDate>
                    <Container>string</Container>
                    <Weight>decimal</Weight>
                    <Volume>decimal</Volume>
                    <Comment>string</Comment>
                    <ReturnTime>dateTime</ReturnTime>
                    <ReturnComment>string</ReturnComment>
                    <IsReturnRemovedByInventory>boolean</IsReturnRemovedByInventory>
                    <ReturnCause>
                      <ReturnCauseCode>string</ReturnCauseCode>
                      <ReturnCauseName>string</ReturnCauseName>
                    </ReturnCause>
                    <ArticleItemStatus>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemStatus>
                    <ArticleItemCategory>
                      <Code>string</Code>
                      <Name>string</Name>
                    </ArticleItemCategory>
                  </ReturnedArticleItem>
                </ReturnedArticleItems>
                <ReturnedRemovedByInventoryNumberOfItems>decimal</ReturnedRemovedByInventoryNumberOfItems>
              </ReturnOrderLineInfo>
            </ReturnOrderLines>
            <ReturnOrderStatusId>int</ReturnOrderStatusId>
            <ReturnOrderStatusText>string</ReturnOrderStatusText>
            <Warehouse>
              <Name>string</Name>
              <Code>string</Code>
              <Id>int</Id>
            </Warehouse>
          </ReturnOrderInfo>
        </ReturnOrders>
        <GetReturnOrdersErrors>
          <GetReturnOrdersError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError</ErrorType>
          </GetReturnOrdersError>
          <GetReturnOrdersError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError</ErrorType>
          </GetReturnOrdersError>
        </GetReturnOrdersErrors>
      </GetReturnOrdersByQueryResult>
    </GetReturnOrdersByQueryResponse>
  </soap:Body>
</soap:Envelope>

Response specification

GetReturnOrdersByQueryResponse
GetReturnOrdersByQueryResult GetReturnOrdersResult
GetReturnOrdersResult
Success boolean
ReturnOrders ReturnOrderInfo[]
GetReturnOrdersErrors GetReturnOrdersError[]
ReturnOrderInfo
OrderId int Unique internal identifier of the sales order which the return order is bound to.
OrderNumber string Goods owner public sales order number which the return order is bound to.
ReturnOrderId int Unique internal identifier of the return order.
ReturnOrderNumber string The order number of the return order. Specified by goods owner.
ReturnOrderComment string Comment to the warehouse.
ReturnInDate dateTime Date of arrival of the return goods
ReturnCauseCode string Shortening for return cause.
ReturnCauseName string Name of the return cause.
ReturnCauseId int Unique internal identifier of the return cause.
ReturnOrderLines ReturnOrderLineInfo[] The lines in the return.
ReturnOrderStatusId int Integer representing the status of the return order.
ReturnOrderStatusText string(50) The name of the return order status.
Warehouse ReturnOrderWarehouseInfo Contains information about the warehouse which the order is supposed to be returned to.
GetReturnOrdersError
Message string
ErrorType enum An element of type GetReturnOrderErrorTypes.
ReturnOrderLineInfo
ArticleName string Name of the article.
ArticleNumber string Goods owners identifier of the article.
ReturnOrderLineId int Unique identifier of the line within a return order.
ExternalOrderLineCode string Goods owners identifier of the row.
PickedNumberOfItems decimal The number of picked items on the original sales order.
ToBeReturnedNumberOfItems decimal The number of items to be returned.
ReturnedNumberOfItems decimal The total number of items returned to the warehouse. Includes both items which were immediately discarded, and those there weren't discarded.
ReturnCauseCode string Short name of the return cause.
ReturnCauseName string Name of the return cause.
ReturnOrderRowNumber string The row number used by external system.
ReturnCauseId int Unique internal identifier for the return cause.
ParentReturnOrderLineId int Used only if return order lines are nested. For example if articles consists of other articles.
ReturnedArticleItems ReturnedArticleItem[]
ReturnedRemovedByInventoryNumberOfItems decimal The number of items returned to the warehouse and which were immediately discarded.
ReturnOrderWarehouseInfo
Name string
Code string
Id int
ReturnedArticleItem
OriginalArticleItemId int
NumberOfItems decimal
Batch string
Serial string
ExpiryDate dateTime
Container string
Weight decimal
Volume decimal
Comment string
ReturnTime dateTime
ReturnComment string
IsReturnRemovedByInventory boolean
ReturnCause ReturnCause_ReturnedArticleItem An element of type ReturnCause_ReturnedArticleItem.
ArticleItemStatus ArticleItemStatus_ReturnedArticleItem An element of type ArticleItemStatus_ReturnedArticleItem.
ArticleItemCategory ArticleItemCategory_ReturnedArticleItem An element of type ArticleItemCategory_ReturnedArticleItem.
ReturnCause_ReturnedArticleItem
ReturnCauseCode string
ReturnCauseName string
ArticleItemStatus_ReturnedArticleItem
Code string
Name string
ArticleItemCategory_ReturnedArticleItem
Code string
Name string