stable本次发布有变化全部展示
来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Path: /return_refund/202602/cancellations
#§2 Method: [POST]
#§3 Function Description
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.
§4 Common Parameters
For common parameters, refer to How to call TikTok Shop APIs - Common Parameters
| Properties | Location | Type | Require | Sample | Properties description |
|---|---|---|---|---|---|
| shop_cipher | query | string | Y | GCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3 | Use this property to pass shop information in requesting the API. Failure in passing the correct value when requesting the API for cross-border shops will return incorrect response. |
| Get by API Get Authorization Shop | |||||
| content-type | header | string | Y | application/json | Allowed type: application/json |
§5 Request Query Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| app_key | string | N | 38abcd | Every single app will have a unique key. Please use the specific key assigned to your app. |
| sign | string | N | 5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c | Signature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders. |
| timestamp | int | N | 1623812664 | Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time. |
§6 Request Body Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| order_id | string | Y | 577087614418520388 | TikTok Shop order id |
| skus | []object | N | List of SKU to cancel | |
| ^sku_id | string | Y | 1729386416015578024 | The SKU id to cancel |
| ^quantity | int | Y | 1 | The quantity of SKU to cancel |
| order_line_item_ids | []string | N | ["577087614418716996"] | List of order line item ids to cancel. In the US and UK markets, when an item is out of stock, partial cancellation on the single item level is supported. To initiate a partial cancellation, specify the item's order line id. Note: This is a legacy field for any new integrations please use order_line_items field instead. |
| cancel_reason | string | Y | ecom_order_delivered_refund_and_return_reason_wrong_product_seller | Reason to cancel the order |
| Please see "Return API Overview" for a list of reasons a seller can select to cancel the order. | ||||
| order_line_list | []object | N | List of order-lines/sub order-lines to cancel. In the US and UK markets, when an item is out of stock, partial cancellation on the single item level is supported. Note: This field is completely backward compatible with the previous order_line_items_ids field. | |
| ^order_line_item_id | string | N | 576469648086306986 | The corresponding order line ID |
| ^sub_order_line_item_id | string | N | 576469648086306987 | The sub-order-line ID inside a bundle product |
- Required for bundle products
- Not required for non-bundle products |
§7 Request Sample
Query
https://open-api.tiktokglobalshop.com/return_refund/202602/cancellations?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c×tamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY
Body
{"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"}]}
§8 Response Parameters
| Properties | Type | Sample | Properties description |
|---|---|---|---|
| code | int | 0 | The success or failure status code returned in API response. |
| message | string | Success | The success or failure messages returned in API response. Reasons of failure will be described in the message. |
| request_id | string | 202203070749000101890810281E8C70B7 | Request log |
| data | object | Specific return information | |
| ^cancel_id | string | 4035319218955782461 | The identifier of a specific order cancellation. |
| ^cancel_status | string | CANCELLATION_REQUEST_SUCCESS | The status of an order cancellation request. |
| Available values: |
CANCELLATION_REQUEST_PENDINGCANCELLATION_REQUEST_SUCCESSCANCELLATION_REQUEST_CANCELCANCELLATION_REQUEST_COMPLETE|
§9 Response Sample
{"code":0,"data":{"cancel_id":"4035319218955782461","cancel_status":"CANCELLATION_REQUEST_SUCCESS"},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}
§10 Error Code
For common error codes, refer to How to call TikTok Shop APIs - Common Error Code
| Code | Message |
|---|---|
| 25001001 | An invalid request parameter was passed. Please check that you have the correct parameter type(s) and format. |
| 25001011 | A return request is already in process, or the order has already been cancelled. |
| 25001014 | Unknown return reason. Please ensure you are passing a valid return reason. |
| 25001015 | The provided return reason cannot be used by the seller. Please select a valid return reason and try again. |
| 25001020 | The provided return reason is currently offline. Please select a different return reason. |
| 25001021 | Reason not match order status |
| 25001028 | reverse lock failed |
| 25001045 | The order has already been shipped and we are unable to cancel shipment with the courier. |
| 25001046 | Return request has failed due to an interception by TikTok risk control. |
| 25001051 | Not allowed to return or cancel since order is completed or cancelled |
| 25005010 | Unable to cancel individual line items within this request. |
| 25005011 | The requested line item(s) for return or refund exceeds the allowable limit. |
| 25020005 | No permission to process this order |
| 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |
