Chuyển tới nội dung chính

POST Phê duyệt Hủy đơn

Phê duyệt Hủy đơn Shop Scope yêu cầu: seller.return_refund.basic Sử dụng API này để phê duyệt yêu cầu hủy đơn do người mua khởi tạo, được xác định bởi cancel_id. Chỉ gọi API này khi yêu cầu hủy đơn vẫn đang chờ người bán xử lý. Phiên bản 202309

POST/return_refund/202309/cancellations/{cancel_id}/approve

Request

Path

PropertiesTypeDescription
cancel_id RequiredstringID của yêu cầu hủy đơn cần phê duyệt. Sử dụng cancel_id được trả về bởi Search Cancellations. Không truyền order ID vào đây.

Header

PropertiesTypeDescription
content-type RequiredstringLoại được phép: application/json
x-tts-access-token RequiredstringGiá trị access_token của người bán từ Get Access Token, khi user_type = 0. Làm theo hướng dẫn này để lấy access_token của người bán.

Query

PropertiesTypeDescription
app_key RequiredstringMỗi app sẽ có một key riêng biệt. Vui lòng sử dụng key cụ thể được gán cho app của bạn.
sign RequiredstringChữ ký được tạo bởi thuật toán gen. Khi bạn gửi các yêu cầu API đến TTS, bạn phải ký chúng để TTS có thể nhận diện người gửi.
timestamp RequiredintUnix timestamp GMT (UTC+00:00). Timestamp này được dùng cho tất cả các yêu cầu API. Nhà phát triển có thể dùng giá trị này để chuyển đổi sang giờ địa phương.
idempotency_keystringIdempotency key là một giá trị duy nhất do client tạo ra, được server dùng để nhận diện một yêu cầu. Bạn có thể chọn phương pháp riêng để tạo các key duy nhất. Chúng tôi khuyến nghị sử dụng UUID, hoặc một chuỗi ngẫu nhiên khác có đủ độ entropy, để tránh trùng lặp. Idempotency key có thể dài tối đa 255 ký tự.
shop_cipher RequiredstringSử dụng thuộc tính này để truyền thông tin shop khi gọi API. Việc không truyền đúng giá trị khi gọi API cho các shop xuyên biên giới sẽ trả về phản hồi không chính xác. Lấy bằng API Get Authorization Shop

Example

CurlGoNode.jsJavaEnable word wrap

12345curl-X POST 'https://open-api.tiktokglobalshop.com/return_refund/202309/cancellations/98001001/approve?idempotency_key=40b456b1-78e7-412d-9fe6-82181496e1bd&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c&timestamp=1623812664&app_key=38abcd&shop_cipher=GCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3' -H 'x-tts-access-token: TTP_pwSm2AAAAABmmtFz1xlyKMnwg74T2GJ5s0uQbS8jPjb_GkdFVCxPqzQXSyuyfXdQa0AqyDsea2tYFNVf4XeqgZHFfPyv0Vs659QqyLYfsGzanZ5XZAin3_ZkcIxxS0_In6u6XDeU96k' -H 'content-type: application/json' -d '{}'

Response Parameters

PropertiesTypeDescription
codeintMã trạng thái thành công hoặc thất bại được trả về trong phản hồi API.
messagestringThông báo thành công hoặc thất bại được trả về trong phản hồi API. Lý do thất bại sẽ được mô tả trong message.
request_idstringLog yêu cầu
dataobjectThông tin trả về cụ thể

Example

JSONEnable word wrap

{"code":0,"data":{},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}

Error Code

Xem các mã lỗi phổ biến

| Code | Message | | --- | --- | | 11050001 | invalid param | | 25001001 | An invalid request parameter was passed. Please check that you have the correct parameter type(s) and format. | | 25001003 | Invalid order status. | | 25001028 | reverse lock failed | | 25001045 | The order has already been shipped and we are unable to cancel shipment with the courier. | | 25001058 | reverse downstream data load error | | 25007002 | db access error | | 25007006 | Order not found. | | 25011012 | reverse status cannot approve application | | 25020003 | decision not match reverse status | | 25020004 | decision not match reverse type | | 25020005 | No permission to process this order | | 25020009 | reverse already cancelled | | 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |

Nội dung này có hữu ích không?Hữu ích

Không hữu ích

PreviousNext