До змісту
Скачати OpenAPI

Довідники

Те, на що посилаються записи: власні поля організації, теги, співробітники та команди.

Власні поля

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