Gỡ nhãn khách hàng
POST/v2.0/oa/tag/rmfollowerfromtagGọi qua 360: POST https://partner.quantri360.com/v1/zalo/v2.0/oa/tag/rmfollowerfromtag
Endpoint ghi — thay đổi dữ liệu trên Zalo OA. Key phải được tạo với tick "Cho phép gọi API ghi", nếu không sẽ nhận 403 write_not_allowed. Mỗi lần gọi được ghi nhật ký.
Mô tả API
Gỡ nhãn người dùng khỏi OA. Ứng dụng cần được cấp quyền quản lý thông tin OA.
Request
Địa chỉ
POST https://partner.quantri360.com/v1/zalo/v2.0/oa/tag/rmfollowerfromtag
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 | 1173478676788457425 | OA_ID của Zalo OA brand đã nối (GET /v1/platforms). Mỗi brand một OA — có thể bỏ. |
| data | query | string (JSON) | {"offset":0,"count":10} | Nhiều API GET của Zalo nhận tham số gói trong data là chuỗi JSON — gửi nguyên như tài liệu Zalo. |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| user_id | body | long | Có | ID của người dùng cần gỡ nhãn. | |
| tag_name | body | string | Có | Tên của nhãn cần gỡ. |
Ví dụ request
curl -s -X POST "https://partner.quantri360.com/v1/zalo/v2.0/oa/tag/rmfollowerfromtag" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":0,"tag_name":""}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/zalo/v2.0/oa/tag/rmfollowerfromtag",
params={},
json={
"user_id": 0,
"tag_name": ""
},
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/zalo/v2.0/oa/tag/rmfollowerfromtag');
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({"user_id":0,"tag_name":""}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/zalo/v2.0/oa/tag/rmfollowerfromtag' . '?' . 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, '{"user_id":0,"tag_name":""}');
$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 Zalo OA)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| error | int | 0 = thành công; khác 0 xem `message` (Zalo trả HTTP 200 kèm mã lỗi). | |
| message | string | Thông điệp của Zalo. |
Mẫu phản hồi
{
"error":0,
"message": "Success"
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Official Account & khách hàng ở trang nền tảng
- Tạo API key (tick kênh Zalo OA)
- Gọi theo ví dụ ở trên