Get Stock Transfer Estimate Fee

API trả về phí luân chuyển (ST) tạm tính, phí được tính theo bảng giá ST đã ký với khách hàng.

1. API endpoint

https://tikinowapi.tiki.vn/business/v1/formula-stock-transfer-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://api.tikinow.vn/business/v1/formula-stock-transfer-fee' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data '{
    "items": [
        {
            "product_sku": "9587541851263",
            "qty": 1
        }
    ],
    "warehouse_pickup_code": "sgn",
    "warehouse_code": "hn5"
}'

4. Params

FieldLoạiBắt buộcMô tả
itemsArrayYesDanh sách sản phẩm cần luân chuyển
items[].product_skuStringYesSKU của sản phẩm trên hệ thống TNSL
items[].qtyIntYesSố lượng tương ứng với SKU cần luân chuyển
warehouse_pickup_codeStringYesMã kho nguồn (rút hàng luân chuyển) trên hệ thống TNSL
warehouse_codeStringYesMã kho đích (nhập hàng luân chuyển) trên hệ thống TNSL

5. Response

Error

{
    "success": false,
    "error": {
        "status_code": 401,
        "message": "Unauthorized",
        "message_code": "INVALID_TOKEN"
    },
    "meta_data": {
        "request_id": "c00433cc7e5b25e390a6920052f7fedf"
    }
}

Success

{
    "success": true,
    "data": [
        {
            "fee_type_en": "Order processing fee",
            "fee_type_vi": "Phí xử lý đơn hàng",
            "product_charge": 5400,
            "fee_key": "tnsl_fee_order_processing"
        },
        {
            "fee_type_en": "Linehaul",
            "fee_type_vi": "Phí vận chuyển đường dài",
            "product_charge": 18360,
            "fee_key": "tnsl_fee_linehaul"
        }
    ],
    "meta_data": {
        "request_id": "ce18bf8df064c6836ee82321856d8bb1"
    }
}

Description

FieldLoạiMô tả
successBoolTrả về true/false tương ứng với thành công / thất bại
dataArrayData 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

Leave a Reply

Your email address will not be published.