Order Cancellation

All orders can be canceled/returned, as well as order items in the order can be canceled/returned partially.

It is not possible to partially cancel some and return some inside the order. It is only possible to initiate either the cancellation or return processes for the entire order.

Parameter

Data Type

In

Required

Description

order

integer

data

Order ID

is_all

boolean

data

If True cancels the order with all order items under it. Default False

cancel_items

dict

data

If is_all True, you need to send cancel_items as an empty list. Otherwise need to sent Order items that will cancel

forced_refund_amount

string

data

Used in Omnitron operating mechanism, default null must be sent

reasons

dict

data

Cancellation or refund reason code

is_cargo_refund

boolean

data

Cargo cost will be refunded. Default value is False. You can switch cancellation rules via Cancellation Strategy. See the Cancellation Strategies section for more information.

refund_invoice_number

string

data

Refund invoice number for the order.

ibans

dict

data

Iban information can be seen in the Cancellation Request. Used for only Fund Transfer transaction cancellations. Not required. Example structure is {`{"order_item_id": "iban"}`}

holder_names

dict

data

Holder name information can be seen in the Cancellation Used for only Fund Transfer transaction cancellations. Not required. Example structure is {`{"order_item_id": "holder_name"}`}

In the example below, all order items are canceled.

POST Cancel Order

Path: /api/i1/orders/{order_id}/cancel/

Sample HTTP request to cancel all order items in the order.

content_type header represents the response type.

Authorization header is a required header for authentication. You can retrieve api_token with login.

Example Request

POST Cancel Order - Partial

Path: /api/i1/orders/{order_id}/cancel/

In the example below, the order items are partially canceled.

Sample HTTP request to cancel desired order items in the order.

Example Request

Example Response

Returns given order detail information. Expected status code 200-OK. To see more information about response fields, see the Get Order section.

Example Clear Response

If the user doesn't need any details about the order, they can send “return_details”: false in the request to operate cancellation. Example response is shown below.

Example Bad Response

Expected response status codes are greater than/equal to 400 less than 500. Returns the reason why it is not an acceptable request. Bad Responses are listed below:

Last updated

Was this helpful?