Get shop
GET/shops/{SHOP_ID}Gọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}
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
Thông tin MỘT cửa hàng (cùng dạng một phần tử của GET /shops): tên, tiền tệ, các trang gộp. Dùng để kiểm tra kết nối còn sống và lấy tiền tệ cửa hàng.
- Với API key của cửa hàng, tài khoản tạo key cần quyền cấu hình cửa hàng; thiếu quyền thì Pancake từ chối.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}
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 | integer | Có | 1234567 | Mã cửa hàng đã nối với 360. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567" \ -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",
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');
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' . '?' . 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 | |
| shop | object | Cửa hàng. | |
| id | int | 1234567 | SHOP_ID. |
| name | string | Cửa hàng Online | Tên. |
| currency | string | VND | Tiền tệ. |
| pages | object[] | Trang gộp: id, name, username, platform, settings, shop_id, phone_number. | |
| avatar_url | string | ||
| preferred_shop | int | ||
| link_post_marketer | object[] | [] |
Mẫu phản hồi
{
"success": true,
"shop": {
"id": 1234567,
"name": "Cửa hàng Online",
"currency": "VND",
"pages": [
{
"id": "871110146500000",
"name": "Cửa hàng Online",
"username": "cuahang.official",
"platform": "facebook",
"shop_id": 1234567,
"phone_number": null,
"settings": {
"auto_create_order": false
}
}
],
"avatar_url": null,
"preferred_shop": null,
"link_post_marketer": []
}
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Khác ở trang nền tảng
- Tạo API key (tick kênh Pancake POS)
- Gọi theo ví dụ ở trên