Authentication is the same as for all Public-Api requests.
Warehouse item updates can be sent from WMS to nShift Return. In case there are unprocessed returns in nShift Return, these can be updated via the /wms-update post request.
Endpoint
URL: POST/public-api/v3/wms-update
Endpoint provides the option (for now) to process returns automatically for return orders that have been created in our system and are in Not Processed status.
Parameter | Type | Required | Comments |
forwardOrderId | String | Yes | An immutable ID of the original forward order, that was sent to the consumer. |
returnId | String | Yes | Identifies the return order this item corresponds to. |
updatedAt | Date | Yes | Timestamp when the record was last updated. |
alternativeOrderIds | Array | No | An array of alternative order IDs, that this forward order might be identified by. |
marketCode | String | No | A pre-configured market identifier defined by the merchant. |
currency | String | No | |
itemCount | Integer | Yes | The number of items in this return. |
items | Array | Yes | An array of return items included into this update. See below for format details. |
forwardOrderItemId | String | Yes | Item ID within the original order. |
returnItemId | String | No | If available, identifies the this return item in other merchant systems. |
sku | String | Yes | Product variant SKU |
productId | String | No | Immutable ID of the product. Used for cross-checks. |
productVariantId | String | No | Immutable ID of the product variant. Used for cross-checks. |
isPresent | Boolean | No | Only used if the WMS can tell that a certain item was expected to be in the return, but in fact, was not there. |
isAccepted | Boolean | Yes | Indicates whether a certain item can be accepted for return and should be refunded. |
returnReasonCode | String | No | Merchant-provided string code, describing return reason (in case there is, for example, a filled return form in the parcel). |
returnConditionCode | String | No | Merchant-provided string code, describing item condition upon receival. |
netAmount | Double | Yes | The amount to be refunded excluding indirect taxes (e. g. VAT or sales tax). |
taxAmount | Double | Yes | The amount of indirect taxes refunded for this item. |
grossAmount | Double | Yes | The amount to be refunded including indirect taxes (e.g. VAT or sales tax). |
Example Request:
Post https://staging.returnado.com/public-api/v3/wms-update
{
"returns": [
{
"marketCode": "JPN",
"forwardOrderId": "20230221435",
"updatedAt": "2023-02-20T12:34:56Z",
"altForwardOrderIds": [
{
"type": "magentoId",
"value": "10000254585"
},
{
"type": "receiptReference",
"value": "2255682775117751"
}
],
"returnId": "20230221435",
"currency": "SEK",
"itemCount": 1,
"items": [
{
"forwardOrderItemId": "1",
"returnItemId": "2023",
"productId": "2023",
"productVariantId": "hera",
"sku": "hera",
"quantity": 1,
"isPresent": true,
"isAccepted": true,
"returnReasonCode": "BAD_FIT",
"returnConditionCode": "NOT_USED",
"netAmount": 39.00,
"taxAmount": 0.00,
"grossAmount": 39.00
},
{
"forwardOrderItemId": "1",
"returnItemId": "2024",
"productId": "2024",
"productVariantId": "heras",
"sku": "heras",
"quantity": 1,
"isPresent": true,
"isAccepted": true,
"returnReasonCode": "BAD_FIT",
"returnConditionCode": "NOT_USED",
"netAmount": 39.00,
"taxAmount": 0.00,
"grossAmount": 39.00
}
]
}
]
}
HTTP 200 if request completed successfully.
Error codes where appropriate.
For example, if bad input request:
{
"code": 400,
"error": "Bad Request",
"message": "Something went wrong",
"timestamp": "2023-02-22T07:50:24Z"
}
At the moment the only flow that works is updating a return order to Processed in case the return is already created in our system but not Processed/Approved. The return must contain the exact number of items as the request received.