Skip to content

Custom field ​

INFO

Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.

GET /custom-field/get-all ​

List custom fields, optionally filtered by the target collection (table_name).

So‘rov parametrlari

ParametrTurMajburiyTavsif
table_namestringYo‘qFilter by target collection (e.g. customers, products, trades).

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "_id": "string",
      "table_name": "string",
      "type": "string",
      "name": "string",
      "code": "string",
      "regex": "string",
      "error_message": "string",
      "is_required": false,
      "is_api_only": false,
      "is_visible": false,
      "order": 0,
      "options": [
        {
          "position": null,
          "value": null
        }
      ],
      "organization_specs": [
        {
          "organization_id": null,
          "required_state_id": null
        }
      ],
      "accessed_user_ids": [
        "string"
      ],
      "created_at": "2025-05-01T12:00:00Z",
      "updated_at": "2025-05-01T12:00:00Z"
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

POST /custom-field/create ​

Create a custom field on a target collection.

So‘rov tanasi

MaydonTurMajburiyTavsif
table_namestringHaTarget collection (e.g. customers, products, trades, saleOrders).
typestringHaMumkin qiymatlar: text, number, date, boolean, select, multi_select, radio_button, textarea
namestringHa
codestringYo‘q
regexstringYo‘qOptional regex for client-side validation.
error_messagestringYo‘qError message shown when regex fails.
is_requiredbooleanHaStandart: false
is_api_onlybooleanYo‘qHide from UI; only available via API.. Standart: false
is_visiblebooleanYo‘qStandart: true
ordernumberYo‘q
organization_specsobject[]Yo‘qPer-organization required-state overrides.
organization_specs[].organization_idstringYo‘q
organization_specs[].required_state_idstringYo‘q
accessed_user_idsstring[]Yo‘q
optionsobject[]Yo‘qRequired when type is select / multi_select / radio_button.
options[].positionnumberHa
options[].valuestringHa
json
{
  "table_name": "customers",
  "type": "text",
  "name": "Loyalty tier",
  "code": "loyalty_tier",
  "regex": "string",
  "error_message": "string",
  "is_required": false,
  "is_api_only": false,
  "is_visible": true,
  "order": 1,
  "organization_specs": [
    {
      "organization_id": "64b7f4d9e2b3b6a0b7c5d80a",
      "required_state_id": "64b7f4d9e2b3b6a0b7c5d80a"
    }
  ],
  "accessed_user_ids": [
    "64b7f4d9e2b3b6a0b7c5d80a"
  ],
  "options": [
    {
      "position": 1,
      "value": "Gold"
    }
  ]
}

Javob

MaydonTurTavsif
_idstring
table_namestring
typestring
namestring
codestring
regexstring
error_messagestring
is_requiredboolean
is_api_onlyboolean
is_visibleboolean
ordernumber
optionsobject[]
options[].positionnumber
options[].valuestring
organization_specsobject[]
organization_specs[].organization_idstring
organization_specs[].required_state_idstring
accessed_user_idsstring[]
created_atstring (date-time)
updated_atstring (date-time)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "table_name": "string",
    "type": "string",
    "name": "string",
    "code": "string",
    "regex": "string",
    "error_message": "string",
    "is_required": false,
    "is_api_only": false,
    "is_visible": false,
    "order": 0,
    "options": [
      {
        "position": 0,
        "value": "string"
      }
    ],
    "organization_specs": [
      {
        "organization_id": "string",
        "required_state_id": "string"
      }
    ],
    "accessed_user_ids": [
      "string"
    ],
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API