POST

cancel_order

With this action you can cancel an order in whole or in part.

Query parameters

action
string

Requested method

required
default : get_orders
shop_number
string

Your shop number. Example: “10123”

required
cancel_complete_order
boolean

Set to 1 to cancel the complete order including all items and shipping costs. (Default: 0)

cancellation_items
array[object]
cancellation_item
object
cancel_shipping
boolean

Cancel shipping costs as well? (Default: 0)

cancel_note
string

Note regarding the cancellation request. Example: “Item is not in stock anymore.”

Response

application/json
object
error
integer

Error code 0 means no error.

error_text
null or string

Error message

cancellation_number
string

The unique cancellation number. Example: “1010001596”

version
string

API version Example: “1.0”

trace_id
string

Request trace-ID, needed as reference for contact. Example: “spa-4f99573d74ae1”

Error Codes

Code Description
101 Unknown action
103 “shop_number” not set
110 Merchant not found
113 Shop not found
118 Missing parameters
123 Following parameters of wrong type: […]
201 Order not found
222 Order already cancelled
223 Try to cancel invalid item
224 Try to cancel invalid quantity of items
225 Shipping costs already cancelled
226 Invalid cancellation arguments
400 Authorization not set
401 Authorization username invalid format
402 Generated authorization password invalid
403 Generated authorization is too old
404 The given OAuth2 access token is invalid
405 Shop has no rights to access API. Make sure your contract is valid
803 Internal error occurred while saving
999 Unknown error

Example

{
    error: 0,
    error_text: null,
    cancellation_number: "1010001596",
    version: "1.0",
    trace_id: "spa-4f7ab2d146165"
}