group/get.all
POST/extapi/v1/group/get.allGọi qua 360: POST https://partner.quantri360.com/v1/base_service/extapi/v1/group/get.all
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 NHÓM quy trình trên Base Service (vd "Vận hành", "Thời trang nữ"): mã nhóm, tên, người quản lý. Dùng để biết quy trình nào thuộc nhóm nào (group_id ở service/get.all).
- Không cần tham số. Phản hồi có trường
tokencủa từng đối tượng — là mã nội bộ của Base cho đối tượng, không phải khóa truy cập; không cần dùng.
Request
Địa chỉ
POST https://partner.quantri360.com/v1/base_service/extapi/v1/group/get.all
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 | heradg | Tên kết nối Base Service (GET /v1/platforms). Có thể bỏ khi chỉ nối một token. |
| username | body | string | nguyenvana | API ghi (tạo / sửa / thực thi / chuyển khối / giao người) chạy DƯỚI TÊN người dùng Base này — phải là người có quyền ở khối đó. |
Tham số request
Không có tham số riêng (ngoài tham số chung).
Ví dụ request
curl -s -X POST "https://partner.quantri360.com/v1/base_service/extapi/v1/group/get.all" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/base_service/extapi/v1/group/get.all",
params={},
json={},
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/base_service/extapi/v1/group/get.all');
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({}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/base_service/extapi/v1/group/get.all' . '?' . 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, '{}');
$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 Base Service)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| code | int | 1 | 1 = thành công · 0 = lỗi (HTTP luôn 200). |
| message | string | GET_DATA_SUCCESSFULLY | Mã thông điệp / lỗi. |
| groups | object[] | Mới tạo trước. | |
| id | string | 386 | Mã nhóm. |
| name | string | Vận hành | Tên nhóm. |
| username | string | nguyenvana | Người tạo. |
| owners | string[] | ["nguyenvana"] | Quản lý nhóm. |
| followers | string[] | [] | Người theo dõi. |
| since | string | 1787132072 | Ngày tạo (Unix giây). |
| status | string | 1 | 1 = đang dùng. |
| acl | object | Quyền của token với nhóm: manage, perform, view (1/0). | |
| … | Còn: hid, type, content, config, teams, last_update, custom_object. |
Mẫu phản hồi
{
"code": 1,
"message": "GET_DATA_SUCCESSFULLY",
"data": null,
"httpCode": "200",
"groups": [
{
"id": "386",
"name": "Vận hành",
"username": "nguyenvana",
"owners": [
"nguyenvana"
],
"followers": [],
"teams": [],
"since": "1787132072",
"status": "1",
"last_update": "1787132072",
"acl": {
"manage": 0,
"perform": 1,
"view": 0
}
},
{
"id": "383",
"name": "Thời trang nữ",
"username": "tranthib",
"owners": [
"tranthib"
],
"followers": [],
"teams": [],
"since": "1787125183",
"status": "1",
"last_update": "1787125183",
"acl": {
"manage": 0,
"perform": 1,
"view": 0
}
}
]
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Quy trình & khối ở trang nền tảng
- Tạo API key (tick kênh Base Service)
- Gọi theo ví dụ ở trên