ProcessReturnOrder
Used for creating and updating return orders.
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 or OrderLineId</ReturnOrderLineIdentification>
<ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
<ReturnOrderRowNumber>string</ReturnOrderRowNumber>
<ExternalOrderLineCode>string</ExternalOrderLineCode>
<ArticleNumber>string</ArticleNumber>
<ReturnCause>
<ReturnCauseOperation>Find or FindOrCreate or SetUnknown</ReturnCauseOperation>
<ReturnCauseCode>string</ReturnCauseCode>
<ReturnCauseName>string</ReturnCauseName>
</ReturnCause>
<OrderLineId>int</OrderLineId>
</ReturnOrderLine>
<ReturnOrderLine>
<ReturnOrderLineIdentification>ExternalOrderLineCode or ArticleNumber or OrderLineId</ReturnOrderLineIdentification>
<ToBeReturnedNumberOfItems>decimal</ToBeReturnedNumberOfItems>
<ReturnOrderRowNumber>string</ReturnOrderRowNumber>
<ExternalOrderLineCode>string</ExternalOrderLineCode>
<ArticleNumber>string</ArticleNumber>
<ReturnCause>
<ReturnCauseOperation>Find or FindOrCreate or SetUnknown</ReturnCauseOperation>
<ReturnCauseCode>string</ReturnCauseCode>
<ReturnCauseName>string</ReturnCauseName>
</ReturnCause>
<OrderLineId>int</OrderLineId>
</ReturnOrderLine>
</ReturnOrderLines>
<Warehouse>
<Identification>WarehouseCode or WarehouseId</Identification>
<Code>string</Code>
<Id>int</Id>
</Warehouse>
<Tracking>
<ReturnOrderTracking>
<Url>string</Url>
<Waybill>string</Waybill>
</ReturnOrderTracking>
<ReturnOrderTracking>
<Url>string</Url>
<Waybill>string</Waybill>
</ReturnOrderTracking>
</Tracking>
</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. | |
Warehouse | object | Element of type ReturnOrderWarehouse. Defines which warehouse is suppoosed to process the return. | |
Tracking | object[] | List of ReturnOrderTracking. These are the tracking numbers and tracking URLs for the return order. |
ReturnOrderWarehouse | |||
---|---|---|---|
Identification | enum | Req. |
Defines what you want to identify the warehouse by: - WarehouseCode - WarehouseId |
Code | str(50) | Warehouse code. Required if WarehouseIdentification = WarehouseCode | |
Id | int | Warehouse id. Required if WarehouseIdentification = WarehouseId |
ReturnOrderTracking | |||
---|---|---|---|
Url | str(300) | The tracking URL for the return order. | |
Waybill | str(50) | The tracking number for the return order. |
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 - OrderLineId |
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 = ExternalOrderLineCode. Order line code used in goods owner system. |
OrderLineId | int | Required. | Only required if ReturnOrderLineIdentification = OrderLineId. The Ongoing WMS internal id of the order line. |
ArticleNumber | str(50) | Req. | Only required if ReturnOrderLineIdentification = ArticleNumber. The Article number of the returned item. |
ReturnCause | object | Optional | An object of type ReturnCause. 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 | Ongoing 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 - WarehouseNotFound |