get /shops/{SHOP_ID}/products/{PRODUCT_SKU}
GET/shops/{SHOP_ID}/products/{PRODUCT_SKU}Gọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/products/{PRODUCT_SKU}
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
Chi tiết MỘT sản phẩm kèm toàn bộ mẫu mã (giá, mã vạch, thuộc tính, tồn theo kho). Dùng khi cần đọc đủ các biến thể của một mã sản phẩm, vd đồng bộ một sản phẩm vừa sửa.
- Không tìm thấy → HTTP 200
{"message":"Product not found","success":false}— kiểmsuccess.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/products/{PRODUCT_SKU}
Xác thực & gian hàng
| Tên | Vị trí | Kiểu | Mẫu | Mô tả |
|---|---|---|---|---|
| Authorization | header | header | Bearer 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_id | query | string | 1234567 | SHOP_ID đã nối — có thể bỏ khi đường dẫn có /shops/{SHOP_ID}. |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| SHOP_ID | path | int | Có | 1234567 | Mã cửa hàng đã nối với 360. |
| PRODUCT_SKU | path | string | Có | WT20035J | Mã sản phẩm (product_id dạng UUID) HOẶC mã sản phẩm người bán đặt (custom_id, vd WT20035J). Không nhận mã vạch hay display_id số. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/products/WT20035J" \ -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/WT20035J",
params={},
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/WT20035J');
for (const [k, v] of Object.entries({})) 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/WT20035J' . '?' . http_build_query([]); $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ên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| success | bool | true | |
| data | object | Sản phẩm. | |
| id | string | cf288440-ef56-493b-832b-9006ecff172f | Mã sản phẩm. |
| name | string | Chân váy A khóa sau/WT20035J/Đ18 | |
| custom_id | string | WT20035J | Mã sản phẩm người bán đặt. |
| display_id | int | 7262 | Số thứ tự hiển thị. |
| type | string | product | `product` · `accessory` (phụ kiện đi kèm, giá 0). |
| categories | int[] | [] | Danh mục. |
| tags | int[] | [] | Thẻ sản phẩm. |
| brand_id | string | Thương hiệu. | |
| product_attributes | object[] | [] | |
| measure_group_id | int | null | Nhóm đơn vị tính. |
| is_published | bool | null | Đăng trên Store cake. |
| inserted_at | string | 2025-04-03T14:09:25 | UTC. |
| variations | object[] | Mẫu mã — cùng cấu trúc phần tử /products/variations (id, display_id, barcode, fields, retail_price, remain_quantity, variations_warehouses…). | |
| … | Còn: note, note_product, bonus_products, materials, supplier_product_ids, limit_quantity_to_warn, warning_by_variation… |
Mẫu phản hồi
{
"success": true,
"data": {
"id": "cf288440-ef56-493b-832b-9006ecff172f",
"name": "Chân váy A khóa sau/WT20035J/Đ18",
"custom_id": "WT20035J",
"display_id": 7262,
"type": "product",
"categories": [],
"tags": [],
"brand_id": "950f8fc6-6260-4dc9-8594-392489920efa",
"inserted_at": "2025-04-03T14:09:25",
"variations": [
{
"id": "2403ccf4-6da8-4ec4-b738-22394755189c",
"display_id": "1",
"barcode": "16199714",
"retail_price": 698000,
"fields": [],
"remain_quantity": 0,
"variations_warehouses": [
{
"warehouse_id": "6d1b3245-31a2-4d2b-a3c1-c96f5c8bc76e",
"remain_quantity": 0,
"actual_remain_quantity": 0,
"total_quantity": 0
}
]
}
]
}
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Sản phẩm ở trang nền tảng
- Tạo API key (tick kênh Pancake POS)
- Gọi theo ví dụ ở trên