Get a List of Accounts

The Get a List of Accounts method returns List of Accounts that have been created in the paltform.

The List of Accounts can be shown page by page. To split by page, the following Arguments should be passed:

  • the page number (page);
  • the amount of items per page (per_page).

The List of Accounts can be sorted by any field. To sort the List of Accounts, the following Arguments should be passed:

  • the field name that is used for sorting (sorting[field]);
  • the sort direction (sorting[reversed]):
    • true - the list will be sorted in descending direction;
    • false - the list will be sorted in ascending direction (by default).

The List of Accounts can be filtered by:

  • creation date (filters[created_at]);
  • update date (filters[updated_at]);
  • status (filters[status]);
  • email (filters[email]).
 GET /api/vendor/v1/accounts.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/
Optional

Description

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).

page

query

integer

Optional

Returning a list of accounts by current page number.

per_page

query

integer

Optional

Setting a number of items in the page.

sorting[field]

query

string

Optional

Sorting the list by a specified field.

sorting[reversed]

query

string

Required

Setting the sorting mode:

  • true - a descending sorting;
  • false - ascending sorting (by default).

filters[created_at]

query

date

Optional

Filtering the list by a creation date.

filters[updated_at]

query

date

Optional

Filtering the list by an update date.

filters[status]

query

string

Optional

Filtering the list by a status.

filters[email]

query

string

Optional

Filtering the list by an email.

Response model

Name

Data type

Description

idintegerAn account ID.
namestringAn account name.
account_class_idintegerAn account class ID (see Account classes in the ActivePlatform. Operator Control Panel).
account_classstring

A name of the account class (see Account classes in the ActivePlatform. Operator Control Panel).

primary_namestringA company name, if the customer is a legal entity.
first_namestringThe first name for the user the owner access rights.
middle_namestringThe middle name for the user the owner access rights.
last_namestringThe last name for the user the owner access rights.
countrystringAn account address: a two-letter ISO code ISO 3166-1 alpha-2 of the country.
regionstringAn account address: a region.
citystringAn account address: a city.
streetstringAn account address: a street.
buildingstringAn account address: building.
officestringAn account address: office.
zipstringAn account address: a zip-code.
phonestring

A phone number of the account:

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

A contact email of the account.

statusstring

A current account status:

balancefloatA current value of the account balance (see Viewing the List of Charges in the ActivePlatform. Operator Control Panel).
credit_limitfloat

A maximum amount of the credit that a customer can use for ordering services without topping up (the credit limit can be set manually or by default (see Account classes in the ActivePlatform. Operator Control Panel)).

account_type_idinteger

An ID of the account type.

account_typestringA name of the account type.
manager_idinteger

A manager ID who is linked with the account.

owner_idinteger

An ID of the existed user who is granted the owner access rights in the Customer Control Panel.

tech_user_idintegerAn ID of the user, which is responsible for the technical matters.
bill_user_idintegerAn ID of the user, which is responsible for the financial matters.
custom_attributesarray

A list of additional attributes (see Managing attributes in the ActivePlatform. Operator Control Panel):

  • name - a name of the attribute;

  • value - a value of the attribute.

created_atdateA date and time of the account's creation.
updated_atdateA date and time, when the account information was updated.

Request example

http://billing.activeplatform.com:80/api/vendor/v1/accounts.json?api_token=654321

Response example

 [
  {
    "id": 2000036,
    "name": "INVOICE",
    "account_class_id": 1,
    "account_class": "Default",
    "primary_name": "INVOICE",
    "first_name": "John",
    "middle_name": "Aleksandrovich",
    "last_name": "Doe",
    "country": "BY",
    "region": "Minskая",
    "city": "Minsk",
    "street": "Lenina",
    "building": "6",
    "office": "1",
    "zip": "220006",
    "phone": "+375330141111",
    "email": "john.doe@gmail.com",
    "status": "active",
    "balance": "23.34",
    "credit_limit": "0.0",
    "account_type_id": 2000045,
    "account_type": "Individual Entrepreneur",
    "manager_id": 2000157,
    "owner_id": 2000094,
    "tech_user_id": 2000092,
    "bill_user_id": 2000092,
    "custom_attributes": {
      "passport_date_of_issue": "14.05.2014",
      "personal_number": "123123123",
      "birth_date": "12.02.1992",
      "unp": ""
    },
    "created_at": "2014-12-01T16:32:51.728+03:00",
    "updated_at": "2016-01-13T15:16:04.102+03:00"
  }
]