Skip to main content

By campaign

Customer count by campaign (pie chart data).

GET/api/v6.1/account_report/customer_portrait_pie

Query parameters​

ParameterTypeRequiredDescription
fieldsYesquantity_account_campaign_pie
params[period]Nothis_month (current month)
params[limit]No50 (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&params[period]=this_month&params[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 name
      • value: number of customers

Notes​

  • value is the number of accounts in each group.