The Get list of accounts method returns the list of accounts of the current reseller or any of its downstream resellers.
GET {base_url}/api/v3/resellers/{reseller_id}/accounts
Arguments
|
Name |
Parameter type |
Data type |
Required/Optional |
Description |
||||
|---|---|---|---|---|---|---|---|---|
|
X-Api-Token |
header |
string |
Required |
API token of a manager that performs the operation (see
) |
||||
|
Content-Type |
header |
string |
Required |
Media type of the request. Specify the following: application/vnd.api+json |
||||
|
Accept |
header |
string |
Required |
Supported media types of the answer. Specify the following: application/vnd.api+json |
||||
|
base_url |
path |
string |
Required |
ActivePlatform URL |
||||
|
reseller_id |
path |
number |
Required |
ID of the current reseller or any of its downstream resellers (see
) |
||||
|
page[size] |
query |
number |
Optional |
Page navigation: number of elements per page. The default value is 50 |
||||
|
page[number] |
query |
number |
Optional |
Page navigation: page number |
||||
|
filter[email] |
query |
string |
Optional |
Filtering by the email of the contract person. The parameter can be a comma-separated list |
||||
|
filter[user_email] |
query |
string |
Optional |
Filtering by the email of a user of the account. Requests the list of all attached accounts for the specified user |
||||
|
filter[inn] |
query |
string |
Optional |
Filtering by the Tax Identification Number of the account (in Russian, Идентификационный номер налогоплательщика, ИНН) specified in the
) |
||||
|
filter[created_at] |
query |
string |
Optional |
Filtering accounts by the date and time of the account creation in the YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339). To specify the period, the following filters are used:
|
||||
|
filter[updated_at] |
query |
string |
Optional |
Filtering accounts by the date and time of the account last update in the YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339). To specify the period, the following filters are used:
|
||||
|
include |
query |
string |
Optional |
Returns additional information about objects related to accounts. The following objects and possible values are supported:
|
Response model
|
Name |
Data type |
Description |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
data |
array of objects |
Response data |
||||||||||||||||||||
|
|
id |
string |
Account ID |
|||||||||||||||||||
|
|
type |
string |
Data type |
|||||||||||||||||||
|
|
attributes |
object |
Account information |
|||||||||||||||||||
|
|
|
created_at |
string |
Date and time of account creation |
||||||||||||||||||
|
|
|
updated_at |
string |
Data and time of account last update |
||||||||||||||||||
|
|
|
reseller_id |
number |
ID of the account's reseller |
||||||||||||||||||
|
|
|
name |
string |
Account name |
||||||||||||||||||
|
|
|
account_class_id |
number |
Account class ID |
||||||||||||||||||
|
|
|
primary_name |
string |
Primary 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 |
||||||||||||||||||
|
|
|
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 |
|||||||||||||||||||
|
|
|
balance |
string |
Total account balance as a sum of available funds (see |
||||||||||||||||||
|
|
|
usable_balance |
string |
Available funds on the account balance |
||||||||||||||||||
|
|
|
current_debt |
number |
Current debt of the account for all postpaid subscriptions |
||||||||||||||||||
|
|
|
subscription_credit_limit |
number |
The 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 |
number |
The value of the financial blocking threshold for the account that is set in the account class or redefined on the account level |
||||||||||||||||||
|
|
|
account_type_id |
number |
Account type ID (см.
) |
||||||||||||||||||
|
|
|
manager_id |
number |
Account's manager ID |
||||||||||||||||||
|
|
|
owner_id |
number |
Account's Owner ID |
||||||||||||||||||
|
|
|
tech_user_id |
number |
|||||||||||||||||||
|
|
|
bill_user_id |
number |
ID of the account's user selected as Billing contact (see
) |
||||||||||||||||||
|
|
|
custom_attributes |
object |
|||||||||||||||||||
|
|
|
|
attributes.custom-attributes['custom-attribute-key'] |
string |
Account attribute value For example, the Tax Identification Number of the account (in Russian, Идентификационный номер налогоплательщика, ИНН) is specified in the |
|||||||||||||||||
|
|
|
manager |
object |
Information about the account's manager |
||||||||||||||||||
|
|
|
|
created_at |
string |
Date and time of the manager creation |
|||||||||||||||||
|
|
|
|
updated_at |
string |
Data and time of the manager last update |
|||||||||||||||||
|
|
|
|
reseller_id |
number |
ID of the manager's reseller |
|||||||||||||||||
|
|
|
|
id |
number |
ID of the manager |
|||||||||||||||||
|
|
|
|
name |
string |
Name of the manager |
|||||||||||||||||
|
|
|
|
status |
string |
Status of the manager:
|
|||||||||||||||||
|
|
|
|
|
string |
Manager's email which is used as a login to the Operator Control Panel |
|||||||||||||||||
|
|
|
|
role |
string |
Manager's role (for the list of roles, see
) |
|||||||||||||||||
|
|
|
|
custom_attributes |
array |
The list of the manager's additional attributes (see Viewing the List of Attributes ) |
|||||||||||||||||
|
|
|
|
|
manager.custom-attributes['custom-attribute-key'] |
string |
The value of the attribute |
||||||||||||||||
|
|
|
owner |
object |
information about the Owner of the account |
||||||||||||||||||
|
|
|
|
created_at |
string |
Date and time of account's Owner creation |
|||||||||||||||||
|
|
|
|
updated_at |
string |
Date and time of account's Owner last update |
|||||||||||||||||
|
|
|
|
|
string |
Email of the account's Owner |
|||||||||||||||||
|
|
|
|
account_status |
string |
Account's Owner status for the account (for information about statues, see
) |
|||||||||||||||||
|
|
|
|
global_status |
string |
Account's Owner status in ActivePlatform |
|||||||||||||||||
|
|
|
|
first_name |
string |
The first name of the account's Owner |
|||||||||||||||||
|
|
|
|
middle_name |
string |
The middle name of the account's Owner |
|||||||||||||||||
|
|
|
|
last_name |
string |
The last name of the account's Owner |
|||||||||||||||||
|
|
|
account_product_managers |
array of objects |
Responsible managers of the account (see
) |
||||||||||||||||||
|
|
|
|
id |
number |
ID of information about the responsible manager |
|||||||||||||||||
|
|
|
|
account_id |
number |
Account ID |
|||||||||||||||||
|
|
|
|
product_id |
number |
Product ID |
|||||||||||||||||
|
|
|
|
responsible_product_manager_id |
number |
Responsible manager ID within the product |
|||||||||||||||||
|
|
|
|
manager_product_role_id |
number |
Manager role ID within the product |
|||||||||||||||||
|
|
|
|
created_at |
string |
Date and time when information about the responsible manager was created |
|||||||||||||||||
|
|
|
|
updated_at |
string |
Date 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:
|
||||||||||||||||||
|
|
|
default_payment_model |
string |
Default payment model:
|
||||||||||||||||||
|
|
|
account_type |
object |
Information about the account type (see
) |
||||||||||||||||||
|
|
|
|
id |
number |
ID of the account type |
|||||||||||||||||
|
|
|
|
name |
string |
Name of the account type |
|||||||||||||||||
|
|
|
|
created_at |
string |
Date and time of the account type creation |
|||||||||||||||||
|
|
|
|
updated_at |
string |
Date and time when the account type was updated |
|||||||||||||||||
|
|
|
|
reseller_id |
number |
ID of the reseller linked to the account type |
|||||||||||||||||
|
|
|
|
name_pattern |
string |
Template of the account type name which is displayed in the platform |
|||||||||||||||||
|
|
|
|
primary_name |
string |
Name 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 |
|||||||||||||||||
|
|
|
|
key |
string |
Key that is used to refer to the account type by API or a placeholder |
|||||||||||||||||
|
|
|
|
default_payment_method_id |
number |
ID of the default payment method (see
) |
|||||||||||||||||
|
|
|
|
ancestry |
string |
ID of the parent account type |
|||||||||||||||||
|
|
|
|
used_by_default |
bool |
Default account type for new accounts:
|
|||||||||||||||||
|
|
|
account_class |
string |
Information about the account class (see
) |
||||||||||||||||||
|
|
|
|
id |
number |
ID of the account class |
|||||||||||||||||
|
|
|
|
reseller_id |
number |
ID of the linked reseller |
|||||||||||||||||
|
|
|
|
name |
string |
Name of the account class |
|||||||||||||||||
|
|
|
|
created_at |
string |
Date and time of the account type creation |
|||||||||||||||||
|
|
|
|
updated_at |
string |
Date and time when the account type was updated |
|||||||||||||||||
|
|
|
|
financial_blocking_threshold |
string |
The value of the financial blocking threshold that is set in the account class |
|||||||||||||||||
|
|
|
|
due_order_period |
number |
Number of days to pay for an order before the order becomes canceled (for the prepay payment model) |
|||||||||||||||||
|
|
|
|
subzero_period |
number |
Number 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_type |
string |
Type 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
) |
|||||||||||||||||
|
|
|
|
key |
string |
Key that is used to refer to the account class by API or placeholders |
|||||||||||||||||
|
|
|
|
color |
string |
Color that is used in the List of accounts (see
) for this account type |
|||||||||||||||||
|
|
|
|
guaranteed_payment_limit |
number |
Maximum amount of the guaranteed payment that all accounts, which are added to the account class, can use |
|||||||||||||||||
|
|
|
|
guaranteed_payment_period |
number |
Number of days, during which all accounts, which are added to the account class, can use the Guaranteed payments |
|||||||||||||||||
|
|
|
|
delete_subscription_type |
string |
Type of the subscription deleting (for the list of the available types of the subscription deleting, see
) |
|||||||||||||||||
|
|
|
|
denominated |
bool |
Attribute of the account type denomination:
|
|||||||||||||||||
|
|
|
|
buy_with_negative_balance |
bool |
Availability of paying for orders with the negative account balance (for the Prepay model):
|
|||||||||||||||||
|
|
|
|
receipt_day |
number |
Deprecated |
|||||||||||||||||
|
|
|
|
payment_model |
string |
Payment model:
|
|||||||||||||||||
|
|
|
|
default |
bool |
Default account class for new accounts:
|
|||||||||||||||||
|
|
|
|
due_payment_period |
number |
Number of days to pay for a payment before the payment becomes expired (for the postpay payment model) |
|||||||||||||||||
|
|
|
|
subscription_credit_limit |
string |
The value of the subscription credit limit that is set in the account class |
|||||||||||||||||
|
|
relationships |
object |
Information about the related objects |
|||||||||||||||||||
|
|
|
subscriptions |
object |
Information about the related subscriptions |
||||||||||||||||||
|
|
|
|
data |
array |
Information about the subscription |
|||||||||||||||||
|
|
|
|
|
id |
string |
ID of the subscription |
||||||||||||||||
|
|
|
|
|
type |
string |
Data type |
||||||||||||||||
|
included |
array |
Additional information about objects listed in the request:
For a subscription: |
||||||||||||||||||||
|
links |
object |
Page navigation links that use the defined page navigation parameters |
||||||||||||||||||||
|
|
self |
string |
Current page link |
|||||||||||||||||||
|
|
first |
string |
First page link |
|||||||||||||||||||
|
|
prev |
string |
Previous page link |
|||||||||||||||||||
|
|
next |
string |
Next page link |
|||||||||||||||||||
|
|
last |
string |
Last page link |
|||||||||||||||||||
Request example
GET /api/v3/resellers/1/accounts?page[size]=2&page[number]=1&filter[email]=test@example.com&include=subscriptions
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": [
{
"id": "487",
"type": "accounts",
"attributes": {
"created_at": "2019-08-19T15:10:43.222+03:00",
"updated_at": "2019-08-19T15:16:49.990+03:00",
"reseller_id": 1,
"name": "Vit August",
"account_class_id": 1,
"primary_name": "",
"first_name": "Vit ",
"middle_name": "",
"last_name": "August",
"country": "US",
"region": "NY",
"city": "Brooklyn",
"street": "Westminster ave.",
"building": "",
"office": "",
"zip": "11230",
"phone": "+16030000000",
"email": "test@example.com",
"status": "deleted",
"balance": "0.0",
"usable_balance": "0.0",
"current_debt": 0,
"subscription_credit_limit": 0,
"financial_blocking_threshold": 100,
"account_type_id": 1564,
"manager_id": 223,
"owner_id": 847,
"tech_user_id": 847,
"bill_user_id": 847,
"custom_attributes": {
"inn": "00012345678"
},
"manager": {
"created_at": "2020-04-01T11:14:21.837+03:00",
"updated_at": "2019-12-30T14:40:31.322+03:00",
"reseller_id": 1,
"id": 223,
"name": "Bill Toss",
"status": "active",
"email": "manager@example.by",
"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": [],
"self_registration": false,
"default_payment_model": "prepay",
"account_type": {
"id": 1564,
"name": "FL",
"created_at": "2017-03-20T16:34:28.163+03:00",
"updated_at": "2017-03-20T16:34:28.163+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personal",
"default_payment_method_id": null,
"ancestry": "1562",
"use_by_default": false
},
"account_class": {
"id": 1,
"reseller_id": 1,
"name": "Default",
"created_at": "2016-08-25T09:26:12.820+03:00",
"updated_at": "2019-10-27T10:58:46.758+03:00",
"financial_blocking_threshold": "100.0",
"due_order_period": 90,
"subzero_period": 1,
"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": "prepay",
"default": true,
"due_payment_period": 30,
"subscription_credit_limit": "0.0"
}
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "3005606",
"type": "subscriptions"
}
]
}
}
},
{
"id": "503",
"type": "accounts",
"attributes": {
"created_at": "2019-08-22T15:59:53.492+03:00",
"updated_at": "2019-09-20T10:50:27.033+03:00",
"reseller_id": 1,
"name": "Vit Ada",
"account_class_id": 1687,
"primary_name": "DepV0304-4",
"first_name": "Vit",
"middle_name": "",
"last_name": "Ada",
"country": "TW",
"region": "Moscow",
"city": "Moscow",
"street": "Line",
"building": "",
"office": "",
"zip": "119002",
"phone": "+74950000001",
"email": "test@example.com",
"status": "active",
"balance": "-4.0",
"usable_balance": "-4.0",
"current_debt": 3,
"subscription_credit_limit": 0,
"financial_blocking_threshold": 10,
"account_type_id": 1564,
"manager_id": 223,
"owner_id": 866,
"tech_user_id": 866,
"bill_user_id": 866,
"custom_attributes": {},
"manager": {
"created_at": "2020-04-01T11:14:21.837+03:00",
"updated_at": "2019-12-30T14:40:31.322+03:00",
"reseller_id": 1,
"id": 223,
"name": "Bill Toss",
"status": "active",
"email": "manager@example.by",
"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": [],
"self_registration": false,
"default_payment_model": "prepay",
"account_type": {
"id": 1564,
"name": "FL",
"created_at": "2017-03-20T16:34:28.163+03:00",
"updated_at": "2017-03-20T16:34:28.163+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personal",
"default_payment_method_id": null,
"ancestry": "1562",
"use_by_default": false
},
"account_class": {
"id": 1687,
"reseller_id": 1,
"name": "Prepay",
"created_at": "2019-02-09T10:23:10.267+03:00",
"updated_at": "2019-09-20T10:48:33.157+03:00",
"financial_blocking_threshold": "10.0",
"due_order_period": 8,
"subzero_period": 1,
"stop_subscription_type": "automatically",
"key": "Prepay",
"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": "prepay",
"default": false,
"due_payment_period": 30,
"subscription_credit_limit": "0.0"
}
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "3005649",
"type": "subscriptions"
}
]
}
}
}
],
"included": [
{
"id": "3005606",
"type": "subscriptions",
"attributes": {
"created_at": "2019-08-19T15:12:05.525024+0300",
"updated_at": "2019-08-19T15:12:05.525024+0300",
"auto_renewal": false,
"billing_from": null,
"expiration_date": null,
"name": "Office USA monthly",
"renew_point_days": 0,
"start_date": null,
"status": "deleted",
"payment_model": "prepay",
"payment_model_parameters": {}
}
},
{
"id": "3005649",
"type": "subscriptions",
"attributes": {
"created_at": "2019-08-22T15:59:54.138703+0300",
"updated_at": "2019-09-20T10:47:07.896382+0300",
"auto_renewal": false,
"billing_from": "2019-08-22",
"expiration_date": "2019-12-22",
"name": "Auto provisioning with resources",
"renew_point_days": 1,
"start_date": "2019-08-22",
"status": "waiting_for_manual_approve",
"payment_model": "postpay",
"payment_model_parameters": {
"credit_limit": 0,
"current_debt": 3
}
}
}
],
"links": {
"self": "https://test.activeplatform.com/api/v3/resellers/1/accounts?filter%5Bemail%5D=test%40example.com&include=subscriptions&page%5Bnumber%5D=1&page%5Bsize%5D=2",
"first": "https://test.activeplatform.com/api/v3/resellers/1/accounts?filter%5Bemail%5D=test%40example.com&include=subscriptions&page%5Bnumber%5D=1&page%5Bsize%5D=2",
"prev": null,
"next": null,
"last": "https://test.activeplatform.com/api/v3/resellers/1/accounts?filter%5Bemail%5D=test%40example.com&include=subscriptions&page%5Bnumber%5D=1&page%5Bsize%5D=2"
}
}