get /shops/{SHOP_ID}/order_call_laters
GET/shops/{SHOP_ID}/order_call_latersGọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/order_call_laters
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 hẹn gọi lại & nhắc nhở chăm sóc (gắn với khách / đơn): việc hôm nay, sắp tới, quá hạn, đã xong. Dùng để dựng danh sách việc cho nhân viên CSKH / telesale.
- Không truyền
keycũng trả danh sách (thử thật trả cùng bản ghi vớioverdue). - Phản hồi chứa tên, SĐT khách — chỉ lưu ở nơi có kiểm soát quyền.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/order_call_laters
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. |
| page_number | query | int | Không | 1 | |
| page_size | query | int | Không | 30 | |
| key | query | string | Không | today | Lọc nhanh: today (hẹn hôm nay) · upcoming (sau hôm nay) · overdue (quá hạn) · completed (đã xử lý). |
| status | query | int | Không | -1 | -1 tất cả · 0 Chưa xử lý · 3 Đang gọi / đang xử lý · 1 Đã xử lý · 2 Không nghe máy / không thành công · 7 Đã xóa. |
| start_needs_call | query | timestamp | Không | 1791997200 | Từ thời điểm hẹn gọi (Unix giây, tính cả mốc). Phải đi cùng end_needs_call. |
| end_needs_call | query | timestamp | Không | 1792083599 | Đến thời điểm hẹn gọi (Unix giây). |
| filter_by_time | query | string (JSON) | Không | Bộ lọc thời gian dạng chuỗi JSON trong MỘT tham số (URL-encode). |
Phân trang
page_number tăng dần tới khi data rỗng — thực tế total_entries / total_pages trả null.
Ví dụ request
curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/order_call_laters?page_number=1&page_size=30&key=overdue" \ -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/order_call_laters",
params={
"page_number": 1,
"page_size": 30,
"key": "overdue"
},
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/order_call_laters');
for (const [k, v] of Object.entries({"page_number":1,"page_size":30,"key":"overdue"})) 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/order_call_laters' . '?' . http_build_query(['page_number' => 1, 'page_size' => 30, 'key' => 'overdue']); $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 | |
| key | string | overdue | Bộ lọc nhanh đã áp (null khi không truyền). |
| page_number / page_size / total_entries / total_pages | int | null | Thực tế trả null. |
| data | object[] | Lịch hẹn. | |
| id | string | b64a9ef9-9e69-4424-a0d1-698049b654aa | Mã lịch hẹn. |
| type | string | note | Loại (vd `note`). |
| status | int | 0 | Mã trạng thái như tham số `status`. |
| needs_call_at | string | 2023-06-28T08:55:14 | Thời điểm cần gọi (UTC). |
| called_at | string | null | Đã gọi lúc. |
| call_number | int | null | Số lần gọi. |
| notice_created | string | resale | Ngữ cảnh tạo (vd `resale` = bán lại). |
| order_id / display_id | null | Đơn liên quan (nếu có). | |
| customer | object | Khách: id, name, customer_id, fb_id, psid. | |
| phone_number | string | 0901234567 | |
| creator | object | Người tạo: id, name… | |
| page_id / psid | string | Trang / khách Facebook. | |
| is_canceled / is_removed | bool | false | |
| inserted_at | string | 2023-06-28T08:25:32 | Giờ UTC. |
Mẫu phản hồi
{
"success": true,
"key": "overdue",
"page_number": null,
"page_size": null,
"total_entries": null,
"total_pages": null,
"data": [
{
"id": "b64a9ef9-9e69-4424-a0d1-698049b654aa",
"type": "note",
"status": 0,
"inserted_at": "2023-06-28T08:25:32",
"needs_call_at": "2023-06-28T08:55:14",
"called_at": null,
"call_number": null,
"notice_created": "resale",
"order_id": null,
"phone_number": "0901234567",
"customer": {
"id": "a1b2c3d4-…",
"name": "Khách hàng A"
},
"is_canceled": false
}
]
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Đơn hàng ở trang nền tảng
- Tạo API key (tick kênh Pancake POS)
- Gọi theo ví dụ ở trên