Skip to content

Attribute ​

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 /attribute/create ​

This method allows adding attribute into the account.

Request body

FieldTypeRequiredDescription
namestringYes
is_activebooleanYesDefault: true
itemsstring[]Yes
json
{
  "name": "string",
  "is_active": true,
  "items": [
    "string"
  ]
}

Response

FieldTypeDescription
_idstring
namestring
is_activeboolean
itemsobject[]
items[]._idstring
items[].namestring
items[].attribute_idstring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "is_active": false,
    "items": [
      {
        "_id": "string",
        "name": "string",
        "attribute_id": "string"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /attribute/update ​

This method allows updating attribute in the account.

Request body

FieldTypeRequiredDescription
_idstringNo
namestringNo
is_activebooleanNoDefault: true
itemsstring[]No
json
{
  "_id": "63f8b0c4e4b0d3a2f8e4b0c4",
  "name": "string",
  "is_active": true,
  "items": [
    "string"
  ]
}

Response

Same response shape as POST /attribute/create.

GET /attribute/get-all ​

Get all attributes

Query parameters

ParameterTypeRequiredDescription
is_activebooleanNo
searchstringNo

Request body

No request body.

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "_id": "string",
      "name": "string",
      "is_active": false,
      "items": [
        {
          "_id": null,
          "name": null,
          "attribute_id": null
        }
      ]
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

GET /attribute/get-by-id/{id} ​

Get attribute using its _id

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

Same response shape as POST /attribute/create.

POST /attribute/get-paging ​

Get attributes by paging

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
searchstringNo
is_activebooleanNo
json
{
  "page": 1,
  "limit": 20,
  "search": "string",
  "is_active": false
}

Response

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

FieldTypeDescription
_idstring
namestring
is_activeboolean
itemsobject[]
items[]._idstring
items[].namestring
items[].attribute_idstring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "data": [
      {
        "_id": "string",
        "name": "string",
        "is_active": false,
        "items": [
          {
            "_id": "string",
            "name": "string",
            "attribute_id": "string"
          }
        ]
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API