Skip to content

Черновики чеков ​

Незавершённые чеки кассира на кассе (до 3 параллельных чеков на кассу и склад). Черновик хранит корзину между перезагрузками и удаляется, когда по чеку проходит продажа или создаётся отложка.

МетодАдресНазначение
DELETE/company/trade/temporary-cartОчистить черновик чека
GET/company/trade/temporary-cartЧерновики чеков кассира
POST/company/trade/temporary-cartСохранить черновик чека

Очистить черновик чека ​

DELETE/company/trade/temporary-cart

Удаляет черновики текущего пользователя на кассе cashbox_id и складе stock_id: с cheque — только этот чек, без него — все чеки кассы. С product_id удаляется лишь эта строка, а чек, оставшийся без товаров, удаляется целиком.

Из формы (multipart/form-data) метод DELETE отправляется как POST с параметром ?_method=DELETE.

Заголовки ​

ЗаголовокЗначениеОписание
AuthorizationBearer {token}Токен из POST /common/auth/login
Acceptapplication/jsonОтвет в JSON
Accept-LanguageruЯзык сообщений и названий: ru, uz, oz

Тело запроса ​

ПолеТипОбязательноОписание
cashbox_idintegerНетКасса
stock_idintegerНетСклад
chequeintegerНетЧек. Не меньше 1. Не больше 3
product_idintegerНетПродукт

Ответ · 200 ​

Поля ответа
ПолеТипОписание
messagestringСообщение
json
{
    "message": "Success"
}

Черновики чеков кассира ​

GET/company/trade/temporary-cart

Черновики текущего пользователя, упорядоченные по номеру чека, с товарами, услугами, комплектами и клиентом; строки дополнены актуальными ценами и доступным остатком. Можно сузить до кассы и склада.

Заголовки ​

ЗаголовокЗначениеОписание
AuthorizationBearer {token}Токен из POST /common/auth/login
Acceptapplication/jsonОтвет в JSON
Accept-LanguageruЯзык сообщений и названий: ru, uz, oz

Параметры запроса ​

ПолеТипОбязательноОписание
cashbox_idintegerНетТолько черновики этой кассы
stock_idintegerНетТолько черновики этого склада
filter[id]—НетID — точное значение
filter[creator_id]—НетСоздатель — точное значение
filter[company_id]—НетКомпания — точное значение
filter[cashbox_id]—НетКасса — точное значение
filter[stock_id]—НетСклад — точное значение
filter[client_id]—НетКлиент — точное значение
filter[cheque]—НетЧек — точное значение
filter[currency]—НетВалюта — точное значение
filter[created_at]—НетСоздано — период: [0] — с, [1] — по (Y-m-d)
sort[]—НетСортировка, - — по убыванию: id, -id, cheque, -cheque
with[]—НетПодгрузить связи: products.product.category, products.product.unit, client.bonus_tariff
page—НетНомер страницы, с 1
page-size—НетЗаписей на странице, не больше 20

Ответ · 200 ​

Поля ответа
ПолеТипОписание
chequesobject
cheques.1object
cheques.1.discount_modestringТип скидки
cheques.1.discount_valueintegerРазмер скидки
cheques.1.clientobject
cheques.1.client.idintegerID
cheques.1.client.full_namestringФИО
cheques.1.client.main_phonestringОсновной телефон
cheques.1.client.bonus_accumulations_amountintegerБонусный баланс
cheques.1.client.bonus_tariffinteger
cheques.1.client.force_bonusobjectПринудительный бонус
cheques.1.client.force_bonus.percentintegerПроцент
cheques.1.client.force_bonus.reason_typestringТип причины
cheques.1.client.force_bonus.commentstringКомментарий
cheques.1.productsobject[]Продукты
cheques.1.products[].idintegerID
cheques.1.products[].is_serviceboolean
cheques.1.products[].is_bundleboolean
cheques.1.products[].bundle_idnullКомплект
cheques.1.products[].service_idnull
cheques.1.products[].namestringНазвание
cheques.1.products[].categorystringКатегория
cheques.1.products[].barcodestringШтрих-код
cheques.1.products[].quantityintegerКоличество
cheques.1.products[].max_quantityinteger
cheques.1.products[].priceintegerЦена
cheques.1.products[].currencystringВалюта
cheques.1.products[].imgnull
cheques.1.products[].discountintegerСкидка
cheques.1.products[].unitstring
cheques.1.products[].unit_accuracyinteger
cheques.1.products[].is_free_pricebooleanПродажа по свободной цене
cheques.1.products[].min_priceinteger
cheques.1.products[].min_price_currencystring
cheques.1.products[].images_list_thumbsarray
cheques.1.products[].descriptionstringОписание
cheques.2object
cheques.2.discount_modenullТип скидки
cheques.2.discount_valuenullРазмер скидки
cheques.2.clientnull
cheques.2.productsobject[]Продукты
cheques.2.products[].idintegerID
cheques.2.products[].is_serviceboolean
cheques.2.products[].is_bundleboolean
cheques.2.products[].bundle_idnullКомплект
cheques.2.products[].service_idnull
cheques.2.products[].namestringНазвание
cheques.2.products[].categorystringКатегория
cheques.2.products[].barcodestringШтрих-код
cheques.2.products[].quantityintegerКоличество
cheques.2.products[].max_quantityinteger
cheques.2.products[].priceintegerЦена
cheques.2.products[].currencystringВалюта
cheques.2.products[].imgnull
cheques.2.products[].discountintegerСкидка
cheques.2.products[].unitstring
cheques.2.products[].unit_accuracyinteger
cheques.2.products[].is_free_pricebooleanПродажа по свободной цене
cheques.2.products[].min_priceinteger
cheques.2.products[].min_price_currencystring
cheques.2.products[].images_list_thumbsarray
cheques.2.products[].descriptionstringОписание
cashbox_idintegerКасса
stock_idintegerСклад
company_idintegerКомпания
currencystringВалюта
json
{
    "cheques": {
        "1": {
            "discount_mode": "percent",
            "discount_value": 10,
            "client": {
                "id": 1,
                "full_name": "Full name 1",
                "main_phone": "998000000001",
                "bonus_accumulations_amount": 1000,
                "bonus_tariff": 1,
                "force_bonus": {
                    "percent": 5,
                    "reason_type": "loyalty",
                    "comment": "Comment 1"
                }
            },
            "products": [
                {
                    "id": 1,
                    "is_service": false,
                    "is_bundle": false,
                    "bundle_id": null,
                    "service_id": null,
                    "name": "Product 1",
                    "category": "Category 1-1-1 ru",
                    "barcode": "0000000000001",
                    "quantity": 2,
                    "max_quantity": 1,
                    "price": 1100,
                    "currency": "uzs",
                    "img": null,
                    "discount": 300,
                    "unit": "Unit 1 ru",
                    "unit_accuracy": 4,
                    "is_free_price": false,
                    "min_price": 0,
                    "min_price_currency": "uzs",
                    "images_list_thumbs": [],
                    "description": "Description 1"
                },
                {
                    "id": 2,
                    "is_service": false,
                    "is_bundle": false,
                    "bundle_id": null,
                    "service_id": null,
                    "name": "Product 1-1",
                    "category": "Category 1-1-1 ru",
                    "barcode": "0000000000011",
                    "quantity": 1,
                    "max_quantity": 2,
                    "price": 2400000,
                    "currency": "uzs",
                    "img": null,
                    "discount": 0,
                    "unit": "Unit 1 ru",
                    "unit_accuracy": 4,
                    "is_free_price": false,
                    "min_price": 0,
                    "min_price_currency": "uzs",
                    "images_list_thumbs": [],
                    "description": "Description 1-1"
                }
            ]
        },
        "2": {
            "discount_mode": null,
            "discount_value": null,
            "client": null,
            "products": [
                {
                    "id": 1,
                    "is_service": false,
                    "is_bundle": false,
                    "bundle_id": null,
                    "service_id": null,
                    "name": "Product 1",
                    "category": "Category 1-1-1 ru",
                    "barcode": "0000000000001",
                    "quantity": 3,
                    "max_quantity": 1,
                    "price": 1100,
                    "currency": "uzs",
                    "img": null,
                    "discount": 0,
                    "unit": "Unit 1 ru",
                    "unit_accuracy": 4,
                    "is_free_price": false,
                    "min_price": 0,
                    "min_price_currency": "uzs",
                    "images_list_thumbs": [],
                    "description": "Description 1"
                }
            ]
        }
    },
    "cashbox_id": 2,
    "stock_id": 1,
    "company_id": 1,
    "currency": "uzs"
}

Сохранить черновик чека ​

POST/company/trade/temporary-cart

Сохраняет корзину чека cheque (1–3) на кассе и складе: если черновик уже есть, он перезаписывается. Нужна хотя бы одна строка; товары, услуги и комплекты должны принадлежать компании. Остаток не резервируется.

Заголовки ​

ЗаголовокЗначениеОписание
AuthorizationBearer {token}Токен из POST /common/auth/login
Acceptapplication/jsonОтвет в JSON
Accept-LanguageruЯзык сообщений и названий: ru, uz, oz

Тело запроса ​

ПолеТипОбязательноОписание
company_idintegerДаКомпания. ID существующей записи, доступной пользователю
cashbox_idintegerДаКасса. ID существующей записи, доступной пользователю
stock_idintegerДаСклад. ID существующей записи, доступной пользователю
client_idintegerНетКлиент. ID существующей записи, доступной пользователю
currencystringДаВалюта. Допустимые значения: uzs
chequeintegerДаЧек. Не меньше 1. Не больше 3
discount_modestringНетТип скидки. Допустимые значения: percent, integer
discount_valuenumberНетРазмер скидки. До 2 знаков после запятой. Не меньше 0
force_bonusarrayНетПринудительный бонус
force_bonus.percentnumberЕсли передано force_bonusПроцент. До 2 знаков после запятой. Не меньше 0. Не больше 100
force_bonus.reason_typestringНетТип причины. Макс. 100 символов
force_bonus.commentstringНетКомментарий. Макс. 1000 символов
productsobject[]НетПродукты. Макс. 100 элементов
products[].idintegerДаID. Без повторов
products[].quantitynumberДаКоличество. До 8 знаков после запятой. Не меньше 0.00000001
products[].amountnumberДаСумма. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
products[].discountnumberНетСкидка. До 2 знаков после запятой. Не меньше 0. Не больше 999999999999.99
servicesobject[]НетМакс. 100 элементов
services[].idintegerДаID. Без повторов
services[].amountnumberДаСумма. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
services[].discountnumberНетСкидка. До 2 знаков после запятой. Не меньше 0. Не больше 999999999999.99
bundlesobject[]НетКомплекты. Макс. 100 элементов
bundles[].idintegerДаID
bundles[].quantityintegerНетКоличество. Не меньше 1. Не больше 1000
bundles[].amountnumberДаСумма. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
bundles[].discountnumberНетСкидка. До 2 знаков после запятой. Не меньше 0. Не больше 999999999999.99
json
{
    "company_id": 1,
    "cashbox_id": 2,
    "stock_id": 1,
    "client_id": 1,
    "currency": "uzs",
    "discount_mode": "percent",
    "discount_value": 10,
    "force_bonus": {
        "percent": 5,
        "reason_type": "loyalty",
        "comment": "Test comment"
    },
    "products": [
        {
            "id": 1,
            "quantity": 2,
            "amount": 9000,
            "discount": 300
        },
        {
            "id": 2,
            "quantity": 1,
            "amount": 5000,
            "discount": 0
        }
    ],
    "cheque": 3
}
bash
curl -X POST "https://api.wasyt.uz/company/trade/temporary-cart" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"company_id":1,"cashbox_id":2,"stock_id":1,"client_id":1,"currency":"uzs","discount_mode":"percent","discount_value":10,"force_bonus":{"percent":5,"reason_type":"loyalty","comment":"Test comment"},"products":[{"id":1,"quantity":2,"amount":9000,"discount":300},{"id":2,"quantity":1,"amount":5000,"discount":0}],"cheque":3}'

Ответ · 200 ​

Поля ответа
ПолеТипОписание
company_idintegerКомпания
cashbox_idintegerКасса
stock_idintegerСклад
client_idintegerКлиент
currencystringВалюта
chequeintegerЧек
discount_modestringТип скидки
discount_valueintegerРазмер скидки
force_bonusobjectПринудительный бонус
force_bonus.percentintegerПроцент
force_bonus.reason_typestringТип причины
force_bonus.commentstringКомментарий
updated_atstringОбновлено
created_atstringСоздано
creator_idintegerСоздатель
idintegerID
json
{
    "company_id": 1,
    "cashbox_id": 2,
    "stock_id": 1,
    "client_id": 1,
    "currency": "uzs",
    "cheque": 3,
    "discount_mode": "percent",
    "discount_value": 10,
    "force_bonus": {
        "percent": 5,
        "reason_type": "loyalty",
        "comment": "Test comment"
    },
    "updated_at": "2026-09-30 12:25:03",
    "created_at": "2026-09-30 12:25:03",
    "creator_id": 2,
    "id": 5
}