Ongoing Warehouse Developer

ProcessReturnOrder

Used for creating and updating return orders.

Tags: ProcessReturnOrder, ReturnOrder, ReturnCause, ReturnOrderLine, ProcessReturnOrderResult, ProcessReturnOrderError

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

<?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>
        <ProcessReturnOrder xmlns="http://ongoingsystems.se/WSI">
            <GoodsOwnerCode>string</GoodsOwnerCode>
            <UserName>string</UserName>
            <Password>string</Password>
            <ReturnOrder>
                <ReturnCustomerOrderIdentification>OrderId or OrderNumber</ReturnCustomerOrderIdentification>
                <ReturnOrderIdentification>CustomerOrder or ReturnOrderNumber</ReturnOrderIdentification>
                <ReturnCause>
                    <ReturnCauseOperation>Find or FindOrCreate or SetUnknown</ReturnCauseOperation>
                    <ReturnCauseCode>string</ReturnCauseCode>
                    <ReturnCauseName>string</ReturnCauseName>
                </ReturnCause>
                <OrderId>int</OrderId>
                <CustomerOrderNumber>string</CustomerOrderNumber>
                <ReturnOrderNumber>string</ReturnOrderNumber>
                <ReturnOrderComment>string</ReturnOrderComment>
                <ReturnInDate>dateTime</ReturnInDate>
                <ReturnOrderLines>
                    <ReturnOrderLine>
                        <ReturnOrderLineIdentification>ExternalOrderLineCode or ArticleNumber</ReturnOrderLineIdentification>
                        <ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
                        <ReturnOrderRowNumber>string</ReturnOrderRowNumber>
                        <ExternalOrderLineCode>string</ExternalOrderLineCode>
                        <ArticleNumber>string</ArticleNumber>
                        <ReturnCause xsi:nil="true" />
                    </ReturnOrderLine>
                    <ReturnOrderLine>
                        <ReturnOrderLineIdentification>ExternalOrderLineCode or ArticleNumber</ReturnOrderLineIdentification>
                        <ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
                        <ReturnOrderRowNumber>string</ReturnOrderRowNumber>
                        <ExternalOrderLineCode>string</ExternalOrderLineCode>
                        <ArticleNumber>string</ArticleNumber>
                        <ReturnCause xsi:nil="true" />
                    </ReturnOrderLine>
                </ReturnOrderLines>
            </ReturnOrder>
        </ProcessReturnOrder>
    </soap:Body>
</soap:Envelope>
+

Request specification

ProcessReturnOrder
GoodsOwnerCode str(400) Req. The name/code of your client
UserName str(50) Req. Username
Password str(50) Req. Password
ReturnOrder ReturnOrder Req. The ReturnOrder object
ReturnOrder
ReturnCustomerOrderIdentification enum Req. Defined how to identify the sales order associated with the return order. Most common is to use OrderNumber.
 - OrderId
 - OrderNumber
ReturnOrderIdentification enum Req. Defines how you want to identify the return order. If you only have one return order per order you can use CustomerOrder it will then use the values supplied in ReturnCustomerOrderIdentification to find the return order. If you have multiple return orders per order you should use ReturnOrderNumber.
 - CustomerOrder
 - ReturnOrderNumber
OrderId int Required if ReturnCustomerOrderIdentification = OrderId Identifies the sales order.
CustomerOrderNumber string Required if ReturnCustomerOrderIdentification = OrderNumber Sales order number in the goods owners system.
ReturnOrderNumber string Required if ReturnOrderIdentification = ReturnOrderNumber If you don't have return orders in your system you can generate order numbers using {orderNumber}-return{n} where {orderNumber} is the order associated with the return.
ReturnOrderComment string Not required. Comment to warehouse.
ReturnInDate DateTime Not required. When it is expected to arrive.
ReturnOrderLines object Containing information about the returned articles as elements of ReturnOrderLine.
ReturnCause
ReturnCauseOperation enum Req. What operation to perform when finding the return cause.
 - Find
 - FindOrCreate
 - SetUnknown
ReturnCauseCode str Req. The code of the return cause.
ReturnCauseName str Req. The name of the return cause.
ReturnOrderLine
ReturnOrderLineIdentification enum Req. Defines how to find the order line on the original order.
 - ExternalOrderLineCode
 - ArticleNumber
ToBeReturnedNumberOfItems decimal Req. The number of items returned.
ReturnOrderRowNumber str Req. The row number. If no external return order, start counting from 1, 2, etc.
ExternalOrderLineCode str Required. Only required if ReturnOrderLineIdentification = ExternalOrderLineCodes Order line code used in goods owner system.
ArticleNumber str(50) Req. Only required if ReturnOrderLineIdentification = ArticleNumber The Article number of the returned item.
ReturnCause str(50) Optional Can be used if there are different return causes for different rows.

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>
        <ProcessReturnOrderResponse xmlns="http://ongoingsystems.se/WSI">
            <ProcessReturnOrderResult>
                <ReturnOrderId>int</ReturnOrderId>
                <Success>boolean</Success>
                <ProcessReturnOrderErrors>
                    <ProcessReturnOrderError>
                        <Message>string</Message>
                        <ErrorType>OrderNotFound or ReturnCauseNotFound or UnknownError or LogonError or OrderIdNotSupplied or OrderNumberNotSupplied or OrderRowNotFound</ErrorType>
                    </ProcessReturnOrderError>
                    <ProcessReturnOrderError>
                        <Message>string</Message>
                        <ErrorType>OrderNotFound or ReturnCauseNotFound or UnknownError or LogonError or OrderIdNotSupplied or OrderNumberNotSupplied or OrderRowNotFound</ErrorType>
                    </ProcessReturnOrderError>
                </ProcessReturnOrderErrors>
            </ProcessReturnOrderResult>
        </ProcessReturnOrderResponse>
    </soap:Body>
</soap:Envelope>
+

Response specification

ProcessReturnOrderResult
ReturnOrderId integer The WMS id for the return order.
Success boolean If operation was successful or not.
ProcessReturnOrderErrors Collection of ProcessReturnOrderErrors A list of errors occured.
ProcessReturnOrderError
Message string Error message.
ErrorType Enumeration Provides a set of known error codes.
 - OrderNotFound
 - ReturnCauseNotFound
 - UnknownError
 - LogonError
 - OrderIdNotSupplied
 - OrderNumberNotSupplied
 - OrderRowNotFound