get /shops/{SHOP_ID}/promotion_advance
GET/shops/{SHOP_ID}/promotion_advanceGọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/promotion_advance
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 chương trình khuyến mãi nâng cao: loại, thời gian, kho / nguồn đơn / thẻ khách áp dụng, sản phẩm áp dụng, quà tặng, mức giảm theo giá trị đơn. Dùng để đối chiếu giá bán thực với chương trình đang chạy.
- Gọi thật trên cửa hàng thử: HTTP 200, data rỗng, phân trang null.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/promotion_advance
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. |
| page | query | int | Không | 1 | |
| page_size | query | int | Không | 10 | |
| textSearch | query | string | Không | áo sơ mi | Tìm theo tên. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/promotion_advance?page=1&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/pancake_pos/shops/1234567/promotion_advance",
params={
"page": 1,
"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/pancake_pos/shops/1234567/promotion_advance');
for (const [k, v] of Object.entries({"page":1,"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/pancake_pos/shops/1234567/promotion_advance' . '?' . http_build_query(['page' => 1, '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
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[] | Khuyến mãi. | |
| id / display_id | string | ||
| name | string | ||
| type | string | Loại KM. | |
| start_time / end_time | string | ||
| is_activated | bool | ||
| warehouse_ids / customer_tags / order_sources | Phạm vi áp dụng. | ||
| items | object[] | SP / mẫu mã áp dụng. | |
| bonus_items | object[] | Quà tặng. | |
| level_order_prices / arr_level_promotion | object[] | Bậc giảm. | |
| is_free_shipping | bool | ||
| priority_level | int | ||
| page_number / page_size / total_pages / total_entries | null | Gọi thật: null. |
Mẫu phản hồi
{
"success": true,
"data": [],
"page_size": null,
"total_pages": null,
"page_number": null,
"total_entries": null
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Bán hàng & quảng cáo ở trang nền tảng
- Tạo API key (tick kênh Pancake POS)
- Gọi theo ví dụ ở trên