1. Home
  2. Docs
  3. TikiNOW Smart Logistics
  4. API References
  5. TNSL Fee Group
  6. Estimate Return Fee

Estimate Return Fee

API trả về phí thu hồi đơn hàng tạm tính (Đơn hàng được thu hồi bởi TNSL)

Lưu ý: Phí thu hồi hàng chỉ tạm tính được đối với đơn hàng đã giao hàng thành công, và phương thức thu hồi là TNSL thu hồi.

1. API endpoint

https://tikinowapi.tiki.vn/business/v1/formula-return-fee

2. Header request

Content-Type: application/json

Authorization: Bearer + access_token: access_token lấy từ API get token, hoặc login từ app public, app in-house hoặc token từ TikiNOW Center, Seller Center.

3. CURL Example

curl --location 'https://tikinowapi.tiki.vn/business/v1/formula-return-fee' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxx' \
--data '{
    "order_code":"690550015",
    "items": [
        {
            "product_sku": "9587541851263",
            "qty": 1
        }
    ]
}'

4. Params

FieldLoạiBắt buộcMô tả
order_codeStringYesMã đơn hàng trên hệ thống của TNSL.
itemsArrayYesDanh sách sản phẩm cần thu hồi trong đơn hàng.
product_skuStringYesMã sku trong đơn hàng (sku thuộc hệ thống TNSL).
qtyNumberYesSố lượng cần thu hồi tương ứng của sku.

5. Response

Error

{
    "success": false,
    "errors": [
        {
            "message": "sku 9587541851263 có số lượng 10 không hợp lệ",
            "code": "BAD_REQUEST"
        }
    ],
    "metadata": {
        "request_id": "b1cfaa5f7f9429a00d3e1aa4398761dc"
    }
}

Success

{
    "success": true,
    "data": {
        "fee_type_en": "Return fee",
        "fee_type_vi": "Phí thu hồi",
        "product_charge": 837998,
        "fee_key": "tnsl_fee_return_fee"
    },
    "meta_data": {
        "request_id": "6ceef9e788bb3ff23cb8975703d1659a"
    }
}

Description

FieldLoạiMô tả
successBoolTrả về true/false tương ứng với thành công / thất bại
dataObjectData trả về khi gọi thành công và có dữ liệu phí
fee_type_enStringTên loại phí bằng tiếng Anh
fee_type_viStringTên loại phí bằng tiếng Việt
product_chargeFloatSố tiền phí tương ứng với loại fee_key (VNĐ)
fee_keyStringKey loại phí trên hệ thống TNSL
Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published.