Skip to content

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

FieldTypeRequiredDescription
uuidstringNoOptional 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.
codestringNo
namestringNo
organization_idstringYes
visit_idstringNo
customer_idstringYes
customer_assistant_idstringNo
responsible_idstringYes
currency_idstringNo
currencyobjectNo
currency._idstring (objectId)No
currency.numeratornumberYes
currency.denominatornumberYes
currency.valuenumberYes
currency.precisionnumberNo
currency.round_typestringNoOne of: floor, ceil, round
statestringYesOne of: new, draft, in_progress, canceled, done, accepted
state_idstringNo
datestringYes
delivery_datestringNo
notestringNoComplete order note. Integration creates preserve long courier, pickup, and customer instructions; the API request-body limit still applies.
discountsobject[]Yes
discounts[]._idstring (objectId)No
discounts[].valuenumberYes
discounts[].namestringYes
discounts[].apply_typestringNoOne of: percent, cash
discounts[].is_custombooleanNo
productsobject[]Yes
products[].product_idstring (objectId)Yes
products[].amountnumberYes
products[].pricenumberYes
products[].real_pricenumberNo
products[].discountsobject[]No
products[].discounts[]._idstring (objectId)No
products[].discounts[].valuenumberYes
products[].discounts[].namestringYes
products[].discounts[].apply_typestringNoOne of: percent, cash
products[].discounts[].is_custombooleanNo
products[].price_idstring (objectId)Yes
products[].warehouse_idstring (objectId)Yes
products[].box_countnumberNo
products[].box_itemnumberNo
products[].productobjectNo
products[].product.namestringNo
products[].product.product_idstringNo
products[].product.measure_idstringNo
products[].product.measureobjectNo
delivery_addressobjectNo
delivery_address.longnumberYes
delivery_address.latnumberYes
delivery_address.human_addressobjectNo
delivery_address.human_address.addresstringNo
delivery_address.human_address.citystringNo
delivery_address.human_address.statestringNo
delivery_address.human_address.zipstringNo
price_idstringNo
custom_fieldsobjectNo
custom_fields._idstringNo
custom_fields.valueobjectNo
json
{
  "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

FieldTypeDescription
_idstring
created_atstring
updated_atstring
namestring
uuidstring
visit_idstring
codestring
organization_idstring
organizationobject
organization._idstring
organization.namestring
customer_idstring
customerobject
customer._idstring
customer.typestringOne of: legal, natural
customer.phone_numberstring
customer.phone_numbersstring[]
customer.namestring
customer.imagestring
customer.custom_fieldsobject[]
customer.custom_fields[]._idstring
customer.custom_fields[].valueobject
customer_assistantobject
customer_assistant._idstring
customer_assistant.namestring
customer_assistant.typestringOne of: legal, natural
customer_assistant_hierarchyobject[]
customer_assistant_hierarchy[]._idstring
customer_assistant_hierarchy[].namestring
customer_assistant_hierarchy[].typestringOne of: legal, natural
customer_assistant_hierarchy[].first_namestring
customer_assistant_hierarchy[].last_namestring
customer_assistant_hierarchy[].middle_namestring
responsible_idstring
customer_image_urlstring
responsibleobject
responsible._idstring
responsible.full_namestring
price_idstring
priceobject
price._idstring
price.namestring
price.short_namestring
price.codestring
state_idstring
statestringOne of: new, draw, in_progress, canceled, done, accepted
notestring
datestring
delivery_datestring
numberstring
deviceobject
device._idstring
device.namestring
device.device_idstring
currencyobject
currency._idstring (objectId)
currency.to_currency_idstring (objectId)
currency.uuidnumber
currency.namestring
currency.valuenumber
currency.symbolstring
currency.sidestringOne of: start, end
currency.numeratornumber
currency.denominatornumber
currency.round_typestringOne of: floor, ceil, round
currency.precisionnumber
currency_idstring
total_to_paynumber
total_pricenumber
discountnumber
total_discountnumber
discountsobject[]
discounts[]._idstring
discounts[].namestring
discounts[].valuenumber
discounts[].apply_typestringOne of: percent, cash
discounts[].currency_idstring
productsobject[]
delivery_addressobject
delivery_address.longnumber
delivery_address.latnumber
delivery_address.human_addressobject
delivery_address.human_address.addresstring
delivery_address.human_address.citystring
delivery_address.human_address.statestring
delivery_address.human_address.zipstring
total_salenumber
total_amountnumber
trade_statusstringOne of: zero, partial, fully
tradesobject[]
trades[]._idstring
trades[].typestringOne of: b2b, b2c
trades[].organization_idstring
trades[].statestringOne of: new, in_progress, draft, canceled, done
trades[].state_idstring
trades[].numberstring
trades[].uuidnumber
trades[].currencyobject
trades[].currency._idstring
trades[].currency.to_currency_idstring
trades[].currency.namestring
trades[].currency.valuenumber
trades[].currency.numeratornumber
trades[].currency.denominatornumber
trades[].currency.round_typestringOne of: floor, ceil, round
trades[].currency.precisionnumber
trades[].cashbox_idstring
trades[].calc_tax_after_discountboolean
trades[].sale_settingsobject
trades[].sale_settings.discountnumber
trades[].total_extra_costnumber
trades[].total_effected_extra_costnumber
custom_fieldsobject[]
custom_fields[]._idstring
custom_fields[].valuestring
json
{
  "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

FieldTypeRequiredDescription
_idstringYes
codestringNo
namestringNo
organization_idstringNo
visit_idstringNo
customer_idstringNo
customer_assistant_idstringNo
responsible_idstringNo
currency_idstringYes
currencyobjectNo
currency._idstring (objectId)No
currency.numeratornumberYes
currency.denominatornumberYes
currency.valuenumberYes
currency.precisionnumberNo
currency.round_typestringNoOne of: floor, ceil, round
datestringNo
delivery_datestringNo
notestringNo
discountsobject[]Yes
discounts[]._idstring (objectId)No
discounts[].valuenumberYes
discounts[].namestringYes
discounts[].discount_apply_typestringNoOne of: percentage, cash
discounts[].currency_idstring (objectId)No
productsobject[]Yes
products[].product_idstring (objectId)Yes
products[].amountnumberYes
products[].pricenumberYes
products[].real_pricenumberNo
products[].discountsobject[]No
products[].discounts[]._idstring (objectId)No
products[].discounts[].valuenumberYes
products[].discounts[].namestringYes
products[].discounts[].discount_apply_typestringNoOne of: percent, cash
products[].discounts[].currency_idstring (objectId)No
products[].price_idstring (objectId)Yes
products[].warehouse_idstring (objectId)Yes
products[].box_countnumberNo
products[].box_itemnumberNo
products[].productobjectNo
products[].product.namestringNo
products[].product.product_idstringNo
products[].product.measure_idstringNo
products[].product.measureobjectNo
delivery_addressobjectNo
delivery_address.longnumberYes
delivery_address.latnumberYes
delivery_address.human_addressobjectNo
delivery_address.human_address.addresstringNo
delivery_address.human_address.citystringNo
delivery_address.human_address.statestringNo
delivery_address.human_address.zipstringNo
price_idstringNo
custom_fieldsobjectNo
custom_fields._idstringNo
custom_fields.valuestringNomust be any data types
is_offlinebooleanNo
json
{
  "_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

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

json
{
  "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

ParameterTypeRequiredDescription
idstringYes

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

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
organization_idstringNo
customer_idstringNo
currency_idstringNo
statesstring[]No
searchstringNo
date_formstringNo
date_tostringNo
delivery_date_fromstringNo
delivery_date_tostringNo
created_from_botbooleanNo
trade_statusesstring[]No
visit_idstringNo
state_idstringNo
namestringNo
json
{
  "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.

FieldTypeDescription
created_atstring
updated_atstring
namestring
uuidstring
codestring
organizationobject
organization._idstring
organization.namestring
customerobject
customer._idstring
customer.typestringOne of: legal, natural
customer.phone_numberstring
customer.phone_numbersstring[]
customer.namestring
customer.imagestring
customer.custom_fieldsobject[]
customer.custom_fields[]._idstring
customer.custom_fields[].valueobject
customer_image_urlstring
responsibleobject
responsible._idstring
responsible.full_namestring
state_idstring
statestringOne of: new, draw, in_progress, canceled, done, accepted
notestring
datestring
numberstring
currency_idstring
total_to_paynumber
total_pricenumber
total_discountnumber
total_salenumber
total_amountnumber
trade_statusstringOne of: zero, partial, fully
created_from_botboolean
positionnumber
taskobject
task.type_idstring
task.datestring
task.created_bystring
task.responsible_idstring
json
{
  "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

ParameterTypeRequiredDescription
deleted_atstringYes

Request body

No request body.

Response

json
{
  "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

ParameterTypeRequiredDescription
idstringYes

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

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
customer_idstringYes
statesstring[]No
json
{
  "page": 1,
  "limit": 20,
  "customer_id": "string",
  "states": [
    "new"
  ]
}

Response

FieldTypeDescription
listobject[]
list[]._idstring
list[].created_atstring
list[].updated_atstring
list[].namestring
list[].uuidstring
list[].visit_idstring
list[].codestring
list[].organization_idstring
list[].organizationobject
list[].organization._idstring
list[].organization.namestring
list[].customer_idstring
list[].customerobject
list[].customer._idstring
list[].customer.typestringOne of: legal, natural
list[].customer.phone_numberstring
list[].customer.phone_numbersstring[]
list[].customer.namestring
list[].customer.imagestring
list[].customer.custom_fieldsobject[]
list[].customer_assistantobject
list[].customer_assistant._idstring
list[].customer_assistant.namestring
list[].customer_assistant.typestringOne of: legal, natural
list[].customer_assistant_hierarchyobject[]
list[].customer_assistant_hierarchy[]._idstring
list[].customer_assistant_hierarchy[].namestring
list[].customer_assistant_hierarchy[].typestringOne of: legal, natural
list[].customer_assistant_hierarchy[].first_namestring
list[].customer_assistant_hierarchy[].last_namestring
list[].customer_assistant_hierarchy[].middle_namestring
list[].responsible_idstring
list[].customer_image_urlstring
list[].responsibleobject
list[].responsible._idstring
list[].responsible.full_namestring
list[].price_idstring
list[].priceobject
list[].price._idstring
list[].price.namestring
list[].price.short_namestring
list[].price.codestring
list[].state_idstring
list[].statestringOne of: new, draw, in_progress, canceled, done, accepted
list[].notestring
list[].datestring
list[].delivery_datestring
list[].numberstring
list[].deviceobject
list[].device._idstring
list[].device.namestring
list[].device.device_idstring
list[].currencyobject
list[].currency._idstring (objectId)
list[].currency.to_currency_idstring (objectId)
list[].currency.uuidnumber
list[].currency.namestring
list[].currency.valuenumber
list[].currency.symbolstring
list[].currency.sidestringOne of: start, end
list[].currency.numeratornumber
list[].currency.denominatornumber
list[].currency.round_typestringOne of: floor, ceil, round
list[].currency.precisionnumber
list[].currency_idstring
list[].total_to_paynumber
list[].total_pricenumber
list[].discountnumber
list[].total_discountnumber
list[].discountsobject[]
list[].discounts[]._idstring
list[].discounts[].namestring
list[].discounts[].valuenumber
list[].discounts[].apply_typestringOne of: percent, cash
list[].discounts[].currency_idstring
list[].productsobject[]
list[].delivery_addressobject
list[].delivery_address.longnumber
list[].delivery_address.latnumber
list[].delivery_address.human_addressobject
list[].total_salenumber
list[].total_amountnumber
list[].trade_statusstringOne of: zero, partial, fully
list[].tradesobject[]
list[].trades[]._idstring
list[].trades[].typestringOne of: b2b, b2c
list[].trades[].organization_idstring
list[].trades[].statestringOne of: new, in_progress, draft, canceled, done
list[].trades[].state_idstring
list[].trades[].numberstring
list[].trades[].uuidnumber
list[].trades[].currencyobject
list[].trades[].cashbox_idstring
list[].trades[].calc_tax_after_discountboolean
list[].trades[].sale_settingsobject
list[].trades[].total_extra_costnumber
list[].trades[].total_effected_extra_costnumber
list[].custom_fieldsobject[]
list[].custom_fields[]._idstring
list[].custom_fields[].valuestring
totalnumber
json
{
  "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

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

Same response shape as POST /sale-order/create.


This page is generated from the OpenAPI spec.

Bito 2.0 Integration API