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

Lot list (expiry date) — API Pancake POS

get /shops/{SHOP_ID}/lots · 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}/lots

GET/shops/{SHOP_ID}/lotsGọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/lots
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 lô hàng có hạn sử dụng (sản phẩm loại LOT): mã lô, ngày sản xuất, hạn dùng, mẫu mã gắn lô. Dùng cho ngành mỹ phẩm / thực phẩm để cảnh báo lô sắp hết hạn.

  • Các bộ lọc dạng JSON gửi thành CHUỖI trong query (mã hóa URL).
  • Gọi thật trên cửa hàng thời trang không dùng lô: HTTP 200, 0 lô.

Request

Địa chỉ

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

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_IDpathintegerCó1234567Mã cửa hàng đã nối với 360.
pagequeryintKhông1
page_sizequeryintKhông30
searchquerystringKhôngLO-XATìm theo mã lô, mã sản phẩm hoặc mã mẫu mã.
warehouse_ids[]querystring[]Không6d1b3245-…Lọc lô có tồn ở các kho này; lặp tham số cho nhiều kho.
expiry_datequerystringKhôngin_dateLọc theo hạn dùng (chỉ lô còn hàng bán được), vd in_date = còn hạn.
rangequerystring (JSON)Không{"key":"expire","since":1759276800,"until":1767225599}Khoảng thời gian, key = mốc lọc; since / until Unix giây.
sort_fieldquerystring (JSON)Không{"field":"exp","order":"ascend"}field: mfg ngày SX · exp hạn dùng…
remain_quantityquerystring (JSON)Không{"type":"greaterOrEqual","value":1}Lọc theo SL bán được của lô.

Phân trang

Tăng page tới total_pages.

Ví dụ request

curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/lots?page=1&page_size=30&expiry_date=in_date" \
  -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/lots",
    params={
        "page": 1,
        "page_size": 30,
        "expiry_date": "in_date"
    },
    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/lots');
for (const [k, v] of Object.entries({"page":1,"page_size":30,"expiry_date":"in_date"})) 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/lots' . '?' . http_build_query(['page' => 1, 'page_size' => 30, 'expiry_date' => 'in_date']);
$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
dataobject[]Lô.
idstringID lô.
custom_idstringLO-2026-01Mã lô.
manufacturing_datestringNgày SX (UTC).
expire_datestringHạn dùng (UTC).
productobjectSản phẩm của lô.
lot_variationsobject[]Mẫu mã gắn lô: id, variation_id.
inserted_at / updated_atstring
page_number / page_size / total_pages / total_entriesint

Mẫu phản hồi

{
  "success": true,
  "data": [],
  "page_size": 30,
  "total_pages": 1,
  "page_number": 1,
  "total_entries": 0
}

Bắt đầu dùng

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