VI | EN
Message us on Messenger
Developer resources

This API is designed for sellers using Fulfillment Mapping and their ERP systems — Shopee API

v2.sbs.get_fulfillment_mapping_inventory_list · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

v2.sbs.get_fulfillment_mapping_inventory_list

GET/api/v2/sbs/get_fulfillment_mapping_inventory_listVia 360: GET https://partner.quantri360.com/v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list
Description

Tra cứu tồn kho và liên kết của SKU cha / SKU combo qua MTSKU tại kho Shopee, dành cho người bán dùng Fulfillment Mapping.

  • Gọi qua /v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list với Authorization: Bearer <key>; dùng platform_shop_id khi có nhiều shop. 360 tự gắn partner_id, shop_id, sign và access_token.
  • API chỉ đọc; error rỗng mới là thành công. HTTP 200 vẫn có thể chứa lỗi nghiệp vụ trong error/message.
  • Chỉ có dữ liệu khi gian hàng có hàng ở kho Shopee; gian hàng tự giữ hàng nhận danh sách rỗng hoặc null.
  • Dành cho người bán dùng Fulfillment Mapping; phân trang bằng next_cursor.

Request

Endpoint

GET https://partner.quantri360.com/v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer q360_live_ab12cd34_…Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand.
platform_shop_idquerystring100001Gian hàng (lấy ở GET /v1/platforms → shops[].platform_shop_id). BẮT BUỘC khi brand có > 1 gian hàng trên nền tảng; 360 bỏ tham số này trước khi chuyển tiếp.

Request parameters

NameInTypeRequiredSampleDescription
mtsku_idsquerystringNoTối đa 100 MTSKU cha hoặc combo, phân cách bằng dấu phẩy, cùng thuộc gian hàng. Bỏ qua để lấy các liên kết có tồn combo. Với A = B + C, truy vấn A, B hoặc C đều trả thông tin combo A và các SKU cha tương ứng.
page_sizequeryint64No10Số bản ghi mỗi trang; từ 1 đến 100; mặc định 100.
next_cursorquerystringNoCon trỏ trang tiếp; bỏ trống để lấy trang đầu. Nếu phản hồi khác rỗng, gửi lại giá trị đó để lấy trang tiếp.

Request examples

curl -s "https://partner.quantri360.com/v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list?page_size=10" \
  -H "Authorization: Bearer $KEY"
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.get(
    "https://partner.quantri360.com/v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list",
    params={
        "page_size": 10
    },
    headers={"Authorization": f"Bearer {KEY}"},
    timeout=60,
)
print(r.status_code)
print(r.json())
Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list');
for (const [k, v] of Object.entries({"page_size":10})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
  method: 'GET',
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/shopee/api/v2/sbs/get_fulfillment_mapping_inventory_list' . '?' . http_build_query(['page_size' => 10]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]);
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;

Response

Response fields (as returned by Shopee)

Gian hàng không dùng kho Shopee: response.list rỗng; phản hồi có total và next_cursor.

NameTypeSampleDescription
request_idstringd52ca43b277a4f9292fb8be658bfd33dMã request của Shopee để tra lỗi.
errorstringMã lỗi Shopee; rỗng = thành công.
messagestringMô tả lỗi.
warningstringChi tiết cảnh báo; rỗng khi không có cảnh báo.
responseobjectKết quả truy vấn.
listobject[]Danh sách kết quả.
bundle_mtsku_idstring100003_100004Mã MTSKU của SKU combo.
mapping_typeint641Loại liên kết: 1 nhóm; 2 túi may mắn; 3 danh sách liên kết.
whs_idstringVN-DEMOMã kho Shopee.
stock_contextobjectChi tiết tồn kho.
physical_sellable_stockint640Tồn thực tế có thể bán của MTSKU combo, chưa cộng lượng quy đổi từ liên kết.
mapping_sellable_stockint647Tồn có thể bán được tính bằng quy đổi từ các MTSKU cha.
parent_mtsku_listobject[]Danh sách MTSKU cha.
parent_mtsku_idstring100001_100002Mã MTSKU của SKU cha trong liên kết.
parent_mtsku_stockint6414Tồn thực tế có thể bán của MTSKU cha tại kho, chưa nhân hệ số mapping_formula. Ví dụ cần 2 SKU A cho một combo, tồn A là 14 thì trường này vẫn là 14, đủ tạo 7 combo.
mapping_formulastring2 * 100001_100002Công thức thành phần hoặc phương án thay thế của combo: số trước MTSKU là lượng cần; + yêu cầu tất cả thành phần; [] chứa các phương án thay thế, phân cách bằng dấu phẩy. Ví dụ nhóm: 2 * MTSKU_A + 1 * MTSKU_B; danh sách: [2 * MTSKU_A + 1 * MTSKU_B, 1 * MTSKU_C]; túi may mắn: 2 * MTSKU_A.
totalint641Tổng số bản ghi thỏa điều kiện.
next_cursorstringCon trỏ trang tiếp; bỏ trống để lấy trang đầu. Nếu phản hồi khác rỗng, gửi lại giá trị đó để lấy trang tiếp.

Response sample

{
  "request_id": "demo-request",
  "error": "",
  "message": "",
  "warning": "",
  "response": {
    "list": [
      {
        "bundle_mtsku_id": "100003_100004",
        "mapping_type": 1,
        "whs_id": "VN-DEMO",
        "stock_context": {
          "physical_sellable_stock": 0,
          "mapping_sellable_stock": 7,
          "parent_mtsku_list": [
            {
              "parent_mtsku_id": "100001_100002",
              "parent_mtsku_stock": 14
            }
          ]
        },
        "mapping_formula": "2 * 100001_100002"
      }
    ],
    "total": 1,
    "next_cursor": ""
  }
}

Shopee error codes (9)

Show
CodeMeaning
invalid_paramTham số yêu cầu không hợp lệ; xem message.
invalid_requestKhông phân tích được yêu cầu.
server_internal_errorMáy chủ gặp lỗi nội bộ; thử lại sau hoặc liên hệ hỗ trợ.
error_authỦy quyền gian hàng cho 360 đã hết hạn hoặc bị thu hồi (360 đã tự làm mới token một lần) — chủ gian hàng kết nối lại Shopee trong Partner.
error_paramTham số sai / thiếu / sai kiểu — xem `message` để biết tham số nào.
error_limitChạm hạn mức gọi Shopee trong ngày của kết nối — 360 trả kèm thời điểm thử lại; giảm tần suất gọi.
error_rate_limitGọi quá nhanh — chờ vài giây rồi gọi lại (360 cũng giới hạn theo key: 429 + Retry-After).
shop_bannedGian hàng đang bị Shopee khóa — mọi API tạm ngưng tới khi gỡ khóa.
error_kyc_authGian hàng chưa hoàn tất đăng ký người bán trên Kênh Người Bán.

Get started

  1. Sign up for Partner
  2. Enable a data type of the Tồn kho group on the platform page
  3. Create an API key (tick the Shopee channel)
  4. Call it as in the examples above