Skip to content

Customer category ​

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 /customer-category/create ​

This method allows adding customer-category into the account.

Request body

FieldTypeRequiredDescription
namestringYes
parent_idstringNo
organization_idsstring[]No
imagestringNo
json
{
  "name": "string",
  "parent_id": "string",
  "organization_ids": [
    "string"
  ],
  "image": "string"
}

Response

FieldTypeDescription
_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.

Request body

FieldTypeRequiredDescription
namestringYes
parent_idstringNo
organization_idsstring[]No
imagestringNo
_idstringYesid of customer-category
json
{
  "name": "string",
  "parent_id": "string",
  "organization_ids": [
    "string"
  ],
  "image": "string",
  "_id": "string"
}

Response

Same response shape as POST /customer-category/create.

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

Delete a customer-category

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

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

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

Same response shape as POST /customer-category/create.

POST /customer-category/get-paging ​

Get customer-categories by paging

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
updated_atstringNo
organization_idstringNo
organization_idsstring[]No
json
{
  "page": 1,
  "limit": 20,
  "updated_at": "string",
  "organization_id": "string",
  "organization_ids": [
    "string"
  ]
}

Response

data.total is the total number of records and data.data[] holds the current page. The table below describes one record.

FieldTypeDescription
_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

Query parameters

ParameterTypeRequiredDescription
deleted_atstringYes

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