VI | EN
Nhắn Messenger
Dành cho developer

Product list — API Pancake POS

get /shops/{SHOP_ID}/products/variations · gọi qua Quantri360 bằng một API key cho chính tài khoản / tài sản bạn đã kết nối và ủy quyền — 360 lo việc ký request và làm mới phiên đăng nhập bạn đã cấp.

get /shops/{SHOP_ID}/products/variations

GET/shops/{SHOP_ID}/products/variationsGọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/products/variations
Sắp mở. API này đã chạy thật qua 360 và đang được chốt giá — bạn có thể đọc tài liệu và chuẩn bị tích hợp trước.
Mô tả API

Danh sách MẪU MÃ (biến thể / SKU) kèm sản phẩm cha, giá bán, giá nhập, tồn kho theo từng kho (có thể bán, thực có, chờ giao, đang hoàn, giữ chỗ), cờ sắp hết hàng. Dùng để đồng bộ danh mục + tồn kho về hệ thống của bạn, cảnh báo hết hàng, so tồn đa kênh.

  • product.display_id ở API này là MÃ SẢN PHẨM người bán đặt (vd WT20035J) — trong API chi tiết sản phẩm, mã đó nằm ở custom_id, còn display_id là số thứ tự (vd 7262).
  • Bộ lọc tồn kho nhận chuỗi JSON trong MỘT tham số (URL-encode), không phải tham số lồng.
  • Tiền là số nguyên VND; mẫu mã chưa nhập giá có retail_price: 0.

Request

Địa chỉ

GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/products/variations

Xác thực & gian hàng

TênVị tríKiểuMẫuMô tả
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_idquerystring1234567SHOP_ID đã nối — có thể bỏ khi đường dẫn có /shops/{SHOP_ID}.

Tham số request

TênVị tríKiểuBắt buộcMẫuMô tả
SHOP_IDpathintCó1234567Mã cửa hàng đã nối với 360.
page_numberqueryintKhông1
page_sizequeryintKhông100Số mẫu mã / trang (thử thật 1000 vẫn nhận; nên ≤ 1000 cho phản hồi nhẹ).
searchquerystringKhôngWT20035JTìm theo tên / mã.
remainQuantityquerystring (JSON)Không{"type":"greaterOrEqual","value":1}Lọc theo tồn CÓ THỂ BÁN: chuỗi JSON type = greaterOrEqual | smallerOrEqual | between (dùng minValue / maxValue). Cùng cấu trúc: actualQuantity (tồn thực), waittingQuantity (chờ giao — đúng chính tả này), returningQuantity, pendingQuantity, totalQuantity.
nearly_outqueryboolKhôngtrueChỉ mẫu mã bị đánh dấu sắp hết ở ít nhất một kho. Tương tự: limit_quantity_to_warn=true (chạm ngưỡng cảnh báo), defectQuantity=true (có hàng lỗi).
product_statusquerystringKhôngnot_lockedlocked · not_locked.
selling_statusquerystringKhôngnormalTốc độ bán: none · bad · normal · star.
category_id[]queryint[]Không614041900Lọc danh mục (lặp tham số).
startDate / endDatequerytimestampKhông1790787600Khoảng tạo sản phẩm (Unix giây).
start_time_update / end_time_updatequerytimestampKhông1790787600Khoảng cập nhật sản phẩm (Unix giây) — dùng cho đồng bộ tăng dần.
variation_ids[]querystring[]Không5c49d772-a1e1-49ef-9f43-78539d396363Lấy đúng các mẫu mã này.
warehouse_untilquerystringKhông2026-10-01T00:00:00ZTồn kho tại một thời điểm trong quá khứ.

Phân trang

page_number = 1 … total_pages.

Ví dụ request

curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/products/variations?page_number=1&page_size=100&remainQuantity=%7B%22type%22%3A%22greaterOrEqual%22%2C%22value%22%3A1%7D" \
  -H "Authorization: Bearer $KEY"
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.get(
    "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/products/variations",
    params={
        "page_number": 1,
        "page_size": 100,
        "remainQuantity": "{\"type\":\"greaterOrEqual\",\"value\":1}"
    },
    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/pancake_pos/shops/1234567/products/variations');
for (const [k, v] of Object.entries({"page_number":1,"page_size":100,"remainQuantity":"{\"type\":\"greaterOrEqual\",\"value\":1}"})) 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/pancake_pos/shops/1234567/products/variations' . '?' . http_build_query(['page_number' => 1, 'page_size' => 100, 'remainQuantity' => '{"type":"greaterOrEqual","value":1}']);
$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

Tham số phản hồi (nguyên của Pancake POS)

TênKiểuMẫuMô tả
successbooltrue
page_number / page_sizeint1 / 100
total_entriesint27283Tổng mẫu mã khớp lọc.
total_pagesint273
dataobject[]Mẫu mã.
idstring5c49d772-a1e1-49ef-9f43-78539d396363Mã mẫu mã (variation_id trên đơn).
display_idstring2Mã hiển thị của mẫu mã trong sản phẩm.
barcodestring16199713Mã vạch.
product_idstringcf288440-ef56-493b-832b-9006ecff172fSản phẩm cha.
productobjectSản phẩm cha: name, display_id (mã SP người bán đặt, vd `WT20035J`), categories, tags, brand_id, image, note…
fieldsobject[][]Thuộc tính (màu, size…): name, value.
retail_priceint698000Giá bán (VND).
retail_price_after_discountint698000Giá sau giảm.
price_at_counterint0Giá tại quầy.
last_imported_price / average_imported_priceint0Giá nhập gần nhất / bình quân.
total_purchase_priceint0
wholesale_priceobject[][{"levelProduct":"1","wholesalePrices":"0"}]Giá sỉ theo cấp.
remain_quantityint1Tồn có thể bán (cộng mọi kho).
variations_warehousesobject[]Tồn theo kho: warehouse_id, remain_quantity (có thể bán), actual_remain_quantity (thực có), total_quantity, waiting_quantity (chờ giao), returning_quantity, pending_quantity, shelf_position…
warehouse_idsstring[]Kho có hàng.
weightint0Gram.
imagesstring[]
is_locked / is_hidden / is_removedboolfalse
is_composite / composite_productsSản phẩm cấu thành.
inserted_at / updated_atstring2025-12-09T06:39:23.869731Giờ UTC.

Mẫu phản hồi

{
  "success": true,
  "page_number": 1,
  "page_size": 1,
  "total_entries": 9252,
  "total_pages": 9252,
  "data": [
    {
      "id": "5c49d772-a1e1-49ef-9f43-78539d396363",
      "display_id": "2",
      "barcode": "16199713",
      "product_id": "cf288440-ef56-493b-832b-9006ecff172f",
      "retail_price": 698000,
      "retail_price_after_discount": 698000,
      "last_imported_price": 0,
      "average_imported_price": 0,
      "remain_quantity": 1,
      "weight": 0,
      "fields": [],
      "warehouse_ids": [
        "6d1b3245-31a2-4d2b-a3c1-c96f5c8bc76e"
      ],
      "product": {
        "name": "Chân váy A khóa sau/WT20035J/Đ18",
        "display_id": "WT20035J",
        "categories": [],
        "tags": [],
        "brand_id": "950f8fc6-6260-4dc9-8594-392489920efa"
      },
      "variations_warehouses": [
        {
          "warehouse_id": "6d1b3245-31a2-4d2b-a3c1-c96f5c8bc76e",
          "remain_quantity": 1,
          "actual_remain_quantity": 1,
          "total_quantity": 1,
          "waiting_quantity": 0,
          "returning_quantity": 0,
          "pending_quantity": 0
        }
      ],
      "is_locked": false,
      "is_hidden": false,
      "inserted_at": "2025-12-09T06:39:23.869731"
    }
  ]
}

Bắt đầu dùng

  1. Đăng ký tài khoản Partner
  2. Mở loại dữ liệu thuộc nhóm Sản phẩm ở trang nền tảng
  3. Tạo API key (tick kênh Pancake POS)
  4. Gọi theo ví dụ ở trên