POST /CheckOut2Api/Commerce/ReturnOrder
The method allows to submit a return or to make a price adjustment of goods purchased by a customer. The call is performed when the returned goods are received to the reseller or if some amount needs to be credited. All items submitted in the return call will be printed as negative invoice rows at the invoice.
Input Parameters
Name | Data Type | Default Value | Description |
---|---|---|---|
ExternalId | String | None. Must be specified. | An ID acquired when initializing a Check-Out session. |
Items | Class List of Items | None. At least one item must be specified. | A list of items representing the individual rows on an invoice. Individual items may have a negative value but the total sum of all items must be positive. |
OrderReference | String | None. Must be specified. | An ID that identifies the order for which the purchase is to be made. |
TranId | String (max. length 36 characters) | An empty string | A random unique ID generated by the calling party that identifies the HTTP request. Although the property isn’t strictly required , we recommend to generate a new random GUID and pass it. Technically, it can be any string. |
TrackingCode | String | An empty string | Generated code by delivery company. |
PostId | String | An empty string | Point of sale ID. |
Example request
{
"ExternalId": "19ac0d1ee909c302d212b4324d9194b5",
"Items": [
{
"Description": "Description",
"Notes": "Notes",
"Amount": 1
}
],
"OrderReference": "ue12345",
"TranId": "123456",
"TrackingCode": "123456",
"PosId": "Id123456"
}
Return Value
If successful, the method returns a HTTP status code 200 (OK) with no additional content.
Not successful, the method will return HTTP status code 400 with error description in body.
[
{
"ErrorCode": "14100",
"ErrorMessage": "Return denied - insufficient Purchase Balance"
}
]
Error Messages
Item amount must be positive Item description must be specified and must not be longer than 35 characters or empty. Return denied – insufficient Purchase Balance Duplicity order error Purchase is not in completed state Return error – Finnish bank cannot refund money back to customer account directly Sum of items has to be positive amount. Invalid or missing external ID.