К содержанию

Справочники

То, на что ссылаются записи: собственные поля организации, теги, сотрудники и команды.

Собственные поля

GET /custom-fields

Поля организации с вариантами выбора — для контактов, компаний, сделок или команд (entity): активные, архивные или все. requiredStageIds — этапы, на которые человек в Alta не переведёт сделку без этого поля (запрос через API это не останавливает); requiredAtPayment — человек в Alta не запишет оплату сделки без него (с methodIds — только оплату этими способами); оплату через API это не останавливает.

Параметры запроса

  • entity string

    Значения: contact company deal team payment product

  • status string

    по умолчанию active

    Значения: active archived all

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/custom-fields' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/custom-fields', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/custom-fields",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/custom-fields', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Ответ 200

Успешный ответ.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000032",
      "name": "Город доставки",
      "entity": "deal",
      "type": "text",
      "description": null,
      "options": [],
      "decimals": null,
      "groupId": null,
      "position": 1,
      "pipelineIds": [],
      "requiredStageIds": [],
      "requiredAtPayment": null,
      "requirements": [],
      "showOnCard": true,
      "showInDeal": false,
      "apiOnly": false,
      "uniqueValues": false,
      "uniqueCheck": null,
      "multipleValues": false,
      "archived": false,
      "externalId": null,
      "externalSource": null,
      "updatedAt": "2026-10-20T08:15:00Z",
      "version": 1
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000033",
      "name": "Источник запроса",
      "entity": "deal",
      "type": "choice",
      "description": null,
      "options": [
        {
          "id": "0192f3a1-7c2e-7b4d-9a61-000000000034",
          "label": "Сайт",
          "color": "blue",
          "archived": false,
          "externalId": null
        },
        {
          "id": "0192f3a1-7c2e-7b4d-9a61-000000000035",
          "label": "Instagram",
          "color": "purple",
          "archived": false,
          "externalId": null
        },
        {
          "id": "0192f3a1-7c2e-7b4d-9a61-000000000036",
          "label": "Рекомендация",
          "color": "green",
          "archived": false,
          "externalId": null
        }
      ],
      "decimals": null,
      "groupId": null,
      "position": 2,
      "pipelineIds": [],
      "requiredStageIds": [
        "0192f3a1-7c2e-7b4d-9a61-000000000021"
      ],
      "requiredAtPayment": null,
      "requirements": [
        {
          "moment": "deal.stage_enter",
          "scopeIds": [
            "0192f3a1-7c2e-7b4d-9a61-000000000021"
          ]
        }
      ],
      "showOnCard": true,
      "showInDeal": false,
      "apiOnly": false,
      "uniqueValues": false,
      "uniqueCheck": null,
      "multipleValues": false,
      "archived": false,
      "externalId": null,
      "externalSource": null,
      "updatedAt": "2026-10-20T08:15:00Z",
      "version": 1
    }
  ]
}
Поля ответа
  • items object[]

    Вложенные поля: 24
    • apiOnly boolean

    • archived boolean

    • decimals integer | null

    • description string | null

    • entity string

      Значения: contact company deal team payment product

    • externalId string | null

    • externalSource string | null

    • groupId string · uuid | null

    • id string · uuid

    • multipleValues boolean

    • name string

    • options object[]

      Вложенные поля: 5
      • archived boolean

      • color string

        Значения: gray blue teal green yellow orange red purple

      • externalId string | null

      • id string · uuid

      • label string

    • pipelineIds string[] · uuid

    • position integer | null

      ≥ 1

    • requiredAtPayment object | null

      Вложенные поля: 1
      • methodIds string[] · uuid

        количество ≤ 200

    • requiredStageIds string[] · uuid

    • requirements object[]

      Вложенные поля: 2
      • moment string

      • scopeIds string[] · uuid

    • showInDeal boolean

    • showOnCard boolean

    • type string

      Значения: text long_text number date datetime boolean choice multi_choice url money birthday address

    • uniqueCheck object | null

      Вложенные поля: 5
      • doubles integer

        ≥ 0

      • finishedAt string · date-time | null

      • moreDoubles boolean

      • startedAt string · date-time

      • state string

        Значения: checking doubles

    • uniqueValues boolean

    • updatedAt string · date-time

    • version integer

      ≥ 1

Получить поле

GET /custom-fields/{fieldId}

Одно собственное поле по id.

Параметры пути

  • fieldId string · uuid обязательно

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/custom-fields/{fieldId}' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/custom-fields/{fieldId}', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/custom-fields/{fieldId}",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/custom-fields/{fieldId}', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Ответ 200

Успешный ответ.

json
{
  "id": "0192f3a1-7c2e-7b4d-9a61-000000000033",
  "name": "Источник запроса",
  "entity": "deal",
  "type": "choice",
  "description": null,
  "options": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000034",
      "label": "Сайт",
      "color": "blue",
      "archived": false,
      "externalId": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000035",
      "label": "Instagram",
      "color": "purple",
      "archived": false,
      "externalId": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000036",
      "label": "Рекомендация",
      "color": "green",
      "archived": false,
      "externalId": null
    }
  ],
  "decimals": null,
  "groupId": null,
  "position": 2,
  "pipelineIds": [],
  "requiredStageIds": [
    "0192f3a1-7c2e-7b4d-9a61-000000000021"
  ],
  "requiredAtPayment": null,
  "requirements": [
    {
      "moment": "deal.stage_enter",
      "scopeIds": [
        "0192f3a1-7c2e-7b4d-9a61-000000000021"
      ]
    }
  ],
  "showOnCard": true,
  "showInDeal": false,
  "apiOnly": false,
  "uniqueValues": false,
  "uniqueCheck": null,
  "multipleValues": false,
  "archived": false,
  "externalId": null,
  "externalSource": null,
  "updatedAt": "2026-10-20T08:15:00Z",
  "version": 1
}
Поля ответа
  • apiOnly boolean

  • archived boolean

  • decimals integer | null

  • description string | null

  • entity string

    Значения: contact company deal team payment product

  • externalId string | null

  • externalSource string | null

  • groupId string · uuid | null

  • id string · uuid

  • multipleValues boolean

  • name string

  • options object[]

    Вложенные поля: 5
    • archived boolean

    • color string

      Значения: gray blue teal green yellow orange red purple

    • externalId string | null

    • id string · uuid

    • label string

  • pipelineIds string[] · uuid

  • position integer | null

    ≥ 1

  • requiredAtPayment object | null

    Вложенные поля: 1
    • methodIds string[] · uuid

      количество ≤ 200

  • requiredStageIds string[] · uuid

  • requirements object[]

    Вложенные поля: 2
    • moment string

    • scopeIds string[] · uuid

  • showInDeal boolean

  • showOnCard boolean

  • type string

    Значения: text long_text number date datetime boolean choice multi_choice url money birthday address

  • uniqueCheck object | null

    Вложенные поля: 5
    • doubles integer

      ≥ 0

    • finishedAt string · date-time | null

    • moreDoubles boolean

    • startedAt string · date-time

    • state string

      Значения: checking doubles

  • uniqueValues boolean

  • updatedAt string · date-time

  • version integer

    ≥ 1

Сотрудники

GET /members

Сотрудники организации — ответственные и исполнители записей: сначала работающие, уволенные в конце (dismissedAt).

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/members' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/members', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/members",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/members', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Ответ 200

Успешный ответ.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000001",
      "name": "Андрей Шевченко",
      "email": "andrii@kavova.ua",
      "role": "owner",
      "roleId": "0192f3a1-7c2e-7b4d-9a61-00000000005a",
      "roleName": null,
      "roleSystemKey": "owner",
      "active": true,
      "teamId": null,
      "standIn": false,
      "dismissedAt": null,
      "dismissedById": null,
      "handOverToId": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
      "name": "Ирина Мельник",
      "email": "iryna@kavova.ua",
      "role": "manager",
      "roleId": "0192f3a1-7c2e-7b4d-9a61-00000000005b",
      "roleName": null,
      "roleSystemKey": "manager",
      "active": true,
      "teamId": "0192f3a1-7c2e-7b4d-9a61-00000000005c",
      "standIn": false,
      "dismissedAt": null,
      "dismissedById": null,
      "handOverToId": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000003",
      "name": "Олег Бондарь",
      "email": "oleh@kavova.ua",
      "role": "manager",
      "roleId": "0192f3a1-7c2e-7b4d-9a61-00000000005b",
      "roleName": null,
      "roleSystemKey": "manager",
      "active": false,
      "teamId": null,
      "standIn": false,
      "dismissedAt": "2026-10-21T12:40:00Z",
      "dismissedById": "0192f3a1-7c2e-7b4d-9a61-000000000001",
      "handOverToId": "0192f3a1-7c2e-7b4d-9a61-000000000002"
    }
  ]
}
Поля ответа
  • items object[]

    Вложенные поля: 13
    • active boolean

    • dismissedAt string · date-time | null

    • dismissedById string · uuid | null

    • email string

    • handOverToId string · uuid | null

    • id string · uuid

    • name string

    • role string

      Значения: owner admin manager

    • roleId string · uuid

    • roleName string | null

    • roleSystemKey string | null

      Значения: owner admin manager

    • standIn boolean

    • teamId string · uuid | null

Теги

GET /tags

Теги организации по названию: активные или архивные; usage=true добавляет, у скольких записей стоит каждый.

Параметры запроса

  • status string

    по умолчанию active

    Значения: active archived

  • usage boolean

    по умолчанию false

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/tags' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/tags', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/tags",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/tags', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Ответ 200

Успешный ответ.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000029",
      "name": "Опт",
      "color": "teal",
      "archived": false,
      "externalId": null,
      "externalSource": null,
      "usage": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000028",
      "name": "VIP",
      "color": "purple",
      "archived": false,
      "externalId": null,
      "externalSource": null,
      "usage": null
    }
  ]
}
Поля ответа
  • items object[]

    Вложенные поля: 7
    • archived boolean

    • color string

      Значения: gray blue teal green yellow orange red purple

    • externalId string | null

    • externalSource string | null

    • id string · uuid

    • name string

    • usage object | null

      Вложенные поля: 3
      • companies integer

        ≥ 0

      • contacts integer

        ≥ 0

      • deals integer

        ≥ 0

Группы сотрудников

GET /teams

Группы сотрудников организации по названию, не больше 100. Группа сотрудника — его teamId в «Сотрудниках», а её название — здесь: так отчёт называет группу каждого сотрудника. color — цвет группы в Alta (null — без цвета), customFields — значения собственных полей групп («Собственные поля» с entity=team), telegramChatId — внутренний id Telegram-чата группы в Alta (null — не выбран); сами чаты через API не читаются. Группы настраивают в Alta, через API их только читают.

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/teams' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/teams', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/teams",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/teams', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Ответ 200

Успешный ответ.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-00000000005c",
      "name": "Киев",
      "version": 2,
      "color": "blue",
      "customFields": [],
      "telegramChatId": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-00000000005d",
      "name": "Львов",
      "version": 1,
      "color": "teal",
      "customFields": [],
      "telegramChatId": null
    }
  ]
}
Поля ответа
  • items object[]

    Вложенные поля: 6
    • color string | null

      Значения: gray blue teal green yellow orange red purple

    • customFields object[]

      Вложенные поля: 2
      • fieldId string · uuid

      • value string | boolean | string[] · uuid | object

        Вариант 1 · string

        string

        Вариант 2 · boolean

        boolean

        Вариант 3 · string[] · uuid

        string[] · uuid

        Вариант 4 · object
        • amount string

        • currency string

        Вариант 5 · object
        • city string

        • country string

        • line string

        • postcode string

    • id string · uuid

    • name string

    • telegramChatId string · uuid | null

    • version integer

      ≥ 1