Use this API to cancel an order on behalf of a seller. In the US and UK markets, when an item is out of stock, partial cancellation on the single item level is supported by this API.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Bodyrequired
Section titled “Request Bodyrequired”object
TikTok Shop order id
List of SKU to cancel
object
TikTok Shop SKU ID to include in the refund calculation.
Quantity of this SKU to include in the refund calculation.
List of order line item IDs to cancel. In the US and UK markets, when an item is out of stock, partial cancellation at the individual item level is supported. To initiate a partial cancellation, specify the item’s order line ID. Note: This is a legacy field. For new integrations, use order_line_list instead. Do not provide non-empty values in both order_line_item_ids and order_line_list in the same request.
Reason for canceling the order. To obtain a reason for this order, call GET /return_refund/202602/orders/{order_id}/aftersale_eligibility with the same order_id, initiate_aftersale_user=SELLER, and request_types=CANCEL. From the corresponding data.sku_eligibility[].line_item_eligibility[] result, pass an exact value from available_reason_names as cancel_reason. See “Return API Overview” for additional guidance on seller cancellation reasons.
List of order lines or sub-order lines to cancel. In the US and UK markets, when an item is out of stock, partial cancellation at the individual item level is supported. Note: This field is completely backward compatible with the previous order_line_item_ids field. Do not provide non-empty values in both order_line_list and order_line_item_ids in the same request.
object
The corresponding order line ID
The sub-order-line ID inside a bundle product
- Required for bundle products
- Not required for non-bundle products
Example
{ "order_id": "577087614418520388", "skus": [ { "sku_id": "1729386416015578024", "quantity": 1 } ], "order_line_item_ids": [ "577087614418716996" ], "cancel_reason": "ecom_order_delivered_refund_and_return_reason_wrong_product_seller", "order_line_list": [ { "order_line_item_id": "576469648086306986", "sub_order_line_item_id": "576469648086306987" } ]}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
The identifier of a specific order cancellation.
The status of an order cancellation request. Available values:
CANCELLATION_REQUEST_PENDINGCANCELLATION_REQUEST_SUCCESSCANCELLATION_REQUEST_CANCELCANCELLATION_REQUEST_COMPLETE
Example
{ "code": 0, "data": { "cancel_id": "4035319218955782461", "cancel_status": "CANCELLATION_REQUEST_SUCCESS" }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}