Skip to main content

Customers by Province

Endpoint:

GET https://yourdomain.com/api/v6.1/account_report/customer_portrait_bar

Request Headers:

  • X-API-KEY: <API-KEY>
  • Cookie: <Session-Cookie>

Request Parameters:

  • fields (required):
    • distribution_account_province_bar
  • 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_bar?fields=distribution_account_province_bar&params[period]=this_month&params[limit]=50' \
--header 'X-API-KEY: <API-KEY>' \
--header 'Cookie: <Session-Cookie>' \
--data ''

Response Structure:

  • JSON includes:
    • data: a list containing:
      • labels: list of province/city names
      • series: list of objects including:
        • label: province name
        • value: number of customers

JSON Response Example:

{
"data": [
{
"labels": [
"Unknown",
"HANOI",
"NINH BINH",
"HA TINH",
"DAK LAK",
"LAM DONG"
],
"series": [
{"label": "Unknown", "value": 11983},
{"label": "HANOI", "value": 3},
{"label": "NINH BINH", "value": 13},
{"label": "HA TINH", "value": 25},
{"label": "DAK LAK", "value": 6},
{"label": "LAM DONG", "value": 1}
]
}
]
}

Note:

  • labels is a list of provinces/cities by customer category.
  • series indicates the corresponding number of customers in each locality.

Purpose of Use:

  • Monitor the concentration and dispersion of customers by region.
  • Support decision-making for marketing and business areas.