Кассовые смены
Смена кассира на кассе продаж: открытие с разменной суммой, расходы из кассы во время смены и закрытие с пересчётом денег по каждому типу оплаты и валюте. Кассир видит только свои смены, директор — все смены компании.
| Метод | Адрес | Назначение |
|---|---|---|
| GET | /company/trade/cashbox-shift/current | Текущая смена кассира |
| GET | /company/trade/cashbox-shift/expense-reasons | Типы расходов смены |
| POST | /company/trade/cashbox-shift/expense-reasons | Добавить тип расхода |
| PATCH | /company/trade/cashbox-shift/{model}/close | Закрыть смену |
| POST | /company/trade/cashbox-shift/{model}/expense | Расход из кассы |
| GET | /company/trade/cashbox-shift | Список смен |
| GET | /company/trade/cashbox-shift/{model} | Детали смены |
| POST | /company/trade/cashbox-shift | Открыть смену |
Текущая смена кассира
/company/trade/cashbox-shift/currentОткрытая смена текущего пользователя в data (или null, если смены нет) и правила смен компании в settings. В смене приходит closes_in — сколько секунд осталось до конца рабочего времени (отрицательное после его окончания, null без ограничения).
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
data | null | Данные |
settings | object | Настройки |
settings.is_enabled | boolean | Включено |
settings.is_working_hours_enabled | boolean | Рабочее время смены |
settings.working_hours_from | string | Начало рабочего времени |
settings.working_hours_to | string | Конец рабочего времени |
settings.is_round_the_clock | boolean | 24-часовая смена |
settings.overdue_action | string | Когда время вышло |
{
"data": null,
"settings": {
"is_enabled": true,
"is_working_hours_enabled": false,
"working_hours_from": "09:00",
"working_hours_to": "21:00",
"is_round_the_clock": false,
"overdue_action": "remind"
}
}Типы расходов смены
/company/trade/cashbox-shift/expense-reasonsСтатьи «Расход» компании, на которые можно провести расход из кассы: конечные статьи дерева и статьи верхнего уровня без вложенных. Каждая с родительской группой parent.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
data | object[] | Данные |
data[].id | integer | ID |
data[].name | string | Название |
data[].parent | object | |
data[].parent.id | integer | ID |
data[].parent.name | string | Название |
{
"data": [
{
"id": 11,
"name": "Обед",
"parent": {
"id": 3,
"name": "Transaction reason 2"
}
},
{
"id": 12,
"name": "Транспорт",
"parent": null
}
]
}Добавить тип расхода
/company/trade/cashbox-shift/expense-reasonsСоздаёт статью «Расход» с указанным названием в группе «Расходы из кассы» (группа создаётся при необходимости). Если статья с таким названием уже есть, возвращается она — дубль не создаётся.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
name | string | Да | Название. Макс. 255 символов |
{
"name": "Такси"
}curl -X POST "https://api.wasyt.uz/company/trade/cashbox-shift/expense-reasons" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"name":"Такси"}'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
id | integer | ID |
name | string | Название |
parent | object | |
parent.id | integer | ID |
parent.name | string | Название |
{
"id": 14,
"name": "Такси",
"parent": {
"id": 13,
"name": "Расходы из кассы"
}
}Закрыть смену
/company/trade/cashbox-shift/{model}/closeЗакрывает открытую смену по пересчитанным суммам actuals (не указанная строка считается равной ожидаемой). Расхождение по любой строке требует closing_comment и проводится по кассе приходом или расходом. closing_action: keep — всё остаётся в кассе, transfer_all — всё уходит инкассацией в основную кассу, transfer_part — в кассе остаются наличные из leave_amounts (не больше пересчитанных). Итоговые цифры смены замораживаются.
Из формы (
multipart/form-data) методPATCHотправляется какPOSTс параметром?_method=PATCH.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры пути
| Параметр | Описание |
|---|---|
model | ID записи |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
actuals | object[] | Нет | Фактические суммы. Макс. 50 элементов |
actuals[].payment_type | string | Да | Тип оплаты. Допустимые значения: cash, card, bank |
actuals[].payment_type_id | integer | Нет | |
actuals[].currency | string | Да | Валюта. Допустимые значения: uzs, usd, eur, rub |
actuals[].amount | number | Да | Фактически. До 2 знаков после запятой. Не меньше -999999999999.99. Не больше 999999999999.99 |
closing_action | string | Да | Действие при закрытии. Допустимые значения: keep, transfer_all, transfer_part |
leave_amounts | object[] | Нет | Сумма остатка. Макс. 20 элементов |
leave_amounts[].currency | string | Да | Валюта. Без повторов. Допустимые значения: uzs, usd, eur, rub |
leave_amounts[].amount | number | Да | Сумма остатка. До 2 знаков после запятой. Не меньше 0. Не больше 999999999999.99 |
closing_comment | string | Нет | Комментарий к кассовой смене. Макс. 1000 символов |
{
"actuals": [
{
"payment_type": "cash",
"currency": "uzs",
"amount": 1000
},
{
"payment_type": "card",
"currency": "uzs",
"amount": 3000
},
{
"payment_type": "bank",
"currency": "uzs",
"amount": 0
}
],
"closing_action": "keep"
}curl -X PATCH "https://api.wasyt.uz/company/trade/cashbox-shift/4/close" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"actuals":[{"payment_type":"cash","currency":"uzs","amount":1000},{"payment_type":"card","currency":"uzs","amount":3000},{"payment_type":"bank","currency":"uzs","amount":0}],"closing_action":"keep"}'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
id | integer | ID |
creator_id | integer | Создатель |
company_id | integer | Компания |
cashbox_id | integer | Касса |
stock_id | integer | Склад |
closed_by_id | integer | |
collection_id | null | |
status | string | Статус |
opening_balances | object[] | |
opening_balances[].amount | integer | Сумма |
opening_balances[].currency | string | Валюта |
opening_balances[].payment_type | string | Тип оплаты |
opening_amount | integer | Сумма открытия |
opening_currency | null | Валюта открытия |
opening_comment | null | Примечание |
closing_action | string | Действие при закрытии |
closing_comment | null | Комментарий к кассовой смене |
summary | object | |
summary.currency | string | Валюта |
summary.rows | object[] | |
summary.rows[].payment_type | string | Тип оплаты |
summary.rows[].payment_type_id | null | |
summary.rows[].payment_type_name | null | |
summary.rows[].currency | string | Валюта |
summary.rows[].opening_balance | integer | |
summary.rows[].opening_amount | integer | Сумма открытия |
summary.rows[].opening | integer | |
summary.rows[].income | integer | Доход |
summary.rows[].outcome | integer | |
summary.rows[].expected | integer | |
summary.rows[].by_source | array | |
summary.rows[].actual | integer | |
summary.rows[].difference | integer | |
summary.rows[].transferred | integer | |
summary.rows[].left | integer | |
summary.totals | object[] | |
summary.totals[].currency | string | Валюта |
summary.totals[].opening | integer | |
summary.totals[].income | integer | Доход |
summary.totals[].outcome | integer | |
summary.totals[].expected | integer | |
summary.totals[].actual | integer | |
summary.totals[].difference | integer | |
summary.totals[].transferred | integer | |
summary.totals[].left | integer | |
summary.totals[].cash | integer | |
summary.totals[].non_cash | integer | |
summary.checks_count | integer | |
summary.returns_count | integer | Возвраты (шт.) |
summary.debts | array | |
summary.transactions | array | Транзакции |
opened_at | string | |
closes_at | null | |
overdue_action | null | Когда время вышло |
closed_at | string | |
created_at | string | Создано |
updated_at | string | Обновлено |
company | object | Компания |
company.id | integer | ID |
company.parent_id | null | Родитель |
company.partner_id | integer | Партнёр |
company.district_id | integer | Район |
company.industry_id | integer | Сфера деятельности |
company.name | string | Название |
company.company_name | string | Компания |
company.logo | object | Логотип |
company.logo.original | object | |
company.logo.original.raw | string | |
company.logo.original.webp | string | |
company.logo.widen_25 | object | |
company.logo.widen_25.raw | string | |
company.logo.widen_25.webp | string | |
company.logo.widen_100 | object | |
company.logo.widen_100.raw | string | |
company.logo.widen_100.webp | string | |
company.logo.widen_500 | object | |
company.logo.widen_500.raw | string | |
company.logo.widen_500.webp | string | |
company.inn | string | ИНН |
company.mfo | string | МФО |
company.address | string | Адрес |
company.latitude | null | Широта |
company.longitude | null | Долгота |
company.comment | string | Комментарий |
company.telegram_phone | string | Телефон в Telegram |
company.director_full_name | string | ФИО директора |
company.bank | string | Банк |
company.payment_account | string | Расчётный счёт |
company.agreement_number | string | Номер договора |
company.agreement_date | null | |
company.atmos_terminal_id | integer | ID терминала в Atmos |
company.uniaccess_auto_payment_credit_overdue_days | integer | |
company.uniaccess_branch_id | integer | Branch ID в Uniaccess |
company.field_of_activity | string | Направление |
company.vat_percent | string | НДС (%) |
company.is_using_new_my_uzcard_auto_payment_by_pinfl | boolean | Использует новый метод MyUzcard для автосписания по ПИНФЛ |
company.bonus_entry_period | integer | Период учёта бонусов (в месяцах) |
company.abc_segment_a | integer | |
company.abc_segment_b | integer | |
company.abc_segment_c | integer | |
company.is_pos_window_enabled | boolean | |
company.cashbox_shift_settings | object | |
company.cashbox_shift_settings.is_enabled | boolean | Включено |
company.has_bank_payment_type | boolean | |
company.is_ican_turned_on | boolean | ICAN включён |
company.is_partner_turned_on | boolean | Партнёр включён |
company.created_at | string | Создано |
company.updated_at | string | Обновлено |
company.is_deleted | boolean | |
company.parent | null | |
creator | object | |
creator.id | integer | ID |
creator.type | string | Тип |
creator.role_id | integer | Роль |
creator.company_id | integer | Компания |
creator.partner_id | null | Партнёр |
creator.username | string | Логин |
creator.pinfl | null | ПИНФЛ |
creator.phone | string | Телефон |
creator.sipuni_sip_number | string | VoIP - Sipuni (SIP-номер) |
{
"id": 4,
"creator_id": 2,
"company_id": 1,
"cashbox_id": 2,
"stock_id": 1,
"closed_by_id": 2,
"collection_id": null,
"status": "closed",
"opening_balances": [
{
"amount": 1000,
"currency": "uzs",
"payment_type": "cash"
},
{
"amount": 3000,
"currency": "uzs",
"payment_type": "card"
}
],
"opening_amount": 0,
"opening_currency": null,
"opening_comment": null,
"closing_action": "keep",
"closing_comment": null,
"summary": {
"currency": "uzs",
"rows": [
{
"payment_type": "cash",
"payment_type_id": null,
"payment_type_name": null,
"currency": "uzs",
"opening_balance": 1000,
"opening_amount": 0,
"opening": 1000,
"income": 0,
"outcome": 0,
"expected": 1000,
"by_source": [],
"actual": 1000,
"difference": 0,
"transferred": 0,
"left": 1000
},
{
"payment_type": "card",
"payment_type_id": null,
"payment_type_name": null,
"currency": "uzs",
"opening_balance": 3000,
"opening_amount": 0,
"opening": 3000,
"income": 0,
"outcome": 0,
"expected": 3000,
"by_source": [],
"actual": 3000,
"difference": 0,
"transferred": 0,
"left": 3000
}
],
"totals": [
{
"currency": "uzs",
"opening": 4000,
"income": 0,
"outcome": 0,
"expected": 4000,
"actual": 4000,
"difference": 0,
"transferred": 0,
"left": 4000,
"cash": 1000,
"non_cash": 3000
},
{
"currency": "usd",
"opening": 0,
"income": 0,
"outcome": 0,
"expected": 0,
"actual": 0,
"difference": 0,
"transferred": 0,
"left": 0,
"cash": 0,
"non_cash": 0
}
],
"checks_count": 0,
"returns_count": 0,
"debts": [],
"transactions": []
},
"opened_at": "2026-09-30 12:53:52",
"closes_at": null,
"overdue_action": null,
"closed_at": "2026-09-30 12:53:52",
"created_at": "2026-09-30 12:53:52",
"updated_at": "2026-09-30 12:53:52",
"company": {
"id": 1,
"parent_id": null,
"partner_id": 1,
"district_id": 1,
"industry_id": 1,
"name": "Company 1",
"company_name": "Company 1",
"logo": {
"original": {
"raw": "https://api.wasyt.uz/test_data/images/1.png",
"webp": "https://api.wasyt.uz/storage/thumbs/original/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_25": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/25/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/25/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_100": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/100/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/100/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_500": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/500/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/500/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
}
},
"inn": "000000001",
"mfo": "00001",
"address": "Address 1",
"latitude": null,
"longitude": null,
"comment": "Comment 1",
"telegram_phone": "998000000001",
"director_full_name": "Director 1",
"bank": "Bank 1",
"payment_account": "00000000000000000001",
"agreement_number": "001/2026",
"agreement_date": null,
"atmos_terminal_id": 97007302,
"uniaccess_auto_payment_credit_overdue_days": 3,
"uniaccess_branch_id": 1,
"field_of_activity": "trading",
"vat_percent": "12.00",
"is_using_new_my_uzcard_auto_payment_by_pinfl": true,
"bonus_entry_period": 12,
"abc_segment_a": 75,
"abc_segment_b": 15,
"abc_segment_c": 10,
"is_pos_window_enabled": true,
"cashbox_shift_settings": {
"is_enabled": true
},
"has_bank_payment_type": false,
"is_ican_turned_on": true,
"is_partner_turned_on": false,
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:49:04",
"is_deleted": false,
"parent": null
},
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"full_name": " "
}
},
"closed_by": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"full_name": " "
}
},
"cashbox": {
"id": 2,
"creator_id": 2,
"company_id": 1,
"name": "Cashbox 2",
"type": "sale",
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
},
"stock": {
"id": 1,
"creator_id": 2,
"company_id": 1,
"name": "Stock 1",
"is_available": true,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false
}
}Пример ошибки · 422
{
"message": "Есть расхождение — укажите причину в комментарии",
"errors": {
"closing_comment": [
"Есть расхождение — укажите причину в комментарии"
]
}
}Расход из кассы
/company/trade/cashbox-shift/{model}/expenseПроводит расход из кассы открытой смены по существующей статье transaction_reason_id или по новой, заданной названием reason_name (создаётся статья «Расход»). Возвращает созданную кассовую операцию; по закрытой смене — ошибка 400.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры пути
| Параметр | Описание |
|---|---|
model | ID записи |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
transaction_reason_id | integer | Если не передано reason_name | Тип расхода. ID существующей записи, доступной пользователю |
reason_name | string | Если не передано transaction_reason_id | Название расхода. Макс. 255 символов |
reason_parent_id | integer | Нет | Группа расхода. ID существующей записи, доступной пользователю |
payment_type | string | Да | Тип оплаты. Допустимые значения: cash, card, bank |
currency | string | Да | Валюта. Допустимые значения: uzs, usd, eur, rub |
amount | number | Да | Сумма. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99 |
comment | string | Нет | Комментарий. Макс. 1000 символов |
{
"transaction_reason_id": 6,
"payment_type": "cash",
"currency": "uzs",
"amount": 200,
"comment": "Обед сотрудникам"
}curl -X POST "https://api.wasyt.uz/company/trade/cashbox-shift/27/expense" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"transaction_reason_id":6,"payment_type":"cash","currency":"uzs","amount":200,"comment":"Обед сотрудникам"}'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
additional | object | |
additional.balances_after | object | |
additional.balances_after.card | object | |
additional.balances_after.card.uzs | string | |
additional.balances_after.cash | object | |
additional.balances_after.cash.uzs | string | |
additional.on_hold_after | array | |
source_data | object | |
source_data.cashbox_shift_id | integer | |
cashbox_id | integer | Касса |
type | string | Тип |
payment_type | string | Тип оплаты |
currency | string | Валюта |
amount | integer | Сумма |
status | string | Статус |
source_type | string | Источник |
source_id | integer | Источник |
comment | string | Комментарий |
updated_at | string | Обновлено |
created_at | string | Создано |
company_id | integer | Компания |
creator_id | integer | Создатель |
id | integer | ID |
cashbox | object | |
cashbox.id | integer | ID |
cashbox.creator_id | integer | Создатель |
cashbox.company_id | integer | Компания |
cashbox.name | string | Название |
cashbox.type | string | Тип |
cashbox.created_at | string | Создано |
cashbox.updated_at | string | Обновлено |
cashbox.is_deleted | boolean | |
source | null | |
contract_number | null | Номер контракта |
{
"additional": {
"balances_after": {
"card": {
"uzs": "3000.00"
},
"cash": {
"uzs": "800.00"
}
},
"on_hold_after": []
},
"source_data": {
"cashbox_shift_id": 27
},
"cashbox_id": 2,
"type": "outcome",
"payment_type": "cash",
"currency": "uzs",
"amount": 200,
"status": "completed",
"source_type": "reason",
"source_id": 6,
"comment": "Обед сотрудникам",
"updated_at": "2026-09-30 12:54:00",
"created_at": "2026-09-30 12:54:00",
"company_id": 1,
"creator_id": 2,
"id": 147,
"cashbox": {
"id": 2,
"creator_id": 2,
"company_id": 1,
"name": "Cashbox 2",
"type": "sale",
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
},
"source": null,
"contract_number": null
}Список смен
/company/trade/cashbox-shiftСмены кассиров с пагинацией. Кассир видит только свои смены, директор — все смены компании.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры запроса
| Параметр | Описание |
|---|---|
filter[id] | ID — точное значение |
filter[creator_id] | Создатель — точное значение |
filter[company_id] | Компания — точное значение |
filter[cashbox_id] | Касса — точное значение |
filter[stock_id] | Склад — точное значение |
filter[status] | Статус — одно значение или список filter[status][] |
filter[opened_at] | период: [0] — с, [1] — по (Y-m-d) |
filter[closed_at] | период: [0] — с, [1] — по (Y-m-d) |
sort[] | Сортировка, - — по убыванию: id, -id, opened_at, -opened_at, closed_at, -closed_at |
with[] | Подгрузить связи: creator.profile, closed_by.profile, company, cashbox, stock |
page | Номер страницы, с 1 |
page-size | Записей на странице, не больше 20 |
Ответ
Пример ответа пока не записан тестами.
Детали смены
/company/trade/cashbox-shift/{model}Смена с итогами в summary: движения по каждому типу оплаты и валюте, количество чеков и возвратов, выданные и погашенные долги. У открытой смены цифры пересчитываются при каждом запросе, у закрытой — зафиксированы на момент закрытия.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры пути
| Параметр | Описание |
|---|---|
model | ID записи |
Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
id | integer | ID |
creator_id | integer | Создатель |
company_id | integer | Компания |
cashbox_id | integer | Касса |
stock_id | integer | Склад |
closed_by_id | null | |
collection_id | null | |
status | string | Статус |
opening_balances | object[] | |
opening_balances[].amount | integer | Сумма |
opening_balances[].currency | string | Валюта |
opening_balances[].payment_type | string | Тип оплаты |
opening_amount | integer | Сумма открытия |
opening_currency | string | Валюта открытия |
opening_comment | null | Примечание |
closing_action | null | Действие при закрытии |
closing_comment | null | Комментарий к кассовой смене |
summary | object | |
summary.currency | string | Валюта |
summary.rows | object[] | |
summary.rows[].payment_type | string | Тип оплаты |
summary.rows[].payment_type_id | null | |
summary.rows[].payment_type_name | null | |
summary.rows[].currency | string | Валюта |
summary.rows[].opening_balance | integer | |
summary.rows[].opening_amount | integer | Сумма открытия |
summary.rows[].opening | integer | |
summary.rows[].income | integer | Доход |
summary.rows[].outcome | integer | |
summary.rows[].expected | integer | |
summary.rows[].by_source | object | |
summary.rows[].by_source.sale | object | |
summary.rows[].by_source.sale.income | integer | Доход |
summary.rows[].by_source.sale.outcome | integer | |
summary.rows[].by_source.client_debt | object | |
summary.rows[].by_source.client_debt.income | integer | Доход |
summary.rows[].by_source.client_debt.outcome | integer | |
summary.rows[].by_source.reason | object | Причина |
summary.rows[].by_source.reason.income | integer | Доход |
summary.rows[].by_source.reason.outcome | integer | |
summary.totals | object[] | |
summary.totals[].currency | string | Валюта |
summary.totals[].opening | integer | |
summary.totals[].income | integer | Доход |
summary.totals[].outcome | integer | |
summary.totals[].expected | integer | |
summary.totals[].cash | integer | |
summary.totals[].non_cash | integer | |
summary.checks_count | integer | |
summary.returns_count | integer | Возвраты (шт.) |
summary.debts | array | |
summary.transactions | object[] | Транзакции |
summary.transactions[].id | integer | ID |
summary.transactions[].type | string | Тип |
summary.transactions[].payment_type | string | Тип оплаты |
summary.transactions[].payment_type_id | null | |
summary.transactions[].currency | string | Валюта |
summary.transactions[].amount | integer | Сумма |
summary.transactions[].status | string | Статус |
summary.transactions[].source_type | string | Источник |
summary.transactions[].source_id | integer | Источник |
summary.transactions[].sale_id | null | Продажа |
summary.transactions[].reason | null | Причина |
summary.transactions[].comment | null | Комментарий |
summary.transactions[].created_at | string | Создано |
opened_at | string | |
closes_at | null | |
overdue_action | null | Когда время вышло |
closed_at | null | |
created_at | string | Создано |
updated_at | string | Обновлено |
closes_in | null | |
company | object | Компания |
company.id | integer | ID |
company.parent_id | null | Родитель |
company.partner_id | integer | Партнёр |
company.district_id | integer | Район |
company.industry_id | integer | Сфера деятельности |
company.name | string | Название |
company.company_name | string | Компания |
company.logo | object | Логотип |
company.logo.original | object | |
company.logo.original.raw | string | |
company.logo.original.webp | string | |
company.logo.widen_25 | object | |
company.logo.widen_25.raw | string | |
company.logo.widen_25.webp | string | |
company.logo.widen_100 | object | |
company.logo.widen_100.raw | string | |
company.logo.widen_100.webp | string | |
company.logo.widen_500 | object | |
company.logo.widen_500.raw | string | |
company.logo.widen_500.webp | string | |
company.inn | string | ИНН |
company.mfo | string | МФО |
company.address | string | Адрес |
company.latitude | null | Широта |
company.longitude | null | Долгота |
company.comment | string | Комментарий |
company.telegram_phone | string | Телефон в Telegram |
company.director_full_name | string | ФИО директора |
company.bank | string | Банк |
company.payment_account | string | Расчётный счёт |
company.agreement_number | string | Номер договора |
company.agreement_date | null | |
company.atmos_terminal_id | integer | ID терминала в Atmos |
company.uniaccess_auto_payment_credit_overdue_days | integer | |
company.uniaccess_branch_id | integer | Branch ID в Uniaccess |
company.field_of_activity | string | Направление |
company.vat_percent | string | НДС (%) |
company.is_using_new_my_uzcard_auto_payment_by_pinfl | boolean | Использует новый метод MyUzcard для автосписания по ПИНФЛ |
company.bonus_entry_period | integer | Период учёта бонусов (в месяцах) |
company.abc_segment_a | integer | |
company.abc_segment_b | integer | |
company.abc_segment_c | integer | |
company.is_pos_window_enabled | boolean | |
company.cashbox_shift_settings | object | |
company.cashbox_shift_settings.is_enabled | boolean | Включено |
company.has_bank_payment_type | boolean | |
company.is_ican_turned_on | boolean | ICAN включён |
{
"id": 31,
"creator_id": 2,
"company_id": 1,
"cashbox_id": 2,
"stock_id": 1,
"closed_by_id": null,
"collection_id": null,
"status": "open",
"opening_balances": [
{
"amount": 1000,
"currency": "uzs",
"payment_type": "cash"
},
{
"amount": 3000,
"currency": "uzs",
"payment_type": "card"
}
],
"opening_amount": 500,
"opening_currency": "uzs",
"opening_comment": null,
"closing_action": null,
"closing_comment": null,
"summary": {
"currency": "uzs",
"rows": [
{
"payment_type": "cash",
"payment_type_id": null,
"payment_type_name": null,
"currency": "uzs",
"opening_balance": 1000,
"opening_amount": 500,
"opening": 1500,
"income": 950,
"outcome": 150,
"expected": 2300,
"by_source": {
"sale": {
"income": 700,
"outcome": 100
},
"client_debt": {
"income": 250,
"outcome": 0
},
"reason": {
"income": 0,
"outcome": 50
}
}
},
{
"payment_type": "card",
"payment_type_id": null,
"payment_type_name": null,
"currency": "uzs",
"opening_balance": 3000,
"opening_amount": 0,
"opening": 3000,
"income": 300,
"outcome": 0,
"expected": 3300,
"by_source": {
"sale": {
"income": 300,
"outcome": 0
}
}
}
],
"totals": [
{
"currency": "uzs",
"opening": 4500,
"income": 1250,
"outcome": 150,
"expected": 5600,
"cash": 2300,
"non_cash": 3300
},
{
"currency": "usd",
"opening": 0,
"income": 0,
"outcome": 0,
"expected": 0,
"cash": 0,
"non_cash": 0
}
],
"checks_count": 0,
"returns_count": 0,
"debts": [],
"transactions": [
{
"id": 151,
"type": "income",
"payment_type": "cash",
"payment_type_id": null,
"currency": "uzs",
"amount": 700,
"status": "completed",
"source_type": "sale",
"source_id": 1,
"sale_id": null,
"reason": null,
"comment": null,
"created_at": "2026-09-30 12:54:02"
},
{
"id": 152,
"type": "income",
"payment_type": "card",
"payment_type_id": null,
"currency": "uzs",
"amount": 300,
"status": "completed",
"source_type": "sale",
"source_id": 1,
"sale_id": null,
"reason": null,
"comment": null,
"created_at": "2026-09-30 12:54:02"
}
]
},
"opened_at": "2026-09-30 12:54:02",
"closes_at": null,
"overdue_action": null,
"closed_at": null,
"created_at": "2026-09-30 12:54:02",
"updated_at": "2026-09-30 12:54:02",
"closes_in": null,
"company": {
"id": 1,
"parent_id": null,
"partner_id": 1,
"district_id": 1,
"industry_id": 1,
"name": "Company 1",
"company_name": "Company 1",
"logo": {
"original": {
"raw": "https://api.wasyt.uz/test_data/images/1.png",
"webp": "https://api.wasyt.uz/storage/thumbs/original/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_25": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/25/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/25/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_100": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/100/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/100/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_500": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/500/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/500/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
}
},
"inn": "000000001",
"mfo": "00001",
"address": "Address 1",
"latitude": null,
"longitude": null,
"comment": "Comment 1",
"telegram_phone": "998000000001",
"director_full_name": "Director 1",
"bank": "Bank 1",
"payment_account": "00000000000000000001",
"agreement_number": "001/2026",
"agreement_date": null,
"atmos_terminal_id": 97007302,
"uniaccess_auto_payment_credit_overdue_days": 3,
"uniaccess_branch_id": 1,
"field_of_activity": "trading",
"vat_percent": "12.00",
"is_using_new_my_uzcard_auto_payment_by_pinfl": true,
"bonus_entry_period": 12,
"abc_segment_a": 75,
"abc_segment_b": 15,
"abc_segment_c": 10,
"is_pos_window_enabled": true,
"cashbox_shift_settings": {
"is_enabled": true
},
"has_bank_payment_type": false,
"is_ican_turned_on": true,
"is_partner_turned_on": false,
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:49:04",
"is_deleted": false,
"parent": null
},
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"full_name": " "
}
},
"closed_by": null,
"cashbox": {
"id": 2,
"creator_id": 2,
"company_id": 1,
"name": "Cashbox 2",
"type": "sale",
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
},
"stock": {
"id": 1,
"creator_id": 2,
"company_id": 1,
"name": "Stock 1",
"is_available": true,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false
}
}Открыть смену
/company/trade/cashbox-shiftОткрывает смену текущего кассира на кассе продаж и складе. Текущий баланс кассы фиксируется как входящий, а разменная сумма opening_amount приходуется в кассу наличными. Ошибка 400, если смены отключены в настройках, у кассира уже есть открытая смена или на кассе работает другой кассир.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
cashbox_id | integer | Да | Касса. ID существующей записи, доступной пользователю |
stock_id | integer | Да | Склад. ID существующей записи, доступной пользователю |
opening_amount | number | Нет | Сумма открытия. До 2 знаков после запятой. Не меньше 0. Не больше 999999999999.99 |
opening_currency | string | Да | Валюта открытия. Допустимые значения: uzs, usd, eur, rub |
opening_comment | string | Нет | Примечание. Макс. 1000 символов |
{
"cashbox_id": 2,
"stock_id": 1,
"opening_amount": 500,
"opening_currency": "uzs",
"opening_comment": "Размен"
}curl -X POST "https://api.wasyt.uz/company/trade/cashbox-shift" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"cashbox_id":2,"stock_id":1,"opening_amount":500,"opening_currency":"uzs","opening_comment":"Размен"}'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
opening_balances | object[] | |
opening_balances[].payment_type | string | Тип оплаты |
opening_balances[].currency | string | Валюта |
opening_balances[].amount | integer | Сумма |
company_id | integer | Компания |
cashbox_id | integer | Касса |
stock_id | integer | Склад |
status | string | Статус |
opening_amount | integer | Сумма открытия |
opening_currency | string | Валюта открытия |
opening_comment | string | Примечание |
opened_at | string | |
closes_at | null | |
overdue_action | null | Когда время вышло |
updated_at | string | Обновлено |
created_at | string | Создано |
creator_id | integer | Создатель |
id | integer | ID |
summary | object | |
summary.currency | string | Валюта |
summary.rows | object[] | |
summary.rows[].payment_type | string | Тип оплаты |
summary.rows[].payment_type_id | null | |
summary.rows[].payment_type_name | null | |
summary.rows[].currency | string | Валюта |
summary.rows[].opening_balance | integer | |
summary.rows[].opening_amount | integer | Сумма открытия |
summary.rows[].opening | integer | |
summary.rows[].income | integer | Доход |
summary.rows[].outcome | integer | |
summary.rows[].expected | integer | |
summary.rows[].by_source | array | |
summary.totals | object[] | |
summary.totals[].currency | string | Валюта |
summary.totals[].opening | integer | |
summary.totals[].income | integer | Доход |
summary.totals[].outcome | integer | |
summary.totals[].expected | integer | |
summary.totals[].cash | integer | |
summary.totals[].non_cash | integer | |
summary.checks_count | integer | |
summary.returns_count | integer | Возвраты (шт.) |
summary.debts | array | |
summary.transactions | array | Транзакции |
closes_in | null | |
company | object | Компания |
company.id | integer | ID |
company.parent_id | null | Родитель |
company.partner_id | integer | Партнёр |
company.district_id | integer | Район |
company.industry_id | integer | Сфера деятельности |
company.name | string | Название |
company.company_name | string | Компания |
company.logo | object | Логотип |
company.logo.original | object | |
company.logo.original.raw | string | |
company.logo.original.webp | string | |
company.logo.widen_25 | object | |
company.logo.widen_25.raw | string | |
company.logo.widen_25.webp | string | |
company.logo.widen_100 | object | |
company.logo.widen_100.raw | string | |
company.logo.widen_100.webp | string | |
company.logo.widen_500 | object | |
company.logo.widen_500.raw | string | |
company.logo.widen_500.webp | string | |
company.inn | string | ИНН |
company.mfo | string | МФО |
company.address | string | Адрес |
company.latitude | null | Широта |
company.longitude | null | Долгота |
company.comment | string | Комментарий |
company.telegram_phone | string | Телефон в Telegram |
company.director_full_name | string | ФИО директора |
company.bank | string | Банк |
company.payment_account | string | Расчётный счёт |
company.agreement_number | string | Номер договора |
company.agreement_date | null | |
company.atmos_terminal_id | integer | ID терминала в Atmos |
company.uniaccess_auto_payment_credit_overdue_days | integer | |
company.uniaccess_branch_id | integer | Branch ID в Uniaccess |
company.field_of_activity | string | Направление |
company.vat_percent | string | НДС (%) |
company.is_using_new_my_uzcard_auto_payment_by_pinfl | boolean | Использует новый метод MyUzcard для автосписания по ПИНФЛ |
company.bonus_entry_period | integer | Период учёта бонусов (в месяцах) |
company.abc_segment_a | integer | |
company.abc_segment_b | integer | |
company.abc_segment_c | integer | |
company.is_pos_window_enabled | boolean | |
company.cashbox_shift_settings | object | |
company.cashbox_shift_settings.is_enabled | boolean | Включено |
company.has_bank_payment_type | boolean | |
company.is_ican_turned_on | boolean | ICAN включён |
company.is_partner_turned_on | boolean | Партнёр включён |
company.created_at | string | Создано |
company.updated_at | string | Обновлено |
company.is_deleted | boolean | |
company.parent | null | |
creator | object | |
creator.id | integer | ID |
creator.type | string | Тип |
creator.role_id | integer | Роль |
creator.company_id | integer | Компания |
creator.partner_id | null | Партнёр |
creator.username | string | Логин |
creator.pinfl | null | ПИНФЛ |
creator.phone | string | Телефон |
creator.sipuni_sip_number | string | VoIP - Sipuni (SIP-номер) |
creator.is_confirmed | boolean | |
creator.are_all_companies_available | boolean | |
creator.last_login_at | null | |
creator.created_at | string | Создано |
creator.updated_at | string | Обновлено |
creator.is_deleted | boolean | |
creator.profile | object | |
creator.profile.first_name | null | Имя |
creator.profile.last_name | null | Фамилия |
creator.profile.position | null | Должность |
creator.profile.birth_date | null | Дата рождения |
creator.profile.gender | null | Пол |
{
"opening_balances": [
{
"payment_type": "cash",
"currency": "uzs",
"amount": 1000
},
{
"payment_type": "card",
"currency": "uzs",
"amount": 3000
}
],
"company_id": 1,
"cashbox_id": 2,
"stock_id": 1,
"status": "open",
"opening_amount": 500,
"opening_currency": "uzs",
"opening_comment": "Размен",
"opened_at": "2026-09-30 12:53:56",
"closes_at": null,
"overdue_action": null,
"updated_at": "2026-09-30 12:53:56",
"created_at": "2026-09-30 12:53:56",
"creator_id": 2,
"id": 17,
"summary": {
"currency": "uzs",
"rows": [
{
"payment_type": "cash",
"payment_type_id": null,
"payment_type_name": null,
"currency": "uzs",
"opening_balance": 1000,
"opening_amount": 500,
"opening": 1500,
"income": 0,
"outcome": 0,
"expected": 1500,
"by_source": []
},
{
"payment_type": "card",
"payment_type_id": null,
"payment_type_name": null,
"currency": "uzs",
"opening_balance": 3000,
"opening_amount": 0,
"opening": 3000,
"income": 0,
"outcome": 0,
"expected": 3000,
"by_source": []
}
],
"totals": [
{
"currency": "uzs",
"opening": 4500,
"income": 0,
"outcome": 0,
"expected": 4500,
"cash": 1500,
"non_cash": 3000
},
{
"currency": "usd",
"opening": 0,
"income": 0,
"outcome": 0,
"expected": 0,
"cash": 0,
"non_cash": 0
}
],
"checks_count": 0,
"returns_count": 0,
"debts": [],
"transactions": []
},
"closes_in": null,
"company": {
"id": 1,
"parent_id": null,
"partner_id": 1,
"district_id": 1,
"industry_id": 1,
"name": "Company 1",
"company_name": "Company 1",
"logo": {
"original": {
"raw": "https://api.wasyt.uz/test_data/images/1.png",
"webp": "https://api.wasyt.uz/storage/thumbs/original/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_25": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/25/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/25/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_100": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/100/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/100/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
},
"widen_500": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/500/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/500/6a21a10b2d2ed8f4573f3842b10dc1df1778568717.webp"
}
},
"inn": "000000001",
"mfo": "00001",
"address": "Address 1",
"latitude": null,
"longitude": null,
"comment": "Comment 1",
"telegram_phone": "998000000001",
"director_full_name": "Director 1",
"bank": "Bank 1",
"payment_account": "00000000000000000001",
"agreement_number": "001/2026",
"agreement_date": null,
"atmos_terminal_id": 97007302,
"uniaccess_auto_payment_credit_overdue_days": 3,
"uniaccess_branch_id": 1,
"field_of_activity": "trading",
"vat_percent": "12.00",
"is_using_new_my_uzcard_auto_payment_by_pinfl": true,
"bonus_entry_period": 12,
"abc_segment_a": 75,
"abc_segment_b": 15,
"abc_segment_c": 10,
"is_pos_window_enabled": true,
"cashbox_shift_settings": {
"is_enabled": true
},
"has_bank_payment_type": false,
"is_ican_turned_on": true,
"is_partner_turned_on": false,
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:49:04",
"is_deleted": false,
"parent": null
},
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"full_name": " "
}
},
"closed_by": null,
"cashbox": {
"id": 2,
"creator_id": 2,
"company_id": 1,
"name": "Cashbox 2",
"type": "sale",
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
},
"stock": {
"id": 1,
"creator_id": 2,
"company_id": 1,
"name": "Stock 1",
"is_available": true,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false
}
}Пример ошибки · 422
{
"message": "Выбранная запись не существует или была удалена (and 1 more error)",
"errors": {
"cashbox_id": [
"Выбранная запись не существует или была удалена"
],
"stock_id": [
"Выбранная запись не существует или была удалена"
]
}
}
