Skip to main content

Relationship Status

Endpoint:

GET https://yourdomain.com/api/v6.1/account_report/account_overview/relation_pie

Request Headers:

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

Request Parameters:

  • params[period] (optional):
    • this_month (current month)
  • params[report_mode] (optional):
    • cumulative (report mode: cumulative, real_time)

CURL Request Example:

curl --location --globoff 'https://yourdomain.com/api/v6.1/account_report/account_overview/relation_pie?params[period]=this_month&params[report_mode]=cumulative' \
--header 'X-API-KEY: <API-KEY>' \
--data ''

Response Structure:

  • JSON includes:
    • data: list of objects:
      • label: customer status name
      • value: number of customers by status
      • meta.class: color code or interface classification

JSON Response Example:

{
"data": [
[
{"label": "Status A", "value": 20, "meta": {"class": "color-class-a"}},
{"label": "Status B", "value": 5, "meta": {"class": "color-class-b"}},
{"label": "Status C", "value": 0, "meta": {"class": "color-class-c"}}
]
]
}

Note:

  • label represents relationship statuses such as: New, Approaching, Potential, Lost, Closed...
  • meta.class is a CSS class used to change the interface color on the frontend.

Purpose of Use:

  • Draw a pie chart based on the customer status ratio.
  • Quickly view the status and distribution of the customer pipeline.
  • Monitor movement in the customer care and sales process.