Trạng thái Mối quan hệ
Endpoint:
GET https://yourdomain.com/api/v6.1/account_report/account_overview/relation_pie
Request Headers:
X-API-KEY: <API-KEY>
Tham số Request:
params[period]
(tuỳ chọn):this_month
(tháng hiện tại)
params[report_mode]
(tuỳ chọn):cumulative
(chế độ báo cáo :cumulative, real_time)
Ví dụ Request CURL:
curl --location --globoff 'https://yourdomain.com/api/v6.1/account_report/account_overview/relation_pie?params[period]=this_month¶ms[report_mode]=cumulative' \
--header 'X-API-KEY: <API-KEY>' \
--data ''
Cấu trúc Phản hồi:
- JSON gồm:
data
: danh sách các đối tượng:label
: tên trạng thái khách hàngvalue
: số lượng khách hàng theo trạng tháimeta.class
: mã màu hoặc phân loại giao diện
Ví dụ Phản hồi JSON:
{
"data": [
[
{"label": "Trạng thái A", "value": 20, "meta": {"class": "color-class-a"}},
{"label": "Trạng thái B", "value": 5, "meta": {"class": "color-class-b"}},
{"label": "Trạng thái C", "value": 0, "meta": {"class": "color-class-c"}}
]
]
}