Get a List of Accounts
The Get a List of Accounts method returns the list of all Accounts.
GET /api/vendor/v1/accounts.json?api_token={api_token}
Arguments
Name | Parameter Type | Data type | Required/ | Description |
---|---|---|---|---|
api_token | query | string | Required | API token of the manager who performs 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 the specified field |
sorting[reversed] | query | string | Required | Set the reversed sorting mode by the specified field:
|
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 | |
---|---|---|---|
id | integer | Account ID | |
name | string | Account name | |
account_class_id | integer | Account class ID (see Account classes) | |
account_class | string | Account class name (see Account classes) | |
primary_name | string | Account primary name (a company name, if the customer is a legal entity) | |
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 | |
country | string | Contact information: a two-letter ISO code ISO 3166-1 alpha-2 of the country | |
region | string | Contact information: Region | |
city | string | Contact information: City | |
street | string | Contact information: Street | |
building | string | Contact information: Building | |
office | string | Contact information: Office | |
zip | string | Contact information: Zip-code | |
phone | string | Contact information: Phone number:
| |
string | Email of the contract person | ||
status | string | Account status:
| |
balance | float | A current value of the Account balance (see Viewing the list of charges) | |
account_type_id | integer | Account type ID | |
account_type | string | Account type name | |
default_payment_model | string | Default payment model from the Account class:
| |
current_debt | float | Current debt of the Account for all postpaid Subscriptions | |
financial_blocking_threshold_use_system | bool | Shows whether the Account uses the default Financial blocking threshold value that is set in the Account class:
| |
financial_blocking_threshold | float | The value of the Financial blocking threshold for the Account that is set in the Account class or redefined on the Account level | |
subscription_credit_limit_use_system | bool | Shows whether the Account uses the default Subscription credit limit value that is set in the Account class:
| |
subscription_credit_limit | float | The value of the Subscription credit limit for the Account that is set in the Account class or redefined on the Account level | |
manager_id | integer | ID of the manager who is linked with the Account | |
owner_id | integer | ID of the User who is granted the Owner access rights in the Customer Control Panel | |
tech_user_id | integer | ID of the user, which is responsible for the technical matters | |
bill_user_id | integer | ID of the user, which is responsible for the financial matters | |
custom_attributes | array | A list of additional attributes (see Managing attributes) | |
name | string | Attribute name | |
value | Depends on the attribute | Attribute value | |
created_at | date | Date and time of the Account creation | |
updated_at | date | Date and time, when the Account information was updated |
Request example
GET /api/vendor/v1/accounts.json?api_token=vY5fwetestK3gJXZH5uHCw&per_page=2&page=4&sorting[field]=id&sorting[reversed]=true&filters[status]=deleted
Response example
[
{
"id": 486,
"name": "John Doe",
"account_class_id": 1,
"account_class": "Default",
"primary_name": "",
"first_name": "John",
"middle_name": "",
"last_name": "Doe",
"country": "US",
"region": "NY",
"city": "Brooklyn",
"street": "Westminster ave.",
"building": "",
"office": "",
"zip": "11230",
"phone": "+5554000",
"email": "test@example.com",
"status": "deleted",
"balance": "8.22",
"account_type_id": 1564,
"account_type": "Personal",
"default_payment_model": "prepay",
"current_debt": 0.0,
"financial_blocking_threshold_use_system": true,
"financial_blocking_threshold": 100.0,
"subscription_credit_limit_use_system": true,
"subscription_credit_limit": 0.0,
"manager_id": null,
"owner_id": 846,
"new_owner_first_name": null,
"new_owner_last_name": null,
"new_owner_middle_name": null,
"new_owner_email": null,
"tech_user_id": 846,
"bill_user_id": 846,
"custom_attributes": {},
"created_at": "2019-12-04T13:55:12.585+03:00",
"updated_at": "2019-08-19T15:09:25.104+03:00"
},
{
"id": 300,
"name": "Kate S Closecharges",
"account_class_id": 1180,
"account_class": "By Default new",
"primary_name": "",
"first_name": "Kate",
"middle_name": "S",
"last_name": "Closecharges",
"country": "BY",
"region": "4",
"city": "grodno",
"street": "Lenina",
"building": "13",
"office": "",
"zip": "123456",
"phone": "+375444444444",
"email": "example@gmail.com",
"status": "deleted",
"balance": "0.0",
"account_type_id": 1,
"account_type": "Personal BLR",
"default_payment_model": "prepay",
"current_debt": 0.0,
"financial_blocking_threshold_use_system": true,
"financial_blocking_threshold": 0.0,
"subscription_credit_limit_use_system": true,
"subscription_credit_limit": 0.0,
"manager_id": null,
"owner_id": 679,
"new_owner_first_name": null,
"new_owner_last_name": null,
"new_owner_middle_name": null,
"new_owner_email": null,
"tech_user_id": 679,
"bill_user_id": 679,
"custom_attributes": {
"passport_date_of_issue": "01.07.2018",
"personal_number": "3213213",
"invoice": "0",
"dns": "0",
"passport_issued_by": "Gov",
"birth_date": "",
"passport_number": "32323233",
"tenantname": "",
"tenantID": ""
},
"created_at": "2018-08-18T14:51:48.394+03:00",
"updated_at": "2019-02-01T16:51:38.008+03:00"
}
]