Метод используется для получения одностраничного списка атрибутов, применимых к аккаунту, к которому есть доступ у текущего пользователя. Метод возвращает следующую информацию для указанного аккаунта:
-
Основные и дополнительные атрибуты аккаунта, для которых в настройках кастомизации установлен признак Отображать при создании клиента (см. ).
-
Требования к формату значений атрибутов.
-
Текущие значения атрибутов.
GET {reseller_domain}/internal_api/accounts/{account_id}/account_attributes
В этой статье:
Авторизация
Требуется авторизация с помощью access token пользователя.
Аргументы
|
Название |
Тип параметра |
Тип данных |
Обязательный/
|
Описание |
|---|---|---|---|---|
|
Content-Type |
header |
string |
Обязательный |
Тип данных, передаваемых в запросе. Укажите application/vnd.api+json |
|
Accept |
header |
string |
Обязательный |
Поддерживаемые типы данных в ответе. Укажите application/vnd.api+json |
|
X-Api-Locale |
header |
string |
Опциональный |
Двухбуквенный код языка данных в ответе |
|
Authorization |
header |
string |
Обязательный |
Действующий access token пользователя. Формат: |
|
reseller_domain |
path |
string |
Обязательный |
Доменное имя реселлера |
|
account_id |
path |
integer |
Обязательный |
ID аккаунта, для которого запрашивается список атрибутов |
Модель ответа
Пример запроса
curl --location --request GET 'https://test.activeplatform.com/internal_api/accounts/1185/account_attributes' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Accept: application/vnd.api+json' \
--header 'X-Api-Locale: en' \
--header 'Authorization: Bearer AccessTokenExample'
Пример ответа
{
"data": {
"id": "109",
"type": "account_attributes",
"attributes": {
"account_attributes": [
{
"name": "Zip",
"key": "zip",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 1,
"helpful_description": null,
"custom_attribute": false,
"value": "220100"
},
{
"name": "Company Name",
"key": "primary_name",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 2,
"helpful_description": null,
"custom_attribute": false,
"value": "TW"
},
{
"name": "Country",
"key": "country",
"optional": false,
"type": "list",
"available_values": [
{
"key": "AF",
"name": "Afghanistan"
},
{
"key": "AL",
"name": "Algeria"
}
],
"readonly": false,
"category": null,
"description": "",
"priority": 3,
"helpful_description": null,
"custom_attribute": false,
"value": "AF"
},
{
"name": "Region",
"key": "region",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 4,
"helpful_description": null,
"custom_attribute": false,
"value": "Region"
},
{
"name": "City",
"key": "city",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 5,
"helpful_description": null,
"custom_attribute": false,
"value": "City"
},
{
"name": "Street",
"key": "street",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 6,
"helpful_description": null,
"custom_attribute": false,
"value": "Street"
},
{
"name": "Building",
"key": "building",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 7,
"helpful_description": null,
"custom_attribute": false,
"value": ""
},
{
"name": "Office",
"key": "office",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 8,
"helpful_description": null,
"custom_attribute": false,
"value": ""
},
{
"name": "Phone",
"key": "phone",
"optional": false,
"type": "phone",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 9,
"helpful_description": null,
"custom_attribute": false,
"value": "+555441234567"
},
{
"name": "Last name",
"key": "last_name",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 10,
"helpful_description": null,
"custom_attribute": false,
"value": "TW"
},
{
"name": "First name",
"key": "first_name",
"optional": false,
"type": "string",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 11,
"helpful_description": null,
"custom_attribute": false,
"value": "Docs"
},
{
"name": "Email",
"key": "email",
"optional": false,
"type": "email",
"available_values": [],
"readonly": false,
"category": null,
"description": "",
"priority": 12,
"helpful_description": null,
"custom_attribute": false,
"value": "docs@example.net"
},
{
"name": "Middle name",
"key": "middle_name",
"optional": true,
"type": "string",
"available_values": [],
"readonly": false,
"category": {
"id": "2",
"name": "for Microsoft"
},
"description": "",
"priority": 13,
"helpful_description": null,
"custom_attribute": false,
"value": ""
},
{
"name": "Tenant Name",
"key": "tenant_name",
"optional": true,
"type": "text",
"available_values": [],
"readonly": false,
"category": {
"id": "2",
"name": "for Microsoft"
},
"description": "",
"priority": 14,
"helpful_description": null,
"custom_attribute": true,
"format": "",
"value": ""
},
{
"name": "Tenant ID",
"key": "tenantid",
"optional": true,
"type": "string",
"available_values": [],
"readonly": false,
"category": {
"id": "2",
"name": "for Microsoft"
},
"description": "",
"priority": 15,
"helpful_description": null,
"custom_attribute": true,
"format": "",
"value": null
},
{
"name": "Inn",
"key": "inn",
"optional": true,
"type": "string",
"available_values": [],
"readonly": true,
"category": {
"id": "2",
"name": "for Microsoft"
},
"description": "inn",
"priority": 16,
"helpful_description": null,
"custom_attribute": true,
"format": "[0-9]",
"value": ""
},
{
"name": "Password",
"key": "pass",
"optional": true,
"type": "password",
"available_values": [],
"readonly": false,
"category": {
"id": "3",
"name": "params"
},
"description": "pass",
"priority": 17,
"helpful_description": "password 6 characters",
"custom_attribute": true,
"format": "",
"value": ""
},
{
"name": "list",
"key": "list",
"optional": true,
"type": "list",
"available_values": [
{
"name": "Option B",
"key": "2"
},
{
"name": "Option C",
"key": "3"
}
],
"readonly": false,
"category": {
"id": "3",
"name": "params"
},
"description": "",
"priority": 18,
"helpful_description": null,
"custom_attribute": true,
"format": null,
"value": null
}
]
}
},
"meta": {
"server_current_time": "2023-08-14T12:34:56.002436+0300"
}
}