Skip to content

Units of measure ​

INFO

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

POST /units-of-measure/create ​

This method allows adding units-of-measure into the account.

So‘rov tanasi

MaydonTurMajburiyTavsif
namestringHa
short_namestringYo‘q
codestringYo‘q
statusstringYo‘qMumkin qiymatlar: active, inactive. Standart: "active"
decimal_countintegerHaStandart: 0
typestringHaMumkin qiymatlar: inventory, service
json
{
  "name": "string",
  "short_name": "string",
  "code": "string",
  "status": "active",
  "decimal_count": 0,
  "type": "inventory"
}

Javob

MaydonTurTavsif
_idstring
namestring
codestring
short_namestring
statusstringMumkin qiymatlar: active, inactive
system_codestring
decimal_countintegerStandart: 0
typestringMumkin qiymatlar: inventory, service
is_defaultboolean
created_atstring (date-time)
updated_atstring (date-time)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "code": "string",
    "short_name": "string",
    "status": "active",
    "system_code": "string",
    "decimal_count": 0,
    "type": "inventory",
    "is_default": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /units-of-measure/update ​

This method allows updating units-of-measure in the account.

So‘rov tanasi

MaydonTurMajburiyTavsif
_idstringHa
namestringHa
short_namestringYo‘q
codestringYo‘q
statusstringYo‘qMumkin qiymatlar: active, inactive. Standart: "active"
decimal_countintegerHaStandart: 0
typestringYo‘qMumkin qiymatlar: inventory, service
json
{
  "_id": "67b486d242ed76693cd2cc59",
  "name": "string",
  "short_name": "string",
  "code": "string",
  "status": "active",
  "decimal_count": 0,
  "type": "inventory"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /units-of-measure/create.

DELETE /units-of-measure/delete/{id} ​

Delete a units-of-measure

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

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

GET /units-of-measure/get-all ​

Get all units-of-measures

So‘rov parametrlari

ParametrTurMajburiyTavsif
searchstringYo‘qSearch units-of-measure
typestringYo‘qMumkin qiymatlar: inventory, service
statusstringYo‘qMumkin qiymatlar: active, inactive

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "_id": "string",
      "name": "string",
      "code": "string",
      "short_name": "string",
      "status": "active",
      "system_code": "string",
      "decimal_count": 0,
      "type": "inventory",
      "is_default": false,
      "created_at": "2025-05-01T12:00:00Z",
      "updated_at": "2025-05-01T12:00:00Z"
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

GET /units-of-measure/get-by-id/{id} ​

Get units-of-measure using its _id

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /units-of-measure/create.

GET /units-of-measure/get-deleted ​

Get deleted units-of-measure ids

So‘rov parametrlari

ParametrTurMajburiyTavsif
deleted_atstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

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

POST /units-of-measure/get-paging ​

Get units-of-measure by paging

So‘rov tanasi

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
searchstringYo‘q
typestringYo‘qMumkin qiymatlar: inventory, service
statusstringYo‘qMumkin qiymatlar: active, inactive
json
{
  "page": 1,
  "limit": 20,
  "search": "string",
  "type": "inventory",
  "status": "active"
}

Javob

data.total — jami yozuvlar soni, data.data[] — joriy sahifadagi yozuvlar. Quyidagi jadval bitta yozuvni tavsiflaydi.

MaydonTurTavsif
namestring
codestring
short_namestring
statusstringMumkin qiymatlar: active, inactive
system_codestring
decimal_countintegerStandart: 0
typestringMumkin qiymatlar: inventory, service
updated_by_userobject
updated_by_user._idstring
updated_by_user.full_namestring
created_by_userobject
created_by_user._idstring
created_by_user.full_namestring
created_atstring (date-time)
updated_atstring (date-time)
is_defaultboolean
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "data": [
      {
        "name": "string",
        "code": "string",
        "short_name": "string",
        "status": "active",
        "system_code": "string",
        "decimal_count": 0,
        "type": "inventory",
        "updated_by_user": {
          "_id": "string",
          "full_name": "string"
        },
        "created_by_user": {
          "_id": "string",
          "full_name": "string"
        },
        "created_at": "2025-05-01T12:00:00Z",
        "updated_at": "2025-05-01T12:00:00Z",
        "is_default": false
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API