Task type
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /task-type/get-by-id
Get a task type by its _id.
Нужное разрешение: tasks · как работают разрешения
Пример запроса
bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/task-type/get-by-id' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"_id": "64b7f4d9e2b3b6a0b7c5d80a"
}'js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/task-type/get-by-id', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"_id": "64b7f4d9e2b3b6a0b7c5d80a"
}),
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/task-type/get-by-id",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"_id": "64b7f4d9e2b3b6a0b7c5d80a",
},
)
print(res.json())php
<?php
$body = <<<'JSON'
{
"_id": "64b7f4d9e2b3b6a0b7c5d80a"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/task-type/get-by-id');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
_id | string | Да |
json
{
"_id": "64b7f4d9e2b3b6a0b7c5d80a"
}Ответ
| Поле | Тип | Описание |
|---|---|---|
_id | string | |
name | string | |
color | string | |
is_default | boolean | |
is_deleted | boolean | |
created_at | string (date-time) | |
updated_at | string (date-time) |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "Follow-up call",
"color": "#FF9800",
"is_default": false,
"is_deleted": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}POST /task-type/paging
Paginated list of task types.
Нужное разрешение: tasks · как работают разрешения
Пример запроса
bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/task-type/paging' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"page": 1,
"limit": 20
}'js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/task-type/paging', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"page": 1,
"limit": 20
}),
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/task-type/paging",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"page": 1,
"limit": 20,
},
)
print(res.json())php
<?php
$body = <<<'JSON'
{
"page": 1,
"limit": 20
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/task-type/paging');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
page | number | Да | По умолчанию: 1 |
limit | number | Да | По умолчанию: 20 |
search | string | Нет | Search by name. |
json
{
"page": 1,
"limit": 20,
"search": "string"
}Ответ
| Поле | Тип | Описание |
|---|---|---|
list | object[] | |
list[]._id | string | |
list[].name | string | |
list[].color | string | |
list[].is_default | boolean | |
list[].is_deleted | boolean | |
list[].created_at | string (date-time) | |
list[].updated_at | string (date-time) | |
total | number |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"list": [
{
"_id": "string",
"name": "Follow-up call",
"color": "#FF9800",
"is_default": false,
"is_deleted": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
}
],
"total": 42
},
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.