Skip to content

Customer category ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /customer-category/create ​

This method allows adding customer-category into the account.

Тело запроса

ПолеТипОбязательноОписание
namestringДа
parent_idstringНет
organization_idsstring[]Нет
imagestringНет
json
{
  "name": "string",
  "parent_id": "string",
  "organization_ids": [
    "string"
  ],
  "image": "string"
}

Ответ

ПолеТипОписание
_idstringid of customer-category
namestring
child_countnumber
item_countnumber
imagestring
organization_idsstring[]
parentobject
parent._idstring
parent.namestring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "child_count": 0,
    "item_count": 0,
    "image": "string",
    "organization_ids": [
      "string"
    ],
    "parent": {
      "_id": "string",
      "name": "string"
    }
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /customer-category/update ​

This method allows updating customer-category in the account.

Тело запроса

ПолеТипОбязательноОписание
namestringДа
parent_idstringНет
organization_idsstring[]Нет
imagestringНет
_idstringДаid of customer-category
json
{
  "name": "string",
  "parent_id": "string",
  "organization_ids": [
    "string"
  ],
  "image": "string",
  "_id": "string"
}

Ответ

Структура ответа совпадает с POST /customer-category/create.

DELETE /customer-category/delete/{id} ​

Delete a customer-category

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

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

GET /customer-category/get-by-id/{id} ​

Get customer-category using its _id

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

Структура ответа совпадает с POST /customer-category/create.

POST /customer-category/get-paging ​

Get customer-categories by paging

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
updated_atstringНет
organization_idstringНет
organization_idsstring[]Нет
json
{
  "page": 1,
  "limit": 20,
  "updated_at": "string",
  "organization_id": "string",
  "organization_ids": [
    "string"
  ]
}

Ответ

data.total — общее количество записей, data.data[] — записи текущей страницы. Таблица ниже описывает одну запись.

ПолеТипОписание
_idstringid of customer-category
namestring
child_countnumber
item_countnumber
imagestring
organization_idsstring[]
parentobject
parent._idstring
parent.namestring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "data": [
      {
        "_id": "string",
        "name": "string",
        "child_count": 0,
        "item_count": 0,
        "image": "string",
        "organization_ids": [
          "string"
        ],
        "parent": {
          "_id": "string",
          "name": "string"
        }
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /customer-category/get-deleted ​

Get deleted customer-category ids

Параметры запроса

ПараметрТипОбязательноОписание
deleted_atstringДа

Тело запроса

Тело запроса не требуется.

Ответ

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

Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API