Sale order
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 /sale-order/create
Create a sale order. The optional uuid field is tenant-global among active sale orders. The authenticated integration source gates replay: a same-source replay returns the active existing order, while an active UUID owned by another or missing source returns the existing sale-order collision error. Omitting uuid preserves normal creation behavior. After an order is soft-deleted, its UUID may be reused.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
uuid | string | No | Optional external idempotency key. UUID uniqueness is tenant-global among active sale orders. The authenticated integration source gates replay: if it owns the active UUID, the existing order is returned; an active UUID owned by another or missing source returns the sale-order AlreadyExists collision. Source ownership is never accepted from the request body. After an order is soft-deleted, its UUID may be reused. |
code | string | No | |
name | string | No | |
organization_id | string | Yes | |
visit_id | string | No | |
customer_id | string | Yes | |
customer_assistant_id | string | No | |
responsible_id | string | Yes | |
currency_id | string | No | |
currency | object | No | |
currency._id | string (objectId) | No | |
currency.numerator | number | Yes | |
currency.denominator | number | Yes | |
currency.value | number | Yes | |
currency.precision | number | No | |
currency.round_type | string | No | One of: floor, ceil, round |
state | string | Yes | One of: new, draft, in_progress, canceled, done, accepted |
state_id | string | No | |
date | string | Yes | |
delivery_date | string | No | |
note | string | No | Complete order note. Integration creates preserve long courier, pickup, and customer instructions; the API request-body limit still applies. |
discounts | object[] | Yes | |
discounts[]._id | string (objectId) | No | |
discounts[].value | number | Yes | |
discounts[].name | string | Yes | |
discounts[].apply_type | string | No | One of: percent, cash |
discounts[].is_custom | boolean | No | |
products | object[] | Yes | |
products[].product_id | string (objectId) | Yes | |
products[].amount | number | Yes | |
products[].price | number | Yes | |
products[].real_price | number | No | |
products[].discounts | object[] | No | |
products[].discounts[]._id | string (objectId) | No | |
products[].discounts[].value | number | Yes | |
products[].discounts[].name | string | Yes | |
products[].discounts[].apply_type | string | No | One of: percent, cash |
products[].discounts[].is_custom | boolean | No | |
products[].price_id | string (objectId) | Yes | |
products[].warehouse_id | string (objectId) | Yes | |
products[].box_count | number | No | |
products[].box_item | number | No | |
products[].product | object | No | |
products[].product.name | string | No | |
products[].product.product_id | string | No | |
products[].product.measure_id | string | No | |
products[].product.measure | object | No | |
delivery_address | object | No | |
delivery_address.long | number | Yes | |
delivery_address.lat | number | Yes | |
delivery_address.human_address | object | No | |
delivery_address.human_address.addres | string | No | |
delivery_address.human_address.city | string | No | |
delivery_address.human_address.state | string | No | |
delivery_address.human_address.zip | string | No | |
price_id | string | No | |
custom_fields | object | No | |
custom_fields._id | string | No | |
custom_fields.value | object | No |
{
"uuid": "external-order-123",
"code": "string",
"name": "string",
"organization_id": "67b486d242ed76693cd2cc59",
"visit_id": "67b486d242ed76693cd2cc59",
"customer_id": "67b486d242ed76693cd2cc59",
"customer_assistant_id": "67b486d242ed76693cd2cc59",
"responsible_id": "67b486d242ed76693cd2cc59",
"currency_id": "67b486d242ed76693cd2cc59",
"currency": {
"_id": "66126f4b1e2f4a9cb4244c8f",
"numerator": 1,
"denominator": 1000,
"value": 11000,
"precision": 3,
"round_type": "floor"
},
"state": "new",
"state_id": "67b486d242ed76693cd2cc59",
"date": "2023-10-01T12:00:00Z",
"delivery_date": "2023-10-01T12:00:00Z",
"note": "string",
"discounts": [
{
"_id": "66126f4b1e2f4a9cb4244c90",
"value": 10,
"name": "10%",
"apply_type": "percent",
"is_custom": true
}
],
"products": [
{
"product_id": "66126f4b1e2f4a9cb4244a01",
"amount": 2,
"price": 15000,
"real_price": 14500,
"discounts": [],
"price_id": "66126f4b1e2f4a9cb4244a02",
"warehouse_id": "66126f4b1e2f4a9cb4244a03",
"box_count": 2,
"box_item": 24,
"product": {
"name": null,
"product_id": null,
"measure_id": null,
"measure": null
}
}
],
"delivery_address": {
"long": 0,
"lat": 0,
"human_address": {
"addres": "string",
"city": "string",
"state": "string",
"zip": "string"
}
},
"price_id": "2023-10-01T12:00:00Z",
"custom_fields": {
"_id": "67b486d242ed76693cd2cc59",
"value": {}
}
}Response
| Field | Type | Description |
|---|---|---|
_id | string | |
created_at | string | |
updated_at | string | |
name | string | |
uuid | string | |
visit_id | string | |
code | string | |
organization_id | string | |
organization | object | |
organization._id | string | |
organization.name | string | |
customer_id | string | |
customer | object | |
customer._id | string | |
customer.type | string | One of: legal, natural |
customer.phone_number | string | |
customer.phone_numbers | string[] | |
customer.name | string | |
customer.image | string | |
customer.custom_fields | object[] | |
customer.custom_fields[]._id | string | |
customer.custom_fields[].value | object | |
customer_assistant | object | |
customer_assistant._id | string | |
customer_assistant.name | string | |
customer_assistant.type | string | One of: legal, natural |
customer_assistant_hierarchy | object[] | |
customer_assistant_hierarchy[]._id | string | |
customer_assistant_hierarchy[].name | string | |
customer_assistant_hierarchy[].type | string | One of: legal, natural |
customer_assistant_hierarchy[].first_name | string | |
customer_assistant_hierarchy[].last_name | string | |
customer_assistant_hierarchy[].middle_name | string | |
responsible_id | string | |
customer_image_url | string | |
responsible | object | |
responsible._id | string | |
responsible.full_name | string | |
price_id | string | |
price | object | |
price._id | string | |
price.name | string | |
price.short_name | string | |
price.code | string | |
state_id | string | |
state | string | One of: new, draw, in_progress, canceled, done, accepted |
note | string | |
date | string | |
delivery_date | string | |
number | string | |
device | object | |
device._id | string | |
device.name | string | |
device.device_id | string | |
currency | object | |
currency._id | string (objectId) | |
currency.to_currency_id | string (objectId) | |
currency.uuid | number | |
currency.name | string | |
currency.value | number | |
currency.symbol | string | |
currency.side | string | One of: start, end |
currency.numerator | number | |
currency.denominator | number | |
currency.round_type | string | One of: floor, ceil, round |
currency.precision | number | |
currency_id | string | |
total_to_pay | number | |
total_price | number | |
discount | number | |
total_discount | number | |
discounts | object[] | |
discounts[]._id | string | |
discounts[].name | string | |
discounts[].value | number | |
discounts[].apply_type | string | One of: percent, cash |
discounts[].currency_id | string | |
products | object[] | |
delivery_address | object | |
delivery_address.long | number | |
delivery_address.lat | number | |
delivery_address.human_address | object | |
delivery_address.human_address.addres | string | |
delivery_address.human_address.city | string | |
delivery_address.human_address.state | string | |
delivery_address.human_address.zip | string | |
total_sale | number | |
total_amount | number | |
trade_status | string | One of: zero, partial, fully |
trades | object[] | |
trades[]._id | string | |
trades[].type | string | One of: b2b, b2c |
trades[].organization_id | string | |
trades[].state | string | One of: new, in_progress, draft, canceled, done |
trades[].state_id | string | |
trades[].number | string | |
trades[].uuid | number | |
trades[].currency | object | |
trades[].currency._id | string | |
trades[].currency.to_currency_id | string | |
trades[].currency.name | string | |
trades[].currency.value | number | |
trades[].currency.numerator | number | |
trades[].currency.denominator | number | |
trades[].currency.round_type | string | One of: floor, ceil, round |
trades[].currency.precision | number | |
trades[].cashbox_id | string | |
trades[].calc_tax_after_discount | boolean | |
trades[].sale_settings | object | |
trades[].sale_settings.discount | number | |
trades[].total_extra_cost | number | |
trades[].total_effected_extra_cost | number | |
custom_fields | object[] | |
custom_fields[]._id | string | |
custom_fields[].value | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"uuid": "external-order-123",
"visit_id": "67b486d242ed76693cd2cc59",
"code": "67b486d242ed76693cd2cc59",
"organization_id": "67b486d242ed76693cd2cc59",
"organization": {
"_id": "string",
"name": "string"
},
"customer_id": "67b486d242ed76693cd2cc59",
"customer": {
"_id": "string",
"type": "legal",
"phone_number": "string",
"phone_numbers": [
"string"
],
"name": "string",
"image": "string",
"custom_fields": [
{
"_id": null,
"value": null
}
]
},
"customer_assistant": {
"_id": "string",
"name": "string",
"type": "legal"
},
"customer_assistant_hierarchy": [
{
"_id": "string",
"name": "string",
"type": "legal",
"first_name": "string",
"last_name": "string",
"middle_name": "string"
}
],
"responsible_id": "string",
"customer_image_url": "string",
"responsible": {
"_id": "string",
"full_name": "string"
},
"price_id": "string",
"price": {
"_id": "string",
"name": "string",
"short_name": "string",
"code": "string"
},
"state_id": "string",
"state": "new",
"note": "string",
"date": "string",
"delivery_date": "string",
"number": "string",
"device": {
"_id": "string",
"name": "string",
"device_id": "string"
},
"currency": {
"_id": "66126f4b1e2f4a9cb4244c8b",
"to_currency_id": "66126f4b1e2f4a9cb4244c8c",
"uuid": "66126f4b1e2f4a9cb4244c8d",
"name": "string",
"value": 1,
"symbol": "string",
"side": "start",
"numerator": 1,
"denominator": 1,
"round_type": "floor",
"precision": 3
},
"currency_id": "string",
"total_to_pay": 0,
"total_price": 0,
"discount": 0,
"total_discount": 0,
"discounts": [
{
"_id": "string",
"name": "string",
"value": 0,
"apply_type": "percent",
"currency_id": "string"
}
],
"products": [
{}
],
"delivery_address": {
"long": 0,
"lat": 0,
"human_address": {
"addres": "string",
"city": "string",
"state": "string",
"zip": "string"
}
},
"total_sale": 0,
"total_amount": 0,
"trade_status": "zero",
"trades": [
{
"_id": "string",
"type": "b2b",
"organization_id": "string",
"state": "new",
"state_id": "string",
"number": "string",
"uuid": 0,
"currency": {
"_id": null,
"to_currency_id": null,
"name": null,
"value": null,
"numerator": null,
"denominator": null,
"round_type": null,
"precision": null
},
"cashbox_id": "string",
"calc_tax_after_discount": false,
"sale_settings": {
"discount": null
},
"total_extra_cost": 0,
"total_effected_extra_cost": 0
}
],
"custom_fields": [
{
"_id": "string",
"value": "string"
}
]
},
"time": "2025-05-01T12:00:00Z"
}PUT /sale-order/update
This method allows updating saler-order in the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | |
code | string | No | |
name | string | No | |
organization_id | string | No | |
visit_id | string | No | |
customer_id | string | No | |
customer_assistant_id | string | No | |
responsible_id | string | No | |
currency_id | string | Yes | |
currency | object | No | |
currency._id | string (objectId) | No | |
currency.numerator | number | Yes | |
currency.denominator | number | Yes | |
currency.value | number | Yes | |
currency.precision | number | No | |
currency.round_type | string | No | One of: floor, ceil, round |
date | string | No | |
delivery_date | string | No | |
note | string | No | |
discounts | object[] | Yes | |
discounts[]._id | string (objectId) | No | |
discounts[].value | number | Yes | |
discounts[].name | string | Yes | |
discounts[].discount_apply_type | string | No | One of: percentage, cash |
discounts[].currency_id | string (objectId) | No | |
products | object[] | Yes | |
products[].product_id | string (objectId) | Yes | |
products[].amount | number | Yes | |
products[].price | number | Yes | |
products[].real_price | number | No | |
products[].discounts | object[] | No | |
products[].discounts[]._id | string (objectId) | No | |
products[].discounts[].value | number | Yes | |
products[].discounts[].name | string | Yes | |
products[].discounts[].discount_apply_type | string | No | One of: percent, cash |
products[].discounts[].currency_id | string (objectId) | No | |
products[].price_id | string (objectId) | Yes | |
products[].warehouse_id | string (objectId) | Yes | |
products[].box_count | number | No | |
products[].box_item | number | No | |
products[].product | object | No | |
products[].product.name | string | No | |
products[].product.product_id | string | No | |
products[].product.measure_id | string | No | |
products[].product.measure | object | No | |
delivery_address | object | No | |
delivery_address.long | number | Yes | |
delivery_address.lat | number | Yes | |
delivery_address.human_address | object | No | |
delivery_address.human_address.addres | string | No | |
delivery_address.human_address.city | string | No | |
delivery_address.human_address.state | string | No | |
delivery_address.human_address.zip | string | No | |
price_id | string | No | |
custom_fields | object | No | |
custom_fields._id | string | No | |
custom_fields.value | string | No | must be any data types |
is_offline | boolean | No |
{
"_id": "67b486d242ed76693cd2cc59",
"code": "",
"name": "",
"organization_id": "67b486d242ed76693cd2cc59",
"visit_id": "67b486d242ed76693cd2cc59",
"customer_id": "67b486d242ed76693cd2cc59",
"customer_assistant_id": "67b486d242ed76693cd2cc59",
"responsible_id": "67b486d242ed76693cd2cc59",
"currency_id": "67b486d242ed76693cd2cc59",
"currency": {
"_id": "66126f4b1e2f4a9cb4244c8f",
"numerator": 1,
"denominator": 1000,
"value": 11000,
"precision": 3,
"round_type": "floor"
},
"date": "2023-10-01T12:00:00Z",
"delivery_date": "2023-10-01T12:00:00Z",
"note": "string",
"discounts": [
{
"_id": "66126f4b1e2f4a9cb4244c90",
"value": 10,
"name": "10%",
"discount_apply_type": "percentage",
"currency_id": "66126f4b1e2f4a9cb4244c91"
}
],
"products": [
{
"product_id": "66126f4b1e2f4a9cb4244a01",
"amount": 2,
"price": 15000,
"real_price": 14500,
"discounts": [],
"price_id": "66126f4b1e2f4a9cb4244a02",
"warehouse_id": "66126f4b1e2f4a9cb4244a03",
"box_count": 2,
"box_item": 24,
"product": {
"name": null,
"product_id": null,
"measure_id": null,
"measure": null
}
}
],
"delivery_address": {
"long": 0,
"lat": 0,
"human_address": {
"addres": "string",
"city": "string",
"state": "string",
"zip": "string"
}
},
"price_id": "2023-10-01T12:00:00Z",
"custom_fields": {
"_id": "67b486d242ed76693cd2cc59",
"value": "any"
},
"is_offline": false
}Response
Same response shape as POST /sale-order/create.
DELETE /sale-order/delete/{id}
Delete a sale-order
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 /sale-order/get-by-id/{id}
Get sale-order using its _id
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /sale-order/create.
POST /sale-order/get-paging
Get sale-orders by paging
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
organization_id | string | No | |
customer_id | string | No | |
currency_id | string | No | |
states | string[] | No | |
search | string | No | |
date_form | string | No | |
date_to | string | No | |
delivery_date_from | string | No | |
delivery_date_to | string | No | |
created_from_bot | boolean | No | |
trade_statuses | string[] | No | |
visit_id | string | No | |
state_id | string | No | |
name | string | No |
{
"page": 1,
"limit": 20,
"organization_id": "67b486d242ed76693cd2cc59",
"customer_id": "67b486d242ed76693cd2cc59",
"currency_id": "67b486d242ed76693cd2cc59",
"states": [
"string"
],
"search": "string",
"date_form": "2023-10-01T12:00:00Z",
"date_to": "2023-10-01T12:00:00Z",
"delivery_date_from": "2023-10-01T12:00:00Z",
"delivery_date_to": "2023-10-01T12:00:00Z",
"created_from_bot": false,
"trade_statuses": [
"string"
],
"visit_id": "67b486d242ed76693cd2cc59",
"state_id": "67b486d242ed76693cd2cc59",
"name": "string"
}Response
data.total is the total number of records and data.data[] holds the current page. The table below describes one record.
| Field | Type | Description |
|---|---|---|
created_at | string | |
updated_at | string | |
name | string | |
uuid | string | |
code | string | |
organization | object | |
organization._id | string | |
organization.name | string | |
customer | object | |
customer._id | string | |
customer.type | string | One of: legal, natural |
customer.phone_number | string | |
customer.phone_numbers | string[] | |
customer.name | string | |
customer.image | string | |
customer.custom_fields | object[] | |
customer.custom_fields[]._id | string | |
customer.custom_fields[].value | object | |
customer_image_url | string | |
responsible | object | |
responsible._id | string | |
responsible.full_name | string | |
state_id | string | |
state | string | One of: new, draw, in_progress, canceled, done, accepted |
note | string | |
date | string | |
number | string | |
currency_id | string | |
total_to_pay | number | |
total_price | number | |
total_discount | number | |
total_sale | number | |
total_amount | number | |
trade_status | string | One of: zero, partial, fully |
created_from_bot | boolean | |
position | number | |
task | object | |
task.type_id | string | |
task.date | string | |
task.created_by | string | |
task.responsible_id | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"created_at": "string",
"updated_at": "string",
"name": "string",
"uuid": "external-order-123",
"code": "string",
"organization": {
"_id": "string",
"name": "string"
},
"customer": {
"_id": "string",
"type": "legal",
"phone_number": "string",
"phone_numbers": [
"string"
],
"name": "string",
"image": "string",
"custom_fields": [
{
"_id": null,
"value": null
}
]
},
"customer_image_url": "string",
"responsible": {
"_id": "string",
"full_name": "string"
},
"state_id": "67b486d242ed76693cd2cc59",
"state": "new",
"note": "string",
"date": "string",
"number": "string",
"currency_id": "string",
"total_to_pay": 0,
"total_price": 0,
"total_discount": 0,
"total_sale": 0,
"total_amount": 0,
"trade_status": "zero",
"created_from_bot": false,
"position": 0,
"task": {
"type_id": "67b486d242ed76693cd2cc59",
"date": "2023-10-01T12:00:00Z",
"created_by": "67b486d242ed76693cd2cc59",
"responsible_id": "67b486d242ed76693cd2cc59"
}
}
]
},
"time": "2025-05-01T12:00:00Z"
}GET /sale-order/get-deleted
Get deleted sale-order 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"
}PUT /sale-order/accept/{id}
Accept a sale order (mark as accepted by the responsible party).
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /sale-order/create.
POST /sale-order/get-by-customer/for-bot
List sale orders for a given customer, formatted for bot/external consumption.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
customer_id | string | Yes | |
states | string[] | No |
{
"page": 1,
"limit": 20,
"customer_id": "string",
"states": [
"new"
]
}Response
| Field | Type | Description |
|---|---|---|
list | object[] | |
list[]._id | string | |
list[].created_at | string | |
list[].updated_at | string | |
list[].name | string | |
list[].uuid | string | |
list[].visit_id | string | |
list[].code | string | |
list[].organization_id | string | |
list[].organization | object | |
list[].organization._id | string | |
list[].organization.name | string | |
list[].customer_id | string | |
list[].customer | object | |
list[].customer._id | string | |
list[].customer.type | string | One of: legal, natural |
list[].customer.phone_number | string | |
list[].customer.phone_numbers | string[] | |
list[].customer.name | string | |
list[].customer.image | string | |
list[].customer.custom_fields | object[] | |
list[].customer_assistant | object | |
list[].customer_assistant._id | string | |
list[].customer_assistant.name | string | |
list[].customer_assistant.type | string | One of: legal, natural |
list[].customer_assistant_hierarchy | object[] | |
list[].customer_assistant_hierarchy[]._id | string | |
list[].customer_assistant_hierarchy[].name | string | |
list[].customer_assistant_hierarchy[].type | string | One of: legal, natural |
list[].customer_assistant_hierarchy[].first_name | string | |
list[].customer_assistant_hierarchy[].last_name | string | |
list[].customer_assistant_hierarchy[].middle_name | string | |
list[].responsible_id | string | |
list[].customer_image_url | string | |
list[].responsible | object | |
list[].responsible._id | string | |
list[].responsible.full_name | string | |
list[].price_id | string | |
list[].price | object | |
list[].price._id | string | |
list[].price.name | string | |
list[].price.short_name | string | |
list[].price.code | string | |
list[].state_id | string | |
list[].state | string | One of: new, draw, in_progress, canceled, done, accepted |
list[].note | string | |
list[].date | string | |
list[].delivery_date | string | |
list[].number | string | |
list[].device | object | |
list[].device._id | string | |
list[].device.name | string | |
list[].device.device_id | string | |
list[].currency | object | |
list[].currency._id | string (objectId) | |
list[].currency.to_currency_id | string (objectId) | |
list[].currency.uuid | number | |
list[].currency.name | string | |
list[].currency.value | number | |
list[].currency.symbol | string | |
list[].currency.side | string | One of: start, end |
list[].currency.numerator | number | |
list[].currency.denominator | number | |
list[].currency.round_type | string | One of: floor, ceil, round |
list[].currency.precision | number | |
list[].currency_id | string | |
list[].total_to_pay | number | |
list[].total_price | number | |
list[].discount | number | |
list[].total_discount | number | |
list[].discounts | object[] | |
list[].discounts[]._id | string | |
list[].discounts[].name | string | |
list[].discounts[].value | number | |
list[].discounts[].apply_type | string | One of: percent, cash |
list[].discounts[].currency_id | string | |
list[].products | object[] | |
list[].delivery_address | object | |
list[].delivery_address.long | number | |
list[].delivery_address.lat | number | |
list[].delivery_address.human_address | object | |
list[].total_sale | number | |
list[].total_amount | number | |
list[].trade_status | string | One of: zero, partial, fully |
list[].trades | object[] | |
list[].trades[]._id | string | |
list[].trades[].type | string | One of: b2b, b2c |
list[].trades[].organization_id | string | |
list[].trades[].state | string | One of: new, in_progress, draft, canceled, done |
list[].trades[].state_id | string | |
list[].trades[].number | string | |
list[].trades[].uuid | number | |
list[].trades[].currency | object | |
list[].trades[].cashbox_id | string | |
list[].trades[].calc_tax_after_discount | boolean | |
list[].trades[].sale_settings | object | |
list[].trades[].total_extra_cost | number | |
list[].trades[].total_effected_extra_cost | number | |
list[].custom_fields | object[] | |
list[].custom_fields[]._id | string | |
list[].custom_fields[].value | string | |
total | number |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"list": [
{
"_id": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"uuid": "external-order-123",
"visit_id": "67b486d242ed76693cd2cc59",
"code": "67b486d242ed76693cd2cc59",
"organization_id": "67b486d242ed76693cd2cc59",
"organization": {
"_id": null,
"name": null
},
"customer_id": "67b486d242ed76693cd2cc59",
"customer": {
"_id": null,
"type": null,
"phone_number": null,
"phone_numbers": null,
"name": null,
"image": null,
"custom_fields": null
},
"customer_assistant": {
"_id": null,
"name": null,
"type": null
},
"customer_assistant_hierarchy": [],
"responsible_id": "string",
"customer_image_url": "string",
"responsible": {
"_id": null,
"full_name": null
},
"price_id": "string",
"price": {
"_id": null,
"name": null,
"short_name": null,
"code": null
},
"state_id": "string",
"state": "new",
"note": "string",
"date": "string",
"delivery_date": "string",
"number": "string",
"device": {
"_id": null,
"name": null,
"device_id": null
},
"currency": {
"_id": null,
"to_currency_id": null,
"uuid": null,
"name": null,
"value": null,
"symbol": null,
"side": null,
"numerator": null,
"denominator": null,
"round_type": null,
"precision": null
},
"currency_id": "string",
"total_to_pay": 0,
"total_price": 0,
"discount": 0,
"total_discount": 0,
"discounts": [],
"products": [],
"delivery_address": {
"long": null,
"lat": null,
"human_address": null
},
"total_sale": 0,
"total_amount": 0,
"trade_status": "zero",
"trades": [],
"custom_fields": []
}
],
"total": 0
},
"time": "2025-05-01T12:00:00Z"
}GET /sale-order/get-by-id/for-bot/{id}
Get a sale order by _id, formatted for bot/external consumption.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /sale-order/create.
This page is generated from the OpenAPI spec.