stable本次发布有变化全部展示
来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Path: /return_refund/202602/refunds/calculate
#§2 Method: [POST]
#§3 Function Description
Use this API to estimate the refundable amount for a cancellation, refund, or return-and-refund request. The estimate depends on the selected request_type, reason_name, and targeted items. For return-and-refund scenarios, the estimate can also depend on the selected return shipping method.
§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 | Y | 38abcd | Every single app will have a unique key. Please use the specific key assigned to your app. |
| sign | string | Y | 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 | Y | 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 | 576469648086175911 | TikTok Shop order id. |
| request_type | string | Y | REFUND | Request type |
- CANCEL
- REFUND
- RETURN_AND_REFUND Note: different request types are used for different aftersales scenarios. Also, different request types might have different refund amounts, because the refund amount calculation policy is different. | shipment_type |string |N |PLATFORM |How buyer ships items to seller when in a return request, could be:
PLATFORMBUYER_ARRANGE| handover_method |string |N |DROP_OFF |Which handover method buyer chooses to use when returning goods to seller by platformDROP_OFF: buyer drops off the parcel in logistics service collect point.PICKUP: logistics service picks up the buyer package. | reason_name |string |Y |ecom_order_delivered_refund_reason_missing_product_seller |Seller's reason to create a return. Use the Get Aftersale Eligibility endpoint to retrieve the currently available reasons, and submit the returned reason name in this field. | order_line_item_ids |[]string |N |["576469648086306986"] |TikTok Shop order line item ids. | skus |[]object |N | |skus | ^sku_id |string |Y |1729386416015578024 |Quantity seller wants to create a return request. | ^quantity |int |Y |1 |Sku id seller wants to create a return request. | order_line_list |[]object |N | |This new parameter is completely backward compatible with the previous order_line_items_ids field and in addition this supports bundle order splitting, use the sub items accordingly | ^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/refunds/calculate?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c×tamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY
Body
{"order_id":"576469648086175911","request_type":"REFUND","shipment_type":"PLATFORM","handover_method":"DROP_OFF","reason_name":"ecom_order_delivered_refund_reason_missing_product_seller","order_line_item_ids":["576469648086306986"],"skus":[{"sku_id":"1729386416015578024","quantity":1}],"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 | |
| ^order_refund_amount | object | Refund amount to buyer. | |
| ^^currency | string | USD | Currency for payment. |
| ^^refund_total | string | 1.23 | Total amount refund to buyer. |
| ^^refund_subtotal | string | 1 | Total price of item be returned. |
| ^^refund_shipping_fee | string | 0.2 | Shipping fee refund to buyer. |
| ^^refund_tax | string | 0.03 | Tax returned to buyer. |
| ^^retail_delivery_fee | string | 0.1 | Retail delivery fee takes effect once platform GMV exceeds 500,000 USD, according to US Colorado states' compliance rules. |
§9 Response Sample
{"code":0,"data":{"order_refund_amount":{"currency":"USD","refund_total":"1.23","refund_subtotal":"1","refund_shipping_fee":"0.2","refund_tax":"0.03","retail_delivery_fee":"0.1"}},"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. |
| 25007006 | Order not found. |
