By Campaign
Endpoint:
GET https://yourdomain.com/api/v6.1/account_report/customer_portrait_pie
Request Headers:
X-API-KEY: <API-KEY>Cookie: <Session-Cookie>
Request Parameters:
fields(required):quantity_account_campaign_pie
params[period](optional):this_month(current month)
params[limit](optional):50(record limit)
CURL Request Example:
curl --location --globoff 'https://yourdomain.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: <API-KEY>'
Response Structure:
- JSON includes:
data: an array, where each element is a list of objects including:label: campaign namevalue: number of customers
JSON Response Example:
{
"data": [
[
{"label": "Campaign A", "value": 5000},
{"label": "Campaign B", "value": 300},
{"label": "Campaign C", "value": 150},
{"label": "Campaign D", "value": 100},
{"label": "Campaign E", "value": 50}
]
]
}
Note:
valueindicates the number of accounts belonging to each group.