Skip to content

Getting agent customers

Getting agent customers

Method get.customers
Description Getting agent customers
Available to Partner

Archived customers do not appear in the list.

Request parameters

Name Type Required Description
access_token string yes Authentication session key
limit number no Number of records returned. See section "Paging"
offset number no Offset defining the record number from which to return "limit" records. Default is "0". See section "Paging"
filter object no See section "Filtering criteria"
fields array no See section "Viewing returned data"
sort array no See section "Sorting data"

Response parameters

Name Type Valid values Filtering Sorting Description
id number yes Unique customer identifier
name string yes Customer name
description string Description of the customer
creation_date_time iso8601 YYYY-MM-DD hh:mm:ss yes Date and time of customer creation
status enum waiting, active, manual_lock, limit_lock, debt_lock yes yes Customer status
status_change_date_time iso8601 YYYY-MM-DD hh:mm:ss Date and time of the status change
monthly_base_limit number Total monthly limit. The value is specified in monetary units.
monthly_base_notify_limit number Threshold of the total monthly base limit; when it is reached, a notification is sent to the addresses specified in the "monthly_base_notify_email" parameter
monthly_base_notify_emails array Email addresses that receive notifications when the total monthly limit is reached
monthly_calls_limit number Monthly call limit. The value is specified as a number of calls.
monthly_calls_notify_limit number Threshold of the monthly call limit; when it is reached, a notification is sent to the addresses specified in the "monthly_calls_notify_email" parameter
monthly_calls_notify_emails array Email addresses that receive notifications when the monthly call limit is reached
daily_calls_limit number Daily call limit. The value is specified as a number of calls.
daily_calls_notify_limit number Threshold of the daily call limit; when it is reached, a notification is sent to the addresses specified in the "daily_calls_notify_email" parameter
daily_calls_notify_emails array Email addresses that receive notifications when the daily call limit is reached
List of customer sites
sites array List of customer sites
site_id number Unique site identifier
site_domain_name string Site domain name
Tariff plan
tariff_plan_id number yes Unique identifier of the tariff plan
tariff_plan_name string yes Tariff plan name

JSON request structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "method": "get.customers",
    "params": {
        "access_token": "string",
        "offset": "number",
        "limit": "number",
        "filter": {},
        "sort": [
            { "field": "string", "order": "string" }
        ],
        "fields": [ "string" ]
    }
}

JSON response structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {},
        "data": [
            {
                "id": "number",
                "name": "string",
                "description": "string",
                "creation_date_time": "iso8601",
                "status": "enum",
                "status_change_date_time": "iso8601",
                "tariff_plan_id": "number",
                "tariff_plan_name": "string",
                "monthly_base_limit": "number",
                "monthly_base_notify_limit": "number",
                "monthly_base_notify_emails": [ "item" ],
                "monthly_calls_limit": "number",
                "monthly_calls_notify_limit": "number",
                "monthly_calls_notify_emails": [ "item" ],
                "daily_calls_limit": "number",
                "daily_calls_notify_limit": "number",
                "daily_calls_notify_emails": [ "item" ],
                "sites": [
                    {
                        "site_domain_name": "string",
                        "site_id": "number"
                    }
                ]
            }
        ]
    }
}

List of returned errors

See the section "List of errors for the get methods".