Get account

The Get account method returns account details for the current reseller or any of its downstream resellers.

An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating Manager's information

The manager's API token specified in an API request determines:

  • The role and access level of the manager, which determine the availability of a method.
  • The current reseller and downstream resellers accessible within a method.

GET {base_url}/api/v3/resellers/{reseller_id}/accounts/{account_id}

Arguments

Name

Parameter type

Data type

Required/Optional

Description

X-Api-TokenheaderstringRequiredAPI token of a manager that performs the operation (see Viewing and updating Manager's information)
Content-TypeheaderstringRequiredMedia type of the request. Specify the following: application/vnd.api+json
AcceptheaderstringRequired

Supported media types of the answer. Specify the following: application/vnd.api+json

base_urlpathstringRequiredActivePlatform URL
reseller_idpathintegerRequiredID of the current reseller or any of its downstream resellers (see Viewing and updating Reseller general information)

account_id

pathintegerRequiredID of the account

Response model

Name

Data type

Description

dataobjectResponse data


id

integer

Account ID

typestringData type

attributesobjectAccount information


created_at

date

Date and time of account creation


updated_at

date

Data and time of account last update


reseller_idintegerID of the account's reseller


namestringAccount name


account_class_idintegerAccount class ID


primary_namestringPrimary name of the account. For example, a company name


first_name

string

The first name of the contract person


middle_name

string

The middle name of the contract person


last_name

string

The last name of the contract person


countrystring

Contact information: a two-letter ISO code ISO 3166-1 alpha-2 of the country



regionstringContact information: Region


citystringContact information: City


streetstringContact information: Street


buildingstringContact information: Building


officestringContact information: Office


zipstringContact information: Zip-code


phonestring

Contact information: Phone number:

  • + < country code > < city code or network code > < phone number >.
  • 00 < country code > < city code or network code > < phone number >.


email

string

Email of the contract person


status

string

Account status (see Viewing and updating an Account's details for the list of statuses)



balancestringTotal account balance as a sum of available funds (see usable_balance) and blocked сharges


usable_balancestringAvailable funds on the account balance


current_debt

floatCurrent debt of the account for all postpaid subscriptions


subscription_credit_limit

floatThe value of the subscription credit limit for the account that is set in the account class or redefined on the account level


financial_blocking_threshold

floatThe value of the financial blocking threshold for the account that is set in the account class or redefined on the account level


account_type_idintegerAccount type ID (см. Viewing the List of Account Types)


manager_idintegerAccount's manager ID


owner_idintegerAccount's Owner ID


tech_user_idinteger

ID of the account's гser selected as Tech contact (see Viewing and updating an Account's details)



bill_user_idintegerID of the account's гser selected as Billing contact (see Viewing and updating an Account's details)


custom_attributes

object

Account attributes (see Managing Attributes)




attributes.custom-attributes['custom-attribute-key']stringAccount attribute value


managerarray

Information about the account's manager




created_atdateDate and time of the manager creation



updated_atdateData and time of the manager last update



reseller_idintegerID of the manager's reseller



idintegerID of the manager



namestringName of the manager



statusstring

Status of the manager:

  • active — access to the Operator Control Panel is allowed.
  • inactive — access to the Operator Control Panel is blocked.



emailstringManager's email which is used as a login to the Operator Control Panel



rolestringManager's role (for the list of roles, see Managers' Roles)



custom_attributesarrayThe list of the manager's additional attributes (see Viewing the List of Attribute Categories)




manager.custom-attributes['custom-attribute-key']stringThe value of the attribute


ownerobjectinformation about the Owner of the account



created_at

stringDate and time of account's Owner creation



updated_at

stringDate and time of account's Owner last update



emailstringEmail of the account's Owner



account_statusstringAccount's Owner status for the account (for information about statues, see Managing Account's Users)



global_statusstringAccount's Owner status in ActivePlatform



first_namestringThe first name of the account's Owner



middle_namestringThe middle name of the account's Owner



ast_namestringThe last name of the account's Owner


account_product_managersarray of objectsResponsible managers of the account (see Managing Responsible Managers)



idintegerID of information about the responsible manager



account_idintegerAccount ID



product_idintegerProduct ID



responsible_product_manager_id

integerResponsible manager ID within the product



manager_product_role_id

integerManager role ID within the product



created_at

dateDate and time when information about the responsible manager was created



updated_at

dateDate and time when information about the responsible manager was updated


self_registration

bool

Indicates whether the account was created by completing the self-registration process in the Customer Control Panel:

  • true — the account was created by completing the self-registration process in the Customer Control Panel.
  • false — the account was created by a manager via the Operator Control Panel or API.


default_payment_model

string

Default payment model:

  • prepay
  • postpay


account_typeobjectInformation about the account type (see Viewing the List of Account Types)



idintegerID of the account type



namestringName of the account type



created_atdateDate and time of the account type creation



updated_atdateDate and time when the account type was updated



reseller_idintegerID of the reseller linked to the account type



name_patternstringTemplate of the account type name which is displayed in the platform



primary_namestringName of the field with the primary name of the account. For example, for the Business account type, the filed may be named as Company name



keystringKey that is used to refer to the account type by API or a placeholder



default_payment_method_idintegerID of the default payment method (see Configuring Payment Methods)



ancestrystringID of the parent account type


account_classstringInformation about the account class (see Viewing the list of Account Classes)



idintegerID of the account class



reseller_idintegerID of the linked reseller



namestringName of the account class



created_atdateDate and time of the account type creation



updated_atdateDate and time when the account type was updated



financial_blocking_threshold

floatThe value of the financial blocking threshold that is set in the account class



due_order_periodintegerNumber of days to pay for an order before the order becomes canceled (for the Prepay payment model)



subzero_periodintegerNumber of days during which the account balance can be negative without moving the account to the Credit hold status. The -1 value refers to the unlimited period



stop_subscription_typestringType of the subscription stopping if the account is moved to the Credit hold status (for the list of the available types of the subscription stopping, see Creating an Account Class)



keystring Key that is used to refer to the account class by API or placeholders



colorstringColor that is used in the List of accounts (see Viewing the List of Accounts) for this account type



guaranteed_payment_limitintegerMaximum amount of the guaranteed payment that all accounts, which are added to the account class, can use



guaranteed_payment_periodintegerNumber of days, during which all accounts, which are added to the account class, can use the Guaranteed payments



delete_subscription_typestringType of the subscription deleting (for the list of the available types of the subscription deleting, see Creating an Account Class)



denominatedbool

Attribute of the account type denomination:

  • true — the account type is denominated.
  • false — the account type is not denominated.



buy_with_negative_balancebool

Availability of paying for orders with the negative account balance (for the Prepay payment model):

  • true — paying for orders with the negative account balance is available.
  • false — paying for orders with the negative account balance is not available.



receipt_dayintegerDeprecated



payment_modelstring

Payment model:

  • prepay
  • postpay



defaultbool

Default account type for new accounts:

  • true — the account type is applied to new accounts.
  • false — the account type is not applied to new accounts.



due_payment_periodintegerNumber of days to pay for a payment before the payment becomes expired (for the Postpay payment model)



subscription_credit_limit

floatThe value of the subscription credit limit that is set in the account class

relationshipsobjectInformation about the related objects


subscriptionsobjectInformation about the related subscriptions



dataarrayInformation about the subscription




idintegerID of the subscription




typestringData type

Request example

GET /api/v3/resellers/1/accounts/505
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

{
    "data": {
        "id": "505",
        "type": "accounts",
        "attributes": {
            "created_at": "2019-10-15T13:08:36.440+03:00",
            "updated_at": "2020-07-07T11:06:27.264+03:00",
            "reseller_id": 1,
            "name": "Marcelo  Ivanou",
            "account_class_id": 1,
            "primary_name": "Test api doc",
            "first_name": "Marcelo",
            "middle_name": "",
            "last_name": "Ivanou",
            "country": "BY",
            "region": "minsk",
            "city": "minsk",
            "street": "Lenina",
            "building": "1",
            "office": "",
            "zip": "220007",
            "phone": "+375295555555",
            "email": "test@example.com",
            "status": "active",
            "balance": "380.39",
            "usable_balance": "380.39",
            "current_debt": 0.0,
            "subscription_credit_limit": 11000.0,
            "financial_blocking_threshold": 0.0,
            "account_type_id": 1,
            "manager_id": 50,
            "owner_id": 874,
            "tech_user_id": 874,
            "bill_user_id": 874,
            "custom_attributes": {
                "birth_date": "10.08.2016",
                "dns": "",
                "invoice": "",
                "passport_date_of_issue": "01.07.2016",
                "passport_issued_by": "Goverment",
                "passport_number": "1124111111122",
                "personal_number": "A4411111BB1199"
            },
            "manager": {
                "created_at": "2016-11-30T13:16:27.169+03:00",
                "updated_at": "2019-11-22T14:13:28.970+03:00",
                "reseller_id": 1,
                "id": 50,
                "name": "Sales manager",
                "status": "active",
                "email": "test@gmail.com",
                "role": "sales",
                "custom_attributes": {
                        "ManagerString": "Test"
                    }
            },
            "owner": {
                "created_at": "2016-10-26T17:38:37.551+03:00",
                "updated_at": "2016-12-23T15:04:48.172+03:00",
                "email": "owner@example.by",
                "account_status": "active",
                "global_status": "active",
                "first_name": "Alex",
                "middle_name": "",
                "last_name": "Owner"
            },
			"account_product_managers": [
                {
                    "id": 431,
                    "account_id": 710,
                    "product_id": 400,
                    "responsible_product_manager_id": 3,
                    "manager_product_role_id": 2,
                    "created_at": "2020-12-09T06:15:52.348+03:00",
                    "updated_at": "2020-12-16T15:38:56.541+03:00"
                },
                {
                    "id": 9,
                    "account_id": 710,
                    "product_id": 400,
                    "responsible_product_manager_id": 1,
                    "manager_product_role_id": 1,
                    "created_at": "2020-12-09T06:13:40.744+03:00",
                    "updated_at": "2020-12-16T15:38:56.533+03:00"
                }
            ],
            "self_registration": false,
			"default_payment_model": "postpay",
            "account_type": {
                "id": 1,
                "name": "Personal BLR",
                "created_at": "2016-08-25T09:26:12.658+03:00",
                "updated_at": "2021-03-04T06:12:01.425+03:00",
                "reseller_id": 1,
                "name_pattern": "%first_name %middle_name %last_name",
                "primary_name": "",
                "key": "personalblr",
                "default_payment_method_id": 2,
                "ancestry": null,
                "use_by_default": true
            },
            "account_class": {
                "id": 1,
                "reseller_id": 1,
                "name": "Default",
                "created_at": "2016-08-25T09:26:12.820+03:00",
                "updated_at": "2020-09-05T10:29:21.844+03:00",
                "financial_blocking_threshold": "0.0",
                "due_order_period": 90,
                "subzero_period": 0,
                "stop_subscription_type": "automatically",
                "key": "default",
                "color": "grey",
                "guaranteed_payment_limit": 1000,
                "guaranteed_payment_period": 7,
                "delete_subscription_type": "automatically",
                "denominated": false,
                "buy_with_negative_balance": false,
                "receipt_day": null,
                "payment_model": "postpay",
                "default": true,
                "due_payment_period": 3,
                "subscription_credit_limit": "222.0"
            }
        },
        "relationships": {
            "subscriptions": {
                "data": [
                    {
                        "id": "3005863",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005862",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005749",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005691",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3006017",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005871",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005868",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3006016",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005870",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005869",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005867",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005865",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005875",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005866",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005864",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3005861",
                        "type": "subscriptions"
                    },
                    {
                        "id": "3006034",
                        "type": "subscriptions"
                    }
                ]
            }
        }
    }
}