Skip to content

Extra cost ​

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 /extra-cost/create ​

This method allows adding extra-cost into the account.

So‘rov tanasi

MaydonTurMajburiyTavsif
namestringHa
is_affect_pricebooleanHaStandart: false
distribution_methodstringHaMumkin qiymatlar: byPrice, byAmount, byGrossWeight, byVolume, manual. Standart: "byPrice"
recommended_amountnumberHaStandart: 0
max_amountnumberHaStandart: 0
currency_idstringHa
payment_type_idstringHa
user_typestringYo‘qMumkin qiymatlar: supplier, employee, customer, person, other. Standart: "supplier"
customer_idstringYo‘q
supplier_idstringYo‘q
employee_idstringYo‘q
person_idstringYo‘q
statusstringHaMumkin qiymatlar: active, inactive. Standart: "active"
notestringYo‘q
json
{
  "name": "string",
  "is_affect_price": false,
  "distribution_method": "byPrice",
  "recommended_amount": 0,
  "max_amount": 0,
  "currency_id": "646b0c2f3d4e1a001f8b4567",
  "payment_type_id": "646b0c2f3d4e1a001f8b4567",
  "user_type": "supplier",
  "customer_id": "646b0c2f3d4e1a001f8b4567",
  "supplier_id": "646b0c2f3d4e1a001f8b4567",
  "employee_id": "646b0c2f3d4e1a001f8b4567",
  "person_id": "646b0c2f3d4e1a001f8b4567",
  "status": "active",
  "note": "string"
}

Javob

MaydonTurTavsif
namestring
is_affect_priceboolean
distribution_methodstring
amountnumber
should_create_transactionboolean
recommended_amountnumber
max_amountnumber
notestring
statusstringMumkin qiymatlar: active, inactive
payment_typeobject
payment_type._idstring
payment_type.namestring
payment_type.user_typestring
currency_idstring
currencyobject
currency._idstring
currency.namestring
updated_by_userobject
updated_by_user._idstring
updated_by_user.full_namestring
created_by_userobject
created_by_user._idstring
created_by_user.full_namestring
employeeobject
employee._idstring
employee.full_namestring
customerobject
customer._idstring
customer.namestring
supplierobject
supplier._idstring
supplier.namestring
personobject
person._idstring
person.namestring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "name": "string",
    "is_affect_price": false,
    "distribution_method": "string",
    "amount": 0,
    "should_create_transaction": false,
    "recommended_amount": 0,
    "max_amount": 0,
    "note": "string",
    "status": "active",
    "payment_type": {
      "_id": "string",
      "name": "string",
      "user_type": "string"
    },
    "currency_id": "string",
    "currency": {
      "_id": "string",
      "name": "string"
    },
    "updated_by_user": {
      "_id": "string",
      "full_name": "string"
    },
    "created_by_user": {
      "_id": "string",
      "full_name": "string"
    },
    "employee": {
      "_id": "string",
      "full_name": "string"
    },
    "customer": {
      "_id": "string",
      "name": "string"
    },
    "supplier": {
      "_id": "string",
      "name": "string"
    },
    "person": {
      "_id": "string",
      "name": "string"
    }
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /extra-cost/update ​

This method allows updating extra-cost in the account.

So‘rov tanasi

MaydonTurMajburiyTavsif
_idstringHa
namestringHa
is_affect_pricebooleanHaStandart: false
distribution_methodstringHaMumkin qiymatlar: byPrice, byAmount, byGrossWeight, byVolume, manual. Standart: "byPrice"
recommended_amountnumberHaStandart: 0
max_amountnumberHaStandart: 0
currency_idstringHa
payment_type_idstringHa
user_typestringYo‘qMumkin qiymatlar: supplier, employee, customer, person, other. Standart: "supplier"
customer_idstringYo‘q
supplier_idstringYo‘q
employee_idstringYo‘q
person_idstringYo‘q
statusstringHaMumkin qiymatlar: active, inactive. Standart: "active"
notestringYo‘q
json
{
  "_id": "646b0c2f3d4e1a001f8b4567",
  "name": "string",
  "is_affect_price": false,
  "distribution_method": "byPrice",
  "recommended_amount": 0,
  "max_amount": 0,
  "currency_id": "646b0c2f3d4e1a001f8b4567",
  "payment_type_id": "646b0c2f3d4e1a001f8b4567",
  "user_type": "supplier",
  "customer_id": "646b0c2f3d4e1a001f8b4567",
  "supplier_id": "646b0c2f3d4e1a001f8b4567",
  "employee_id": "646b0c2f3d4e1a001f8b4567",
  "person_id": "646b0c2f3d4e1a001f8b4567",
  "status": "active",
  "note": "string"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /extra-cost/create.

DELETE /extra-cost/delete/{id} ​

Delete a extra-cost

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 /extra-cost/get-all ​

Get all extra-costs

So‘rov parametrlari

ParametrTurMajburiyTavsif
statusstringYo‘qMumkin qiymatlar: active, inactive
distribution_method_nestringYo‘qMumkin qiymatlar: byPrice, byAmount, byGrossWeight, byVolume, manual

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "name": "string",
      "is_affect_price": false,
      "distribution_method": "string",
      "amount": 0,
      "should_create_transaction": false,
      "recommended_amount": 0,
      "max_amount": 0,
      "note": "string",
      "status": "active",
      "payment_type": {
        "_id": "string",
        "name": "string",
        "user_type": "string"
      },
      "currency_id": "string",
      "currency": {
        "_id": "string",
        "name": "string"
      },
      "updated_by_user": {
        "_id": "string",
        "full_name": "string"
      },
      "created_by_user": {
        "_id": "string",
        "full_name": "string"
      },
      "employee": {
        "_id": "string",
        "full_name": "string"
      },
      "customer": {
        "_id": "string",
        "name": "string"
      },
      "supplier": {
        "_id": "string",
        "name": "string"
      },
      "person": {
        "_id": "string",
        "name": "string"
      }
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

GET /extra-cost/get-by-id/{id} ​

Get extra-cost using its _id

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /extra-cost/create.

GET /extra-cost/get-deleted ​

Get deleted extra-cost 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 /extra-cost/get-paging ​

Get extra-cost by paging

So‘rov tanasi

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
searchstringYo‘q
distribution_method_nestringYo‘qMumkin qiymatlar: byPrice, byAmount, byGrossWeight, byVolume, manual. Standart: "byPrice"
statusstringYo‘qMumkin qiymatlar: active, inactive
json
{
  "page": 1,
  "limit": 20,
  "search": "string",
  "distribution_method_ne": "byPrice",
  "status": "active"
}

Javob

MaydonTurTavsif
codenumbersystem code of response. Standart: 0
messagestring
status_codenumberstatus code of response. Standart: 200
messagesobject
messages.uzstring
messages.rustring
messages.enstring
timestring (date-time)time of response
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "code": 0,
    "message": "Success",
    "status_code": 200,
    "messages": {
      "uz": "Muvaffaqiyatli",
      "ru": "Успешно",
      "en": "Successful"
    },
    "time": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API