Ongoing WMS logo

Ongoing WMS Developer

Return

Ongoing WMS has functionality which allows users to return items using the outbound order which was originally used to ship the items to the end-customer. This function allows you to perform this kind of return using the API.

Tags: GetOrdersByQuery, ReturnOperation, ReturnResult, ReturnError

Request XML

POST /xxx/automation.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/Automation/Return"

<?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>
    <Return xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Operation>
        <OrderId>int</OrderId>
        <ArticleDefId>int</ArticleDefId>
        <OrderLineId>int</OrderLineId>
        <OriginalArticleItemId>int</OriginalArticleItemId>
        <Batch>string</Batch>
        <ReturnToLocation>
          <Location>string</Location>
        </ReturnToLocation>
        <NumberOfItemsToReturn>decimal</NumberOfItemsToReturn>
        <ReturnedByUser>
          <UserName>string</UserName>
        </ReturnedByUser>
        <ReturnOrder>
          <ReturnOrderLineId>int</ReturnOrderLineId>
        </ReturnOrder>
        <AllowReturnLessThanNumberOfItemsToReturn>boolean</AllowReturnLessThanNumberOfItemsToReturn>
        <ReturnComment>string</ReturnComment>
        <ReturnCause>
          <ReturnCauseId>int</ReturnCauseId>
        </ReturnCause>
        <RemoveByInventory>
          <RemoveByInventory>Yes or No</RemoveByInventory>
        </RemoveByInventory>
      </Operation>
    </Return>
  </soap:Body>
</soap:Envelope>
+

Request specification

GetOrdersByQuery
UserName str(50) Req. Your username.
Password str(50) Req. Your password.
Operation objectd> Req Object of type ReturnOperation.
ReturnOperation
OrderId int Req. Ongoing WMS internal id of the order.
ArticleDefId int Req. Ongoing WMS internal id of the article which is being returned.
OrderLineId int Ongoing WMS internal id of the specific order line which you want to perform the return against. This field is not mandatory. If you don't specify it, the system will choose a suitable order line itself.
OriginalArticleItemId int The original article item id of the item you are returning. Not mandatory.
Batch str(50) The batch number of the article you are returning. Not mandatory.
ReturnToLocation object
> Location str(50) The location where you want the returned item to be placed. If you don't specify this, the system will return the item to location it was picked from.
ReturnedByUser object Req
> UserName string Req The username of the user who is doing the return. This field is required, and the username must exist in Ongoing WMS or you will get an error.
ReturnOrder object
> ReturnOrderLineId int Ongoing WMS has entities called return orders which are used to advise the warehouse that returns are coming. If you wish to perform the return against a particular return order line, specify the return order line id in this field.
AllowReturnLessThanNumberOfItemsToReturn bool In Ongoing WMS, the maximum quantity which can be returned of a particular article is the quantity which was originally sent to the consignee.

Say the consignee was sent C items and you are trying to return R items, and R > C.

If you set AllowReturnLessThanNumberOfItemsToReturn = true, then the API call will fail.

If you set AllowReturnLessThanNumberOfItemsToReturn = false, then the API will instead try to return as much as possible.
ReturnComment str(200) Return comment.
ReturnCause object
> ReturnCauseId int The return cause id.
RemoveByInventory object
> RemoveByInventory enum If Yes, then the system will first perform the return operation and then immediately afterwards remove the item from stock (in other words: the item will be scrapped). If No, then the system will keep the item in stock.

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>
    <ReturnResponse xmlns="http://ongoingsystems.se/Automation">
      <ReturnResult>
        <Errors>
          <ReturnError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or LocationNotFound or ArticleNotFound or ArticleNotOnOrder or GoodsOwnerIsDeleted or OrderIdNotFound or OrderLineIdMissMatch or NumberOfItemsToReturnGreaterThanLeftToReturnOnOrder or ErrorWhileSaving or ReturnedByUserError or NothingFoundToReturn or ReturnOrderLineNotFound or ReturnOrderLineNotMatchingArticle or ReturnOrderNotMatchingOrder or ReturnCauseNotMatchingGoodsOwner or ReturnCauseNotFound</ErrorType>
          </ReturnError>
          <ReturnError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or LocationNotFound or ArticleNotFound or ArticleNotOnOrder or GoodsOwnerIsDeleted or OrderIdNotFound or OrderLineIdMissMatch or NumberOfItemsToReturnGreaterThanLeftToReturnOnOrder or ErrorWhileSaving or ReturnedByUserError or NothingFoundToReturn or ReturnOrderLineNotFound or ReturnOrderLineNotMatchingArticle or ReturnOrderNotMatchingOrder or ReturnCauseNotMatchingGoodsOwner or ReturnCauseNotFound</ErrorType>
          </ReturnError>
        </Errors>
        <Success>boolean</Success>
        <ReturnedNumberOfItems>decimal</ReturnedNumberOfItems>
      </ReturnResult>
    </ReturnResponse>
  </soap:Body>
</soap:Envelope>
+

Response specification

ReturnResult
Errors object A list of ReturnError objects
Success bool True if successful, false otherwise.
ReturnedNumberOfItems dec The total number of items which were successfully returned.
ReturnError
Message str(*) Message explaining the error.
ErrorType string The type of error:

- UnknownError
- LogonError
- LocationNotFound
- ArticleNotFound
- ArticleNotOnOrder
- GoodsOwnerIsDeleted
- OrderIdNotFound
- OrderLineIdMissMatch
- NumberOfItemsToReturnGreaterThanLeftToReturnOnOrder
- ErrorWhileSaving
- ReturnedByUserError
- NothingFoundToReturn
- ReturnOrderLineNotFound
- ReturnOrderLineNotMatchingArticle
- ReturnOrderNotMatchingOrder
- ReturnCauseNotMatchingGoodsOwner
- ReturnCauseNotFound