Get a List of the Reseller's Account attributes
The Get a List of the Reseller's Account attributes method returns the list of all attributes applied to an Account of the current Reseller or any of its downstream Resellers.
The list includes the following attributes for every Account Type:
- System attributes available in the platform by default for creating a new Account.
- Additional (custom) attributes that can be added to the Account entity (see Creating an attribute).
Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.
GET {base_url}/api/v3/resellers/{reseller_id}/account_attributes
Arguments
Name | Parameter Type | Data type | Required/Optional | Description |
---|---|---|---|---|
X-Api-Token | header | string | Required | API token of the Manager that performs the operation (see Viewing and updating manager's information) |
Content-Type | header | string | Required | Indicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser) |
Accept | header | string | Required | Information about data types that the client (browser) supports |
reseller_id | path | integer | Required | ID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information) |
Response model
Name | Data type | Description | |||
---|---|---|---|---|---|
account_types | array of objects | List of Account Types with the Account attributes | |||
id | integer | Account Type ID (см. Account Types) | |||
attributes | array of objects | List of Account attributes for the specified Account Type | |||
name | string | Attribute name | |||
key | string | Attribute key | |||
optional | bool | Indicates whether the attribute is optional:
| |||
type | string | Data type of the attribute:
| |||
default_value | string | Attribute default value. For custom attributes with the list data type, returns the default key value | |||
available_values | array | List of available values of the attribute (for example, IDs, country codes). For custom attributes with the list data type, returns pairs of the key and name values | |||
is_custom_attribute | bool | Indicates whether the attribute is custom:
| |||
client_readonly | bool | Indicates whether the custom attribute is read-only for an Account:
Included in the response for custom attributes only | |||
admin_readonly | bool | Indicates whether the custom attribute is read-only for a Manager:
Included in the response for custom attributes only | |||
custom_attribute_category_id | integer | Attribute category ID of the custom attribute. Included in the response for custom attributes only | |||
format | string | Regular expression for the customer attribute validation. Included in the response for custom attributes only |
Request example
GET /api/v3/resellers/1/account_attributes
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetest3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"account_types": [
{
"id": 1,
"attributes": [
{
"name": "Manager",
"key": "manager_id",
"optional": true,
"type": "list",
"default_value": null,
"available_values": [
188,
296,
261
],
"is_custom_attribute": false
},
{
"name": "Account class",
"key": "account_class_key",
"optional": false,
"type": "list",
"default_value": null,
"available_values": [
"default",
"prepay",
"postpay"
],
"is_custom_attribute": false
},
{
"name": "First name",
"key": "first_name",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Last name",
"key": "last_name",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Middle name",
"key": "middle_name",
"optional": true,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Email",
"key": "email",
"optional": false,
"type": "email",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Country",
"key": "country",
"optional": false,
"type": "list",
"default_value": "RU",
"available_values": [
"BY",
"RU"
],
"is_custom_attribute": false
},
{
"name": "Region",
"key": "region",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "City",
"key": "city",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Street",
"key": "street",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Building",
"key": "building",
"optional": true,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Office",
"key": "office",
"optional": true,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Zip",
"key": "zip",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Phone",
"key": "phone",
"optional": false,
"type": "phone",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Contact person's ID",
"key": "new_owner_id",
"optional": true,
"type": "list",
"default_value": null,
"available_values": [
990,
991,
992
],
"is_custom_attribute": false
},
{
"name": "Contact person's first name",
"key": "new_owner_first_name",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Contact person's last name",
"key": "new_owner_last_name",
"optional": false,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Contact person's middle name",
"key": "new_owner_middle_name",
"optional": true,
"type": "string",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Contact person's email",
"key": "new_owner_email",
"optional": false,
"type": "email",
"default_value": null,
"available_values": [],
"is_custom_attribute": false
},
{
"name": "Tenant Name",
"key": "tenantname",
"optional": true,
"type": "text",
"default_value": "",
"available_values": [],
"is_custom_attribute": true,
"client_readonly": false,
"admin_readonly": false,
"custom_attribute_category_id": null,
"format": null
},
{
"name": "Tenant ID",
"key": "tenantID",
"optional": true,
"type": "string",
"default_value": "",
"available_values": [],
"is_custom_attribute": true,
"client_readonly": true,
"admin_readonly": true,
"custom_attribute_category_id": 2,
"format": ""
},
{
"name": "E-mail подписанта",
"key": "signer_email",
"optional": true,
"type": "string",
"default_value": "",
"available_values": [],
"is_custom_attribute": true,
"client_readonly": false,
"admin_readonly": false,
"custom_attribute_category_id": null,
"format": ""
},
{
"name": "AccountPassword",
"key": "AccountPassword",
"optional": true,
"type": "password",
"default_value": "",
"available_values": [],
"is_custom_attribute": true,
"client_readonly": false,
"admin_readonly": false,
"custom_attribute_category_id": null,
"format": ""
},
{
"name": "AccountCheckbox",
"key": "AccountCheckbox",
"optional": true,
"type": "checkbox",
"default_value": "",
"available_values": [
1,
0
],
"is_custom_attribute": true,
"client_readonly": false,
"admin_readonly": false,
"custom_attribute_category_id": null,
"format": ""
},
{
"name": "AccountList",
"key": "AccountList",
"optional": true,
"type": "list",
"default_value": "value_1",
"available_values": [
{
"key": "value_1",
"name": "v1"
},
{
"key": "value_2",
"name": "v2"
}
],
"is_custom_attribute": true,
"client_readonly": false,
"admin_readonly": false,
"custom_attribute_category_id": null,
"format": null
}
]
},
{
"id": 1564,
"attributes": [...
]
}
]
}