nhanh.v3.0.customer.list
POST/v3.0/customer/listVia 360: POST https://partner.quantri360.com/v1/nhanh/v3.0/customer/list
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description
Danh sách khách hàng trên Nhanh: tên, SĐT, giới tính, ngày sinh, địa chỉ, điểm tích lũy, tổng tiền đã mua, cấp độ / nhóm khách. Dùng để đồng bộ tệp khách về CRM / loyalty — lần đầu quét toàn bộ, sau đó chỉ lấy khách thay đổi bằng updatedAtFrom / updatedAtTo.
- Trường để trống thường KHÔNG có trong phản hồi (gender, birthday, email, address…) — kiểm tra có khóa trước khi đọc.
- Object rỗng (
locations,location,level,group,business) trả về dạng MẢNG rỗng[], có dữ liệu mới là object — xử lý cả hai kiểu. updatedAt/updatedAtFrom/updatedAtTolà Unix giây (UTC);birthday,startedDatelà ngày dạng chuỗi.- Dữ liệu cá nhân của khách — key nên giới hạn đúng người cần dùng.
Request
Endpoint
POST https://partner.quantri360.com/v1/nhanh/v3.0/customer/list
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| 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 | 100001 | Gian hàng (lấy ở GET /v1/platforms → shops[].platform_shop_id). BẮT BUỘC khi brand có > 1 gian hàng trên nền tảng; 360 bỏ tham số này trước khi chuyển tiếp. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| filters.updatedAtFrom | body | int | No | 1793000000 | Unix giây — khách cập nhật từ thời điểm này (khuyến nghị cho đồng bộ định kỳ). |
| filters.updatedAtTo | body | int | No | 1793263000 | Unix giây. |
| filters.type | body | int | No | 1 | 1 Khách lẻ · 2 Khách sỉ · 3 Đại lý. |
| filters.ids | body | int[] | No | [158039597] | Id khách Nhanh, tối đa 100. |
| filters.mobile | body | string | No | 0901234567 | Tìm theo SĐT. |
| filters.lastBoughtDateFrom | body | string | No | 2026-10-01 | Ngày mua cuối từ (yyyy-mm-dd). |
| filters.lastBoughtDateTo | body | string | No | 2026-10-28 | Ngày mua cuối đến (yyyy-mm-dd). |
| paginator.size | body | int | No | 100 | Số khách mỗi trang — tối đa 100 (gửi lớn hơn vẫn chỉ trả 100). |
| paginator.next | body | object | No | {"id": 158039595} | Nguyên object paginator.next của trang trước; bỏ ở trang đầu. |
Pagination
Lặp khi phản hồi có paginator.next, gửi lại nguyên object đó; khách mới nhất (id lớn) trả trước.
Request examples
curl -s -X POST "https://partner.quantri360.com/v1/nhanh/v3.0/customer/list" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"filters":{"type":1,"updatedAtFrom":1793000000},"paginator":{"size":100}}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/nhanh/v3.0/customer/list",
params={},
json={
"filters": {
"type": 1,
"updatedAtFrom": 1793000000
},
"paginator": {
"size": 100
}
},
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/nhanh/v3.0/customer/list');
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: 'POST',
headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"filters":{"type":1,"updatedAtFrom":1793000000},"paginator":{"size":100}}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/nhanh/v3.0/customer/list' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"filters":{"type":1,"updatedAtFrom":1793000000},"paginator":{"size":100}}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;Response
Response fields (as returned by Nhanh.vn)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | int | 1 | 1 = thành công; 0 = lỗi (xem messages). |
| messages | string[] | [] | Thông điệp lỗi của Nhanh. |
| data | object[] | Dữ liệu. | |
| id | int | 158039597 | Id khách Nhanh. |
| type | int | 1 | 1 lẻ · 2 sỉ · 3 đại lý. |
| name | string | ||
| mobile | string | ||
| code | string | Mã khách (nếu có). | |
| gender | int | 2 | `1` = Nam · `2` = Nữ. Khách không khai thì THIẾU hẳn khóa. |
| birthday | string | 1989-03-11 | Ngày sinh yyyy-mm-dd — thiếu khóa khi không khai. |
| string | Thiếu khóa khi trống. | ||
| address | string | Thiếu khóa khi trống. | |
| points | int | 10346 | Điểm tích lũy hiện tại. |
| totalAmount | float | 1034600 | Tổng tiền khách đã mua. |
| startedDate | string | 2026-10-29 | Ngày bắt đầu mua (yyyy-mm-dd). |
| locations | object | Địa giới hệ cũ 3 cấp: {cityId, districtId, wardId} — id theo /v3.0/shipping/location bản v1. | |
| location | object | Địa giới hệ mới 2 cấp: {cityId, wardId} — bản v2. | |
| level | object | {id, name} — cấp độ khách. | |
| group | object | {id, name} — nhóm khách. | |
| business | object | {name, address} — công ty (khách sỉ / đại lý). | |
| saleName | string | Nhân viên phụ trách. | |
| taxCode | string | ||
| description | string | Ghi chú. | |
| updatedAt | int | 1793263003 | Lần cập nhật cuối — Unix giây. |
| frequencyBought | int | 0 | |
| daysNotBought | int | 0 | |
| paginator | object | Phân trang. | |
| next | object | {"id": 158039595} | Gửi lại nguyên ở request kế; không có = hết. |
Response sample
{
"code": 1,
"paginator": {
"next": {
"id": 158039595
}
},
"data": [
{
"id": 158039597,
"type": 1,
"name": "nguoimua123",
"mobile": "0901234567",
"points": 10346,
"startedDate": "2026-10-29",
"locations": [],
"location": [],
"business": [],
"level": [],
"group": [],
"totalAmount": 1034600,
"updatedAt": 1793263003,
"frequencyBought": 0,
"daysNotBought": 0
},
{
"id": 158039398,
"type": 1,
"name": "nguoimua456",
"mobile": "0912345678",
"gender": 2,
"address": "Số 1 đường ABC, Phường XYZ, Hà Nội",
"birthday": "1989-03-11",
"points": 0,
"startedDate": "2026-10-26",
"locations": {
"cityId": 258,
"districtId": 425,
"wardId": 4621
},
"location": [],
"business": [],
"level": [],
"group": [],
"totalAmount": 0,
"updatedAt": 1792986118,
"frequencyBought": 0,
"daysNotBought": 0
}
]
}
Get started
- Sign up for Partner
- Enable a data type of the Khách hàng group on the platform page
- Create an API key (tick the Nhanh.vn channel)
- Call it as in the examples above