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-TokenheaderstringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredIndicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser)
AcceptheaderstringRequired

Information about data types that the client (browser) supports

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

Response model

NameData typeDescription
account_typesarray of objectsList of Account Types with the Account attributes

idintegerAccount Type ID (см. Account Types)

attributesarray of objectsList of Account attributes for the specified Account Type


namestringAttribute name


keystringAttribute key


optionalbool

Indicates whether the attribute is optional:

  • true — the attribute is optional.
  • false — the attribute is required.


typestring

Data type of the attribute:

  • string
  • text
  • checkbox
  • date
  • password
  • list


default_valuestringAttribute default value. For custom attributes with the list data type, returns the default key value


available_valuesarray

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_attributebool

Indicates whether the attribute is custom:

  • true — the attribute is custom (see Managing attributes).
  • false — the attribute is system.


client_readonlybool

Indicates whether the custom attribute is read-only for an Account:

  • true — the custom attribute is read-only for an Account.
  • false — the custom attribute can be edited by an Account.

Included in the response for custom attributes only



admin_readonlybool

Indicates whether the custom attribute is read-only for a Manager:

  • true — the custom attribute is read-only for a Manager.
  • false — the custom attribute can be edited by a Manager.

Included in the response for custom attributes only



custom_attribute_category_idintegerAttribute category ID of the custom attribute. Included in the response for custom attributes only


formatstringRegular 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": [...
			]
		}
    ]
}