Skip to content

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.

Request body

FieldTypeRequiredDescription
organization_idstringYesOrganization ObjectId this state column belongs to
namestringYesDisplay name of the state column
typestringYesThe domain this state column belongs to (STATE_TYPE). One of: trades, saleOrders, deliveryOrders, purchases, purchaseOrders, purchaseRequests
ordernumberYesDisplay order within the same type; siblings are re-sequenced automatically
notestringNoOptional descriptive note for the state column
bg_colorstringNoBackground color hex code, e.g. #F1F2F4
json
{
  "organization_id": "string",
  "name": "string",
  "type": "trades",
  "order": 0,
  "note": "string",
  "bg_color": "string"
}

Response

FieldTypeDescription
_idstring
namestring
typestring
is_defaultboolean
default_keystring
organization_idstring
json
{
  "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.

Path parameters

ParameterTypeRequiredDescription
idstringYesState 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.

Request body

FieldTypeRequiredDescription
typestringNoFilter by STATE_TYPE domain. One of: trades, saleOrders, deliveryOrders, purchases, purchaseOrders, purchaseRequests
typesstring[]NoFilter by multiple STATE_TYPE values
organization_idstringNoFilter by organization ObjectId
is_defaultbooleanNoWhen true, return only default (system-seeded) columns; false returns custom ones only
json
{
  "type": "trades",
  "types": [
    "trades"
  ],
  "organization_id": "string",
  "is_default": false
}

Response

json
{
  "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.

Path parameters

ParameterTypeRequiredDescription
idstringYesState column ObjectId

Request body

FieldTypeRequiredDescription
namestringNoNew display name
ordernumberNoNew display order. Silently dropped for default columns.
notestringNoUpdated note
bg_colorstringNoUpdated background color hex code
json
{
  "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.

Path parameters

ParameterTypeRequiredDescription
idstringYesState column ObjectId

Request body

No request body.

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "string",
  "time": "2025-05-01T12:00:00Z"
}

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API