By campaign
Customer count by campaign (pie chart data).
GET/api/v6.1/account_report/customer_portrait_pie
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Yes | quantity_account_campaign_pie | |
params[period] | No | this_month (current month) | |
params[limit] | No | 50 (maximum number of records) |
Example request
curl --location --globoff 'https://example.getflycrm.com/api/v6.1/account_report/customer_portrait_pie?fields=quantity_account_type_pie¶ms[period]=this_month¶ms[limit]=50' \
--header 'X-API-KEY: <your_api_key>'
Response
200 OK
{
"data": [
[
{"label": "Chiến dịch A", "value": 5000},
{"label": "Chiến dịch B", "value": 300},
{"label": "Chiến dịch C", "value": 150},
{"label": "Chiến dịch D", "value": 100},
{"label": "Chiến dịch E", "value": 50}
]
]
}
- The JSON contains:
data: an array where each element is a list of objects with:label: campaign namevalue: number of customers
Notes
valueis the number of accounts in each group.