States settings
Kanban board column configuration
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
POST /states-settings/create
Create a custom workflow state column for an organization and domain type.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/states-settings/create' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"organization_id": "string",
"name": "string",
"type": "trades",
"order": 0
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/states-settings/create', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"organization_id": "string",
"name": "string",
"type": "trades",
"order": 0
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/states-settings/create",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"organization_id": "string",
"name": "string",
"type": "trades",
"order": 0,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"organization_id": "string",
"name": "string",
"type": "trades",
"order": 0
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/states-settings/create');
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);Request body
| Field | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ObjectId this state column belongs to |
name | string | Yes | Display name of the state column |
type | string | Yes | The domain this state column belongs to (STATE_TYPE). One of: trades, saleOrders, deliveryOrders, purchases, purchaseOrders, purchaseRequests |
order | number | Yes | Display order within the same type; siblings are re-sequenced automatically |
note | string | No | Optional descriptive note for the state column |
bg_color | string | No | Background color hex code, e.g. #F1F2F4 |
{
"organization_id": "string",
"name": "string",
"type": "trades",
"order": 0,
"note": "string",
"bg_color": "string"
}Response
| Field | Type | Description |
|---|---|---|
_id | string | |
name | string | |
type | string | |
is_default | boolean | |
default_key | string | |
organization_id | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"type": "string",
"is_default": false,
"default_key": "string",
"organization_id": "string"
},
"time": "2025-05-01T12:00:00Z"
}GET /states-settings/get-by-id/{id}
Fetch a single workflow state column by ObjectId.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-by-id/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-by-id/6712f0a9c4d1e87b3a0f9911', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-by-id/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-by-id/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | State column ObjectId |
Request body
No request body.
Response
Same response shape as POST /states-settings/create.
POST /states-settings/get-paging
Flat sorted list of workflow state columns. Filterable by type, organization, and is_default. Returns a plain array sorted by {type, order} — not a {list, total} envelope.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-paging' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"type": "trades",
"types": [
"trades"
],
"organization_id": "string",
"is_default": false,
"with_item_count": false
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-paging', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"type": "trades",
"types": [
"trades"
],
"organization_id": "string",
"is_default": false,
"with_item_count": false
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-paging",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"type": "trades",
"types": [
"trades",
],
"organization_id": "string",
"is_default": False,
"with_item_count": False,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"type": "trades",
"types": [
"trades"
],
"organization_id": "string",
"is_default": false,
"with_item_count": false
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/states-settings/get-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);Request body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | No | Filter by STATE_TYPE domain. One of: trades, saleOrders, deliveryOrders, purchases, purchaseOrders, purchaseRequests |
types | string[] | No | Filter by multiple STATE_TYPE values |
organization_id | string | No | Filter by organization ObjectId |
is_default | boolean | No | When true, return only default (system-seeded) columns; false returns custom ones only |
with_item_count | boolean | No |
{
"type": "trades",
"types": [
"trades"
],
"organization_id": "string",
"is_default": false,
"with_item_count": false
}Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"_id": "string",
"name": "string",
"type": "string",
"is_default": false,
"default_key": "string",
"organization_id": "string"
}
],
"time": "2025-05-01T12:00:00Z"
}PUT /states-settings/update/{id}
Update an existing workflow state column. Changing order re-sequences sibling columns of the same type. order is silently dropped for default (system-seeded) columns.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/states-settings/update/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"order": 0,
"note": "string",
"bg_color": "string"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/states-settings/update/6712f0a9c4d1e87b3a0f9911', {
method: 'PUT',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "string",
"order": 0,
"note": "string",
"bg_color": "string"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"PUT",
"https://api.bito.uz/integration-api/integration/api/v2/states-settings/update/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"name": "string",
"order": 0,
"note": "string",
"bg_color": "string",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"name": "string",
"order": 0,
"note": "string",
"bg_color": "string"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/states-settings/update/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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);Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | State column ObjectId |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | New display name |
order | number | No | New display order. Silently dropped for default columns. |
note | string | No | Updated note |
bg_color | string | No | Updated background color hex code |
{
"name": "string",
"order": 0,
"note": "string",
"bg_color": "string"
}Response
Same response shape as POST /states-settings/create.
DELETE /states-settings/delete/{id}
Soft-delete a workflow state column (sets is_deleted=true). Guarded: default columns cannot be deleted, and columns still referenced by trade/sale-order/delivery-order documents are rejected with an error.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X DELETE 'https://api.bito.uz/integration-api/integration/api/v2/states-settings/delete/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/states-settings/delete/6712f0a9c4d1e87b3a0f9911', {
method: 'DELETE',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"DELETE",
"https://api.bito.uz/integration-api/integration/api/v2/states-settings/delete/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/states-settings/delete/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | State column ObjectId |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "string",
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.