Get TNSL Inventory Fee (Phí lưu kho TNSL)

Lấy phí lưu kho TNSL theo SKU và ngày

Lưu ý: Phí lưu kho sẽ tính hàng ngày nên chỉ get 1 lần/ngày và thời gian trả dữ liệu không quá 30 ngày.

1. API endpoint

https://tikinowapi.tiki.vn/business/v1/inventory-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/inventory-fee?date=2024-01-16&sku=4935348071901&warehouse_code=sgn' \
--header 'Authorization: Bearer xxxxx' \
--header 'Content-Type: application/json'

4. Params

FieldTypeMandatoryDescription
dateStringYesFormat date: YYYY-MM-DD
skuStringYesSKU of product in TNSL system
warehouse_codeStringYesWarehouse code in TNSL system, e.g: sgn, sgn3, hn5
Set warehouse_code = all to get all warehouse

5. Response

Error

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

Success

{
  "success": true,
  "data": [
    {
      "qty": 1,
      "aging_day": 117,
      "amount": 1001,
      "warehouse_code": "SGN"
    },
    {
      "qty": 10,
      "aging_day": 154,
      "amount": 2101,
      "warehouse_code": "SGN"
    },
    {
      "qty": 4,
      "aging_day": 22,
      "amount": 40,
      "warehouse_code": "SGN"
    }
  ],
  "meta_data": {
    "request_id": "f5f82ace87a9fde1583f63563e2339b7"
  }
}

Description

FieldTypeDescription
successBoolResponse true/false
dataArrayData response when successfully
amountFloatFee amount
qtyIntSKU quantity
aging_dayIntInventory age (day)
warehouse_codestringWarehouse code in TNSL system

Leave a Reply

Your email address will not be published.