Extra cost
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 /extra-cost/create
This method allows adding extra-cost into the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
is_affect_price | boolean | Yes | Default: false |
distribution_method | string | Yes | One of: byPrice, byAmount, byGrossWeight, byVolume, manual. Default: "byPrice" |
recommended_amount | number | Yes | Default: 0 |
max_amount | number | Yes | Default: 0 |
currency_id | string | Yes | |
payment_type_id | string | Yes | |
user_type | string | No | One of: supplier, employee, customer, person, other. Default: "supplier" |
customer_id | string | No | |
supplier_id | string | No | |
employee_id | string | No | |
person_id | string | No | |
status | string | Yes | One of: active, inactive. Default: "active" |
note | string | No |
{
"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"
}Response
| Field | Type | Description |
|---|---|---|
name | string | |
is_affect_price | boolean | |
distribution_method | string | |
amount | number | |
should_create_transaction | boolean | |
recommended_amount | number | |
max_amount | number | |
note | string | |
status | string | One of: active, inactive |
payment_type | object | |
payment_type._id | string | |
payment_type.name | string | |
payment_type.user_type | string | |
currency_id | string | |
currency | object | |
currency._id | string | |
currency.name | string | |
updated_by_user | object | |
updated_by_user._id | string | |
updated_by_user.full_name | string | |
created_by_user | object | |
created_by_user._id | string | |
created_by_user.full_name | string | |
employee | object | |
employee._id | string | |
employee.full_name | string | |
customer | object | |
customer._id | string | |
customer.name | string | |
supplier | object | |
supplier._id | string | |
supplier.name | string | |
person | object | |
person._id | string | |
person.name | string |
{
"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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | |
name | string | Yes | |
is_affect_price | boolean | Yes | Default: false |
distribution_method | string | Yes | One of: byPrice, byAmount, byGrossWeight, byVolume, manual. Default: "byPrice" |
recommended_amount | number | Yes | Default: 0 |
max_amount | number | Yes | Default: 0 |
currency_id | string | Yes | |
payment_type_id | string | Yes | |
user_type | string | No | One of: supplier, employee, customer, person, other. Default: "supplier" |
customer_id | string | No | |
supplier_id | string | No | |
employee_id | string | No | |
person_id | string | No | |
status | string | Yes | One of: active, inactive. Default: "active" |
note | string | No |
{
"_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"
}Response
Same response shape as POST /extra-cost/create.
DELETE /extra-cost/delete/{id}
Delete a extra-cost
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}GET /extra-cost/get-all
Get all extra-costs
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | One of: active, inactive |
distribution_method_ne | string | No | One of: byPrice, byAmount, byGrossWeight, byVolume, manual |
Request body
No request body.
Response
{
"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
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /extra-cost/create.
GET /extra-cost/get-deleted
Get deleted extra-cost ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
{
"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
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
search | string | No | |
distribution_method_ne | string | No | One of: byPrice, byAmount, byGrossWeight, byVolume, manual. Default: "byPrice" |
status | string | No | One of: active, inactive |
{
"page": 1,
"limit": 20,
"search": "string",
"distribution_method_ne": "byPrice",
"status": "active"
}Response
| Field | Type | Description |
|---|---|---|
code | number | system code of response. Default: 0 |
message | string | |
status_code | number | status code of response. Default: 200 |
messages | object | |
messages.uz | string | |
messages.ru | string | |
messages.en | string | |
time | string (date-time) | time of response |
{
"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"
}This page is generated from the OpenAPI spec.