Skip to content

Акции ​

Скидочные акции магазина (AR-404), которые касса применяет сама: на товары, на чек или только по промокоду. Десять типов (type), условия типа — в conditions. Статус (status) не хранится, а считается по датам и «Остановить»: active, scheduled, inactive (завершена), stopped. Если на чек попадает несколько акций, применяется самая выгодная для покупателя; суммируются только акции с is_combinable, не исключённые друг другом (excluded_ids).

МетодАдресНазначение
GET/company/bonus/promotion/product-idsТовары других акций
GET/company/bonus/promotion/product-card/{product}Карточка товара
GET/company/bonus/promotion/code/templateШаблон промокодов
POST/company/bonus/promotion/code/importПрочитать файл промокодов
POST/company/bonus/promotion/code/exportЭкспорт промокодов
GET/company/bonus/promotion/promo-listАкции с промокодом
POST/company/bonus/promotion/check-codeПроверить промокод
POST/company/bonus/promotion/calculateСкидки акций на корзину
PATCH/company/bonus/promotion/{model}/stopОстановить акцию
PATCH/company/bonus/promotion/{model}/resumeВозобновить акцию
GET/company/bonus/promotionСписок акций
GET/company/bonus/promotion/{model}Акция
POST/company/bonus/promotionСоздать акцию
PUT/company/bonus/promotion/{model}Изменить акцию
DELETE/company/bonus/promotion/{model}Удалить акцию

Товары других акций ​

ID товаров, выбранных в других работающих или запланированных акциях — вкладка «Участвуют в других акциях». except_id — редактируемая акция.

GET/company/bonus/promotion/product-ids

Заголовки ​

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

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

ПараметрОписание
except_id
http
GET /company/bonus/promotion/product-ids?except_id=24

Ответ · 200 ​

Поля ответа
ПолеТипОписание
dataarrayДанные
json
{
    "data": [
        2
    ]
}

Карточка товара ​

Для карточки товара шага «Выбор товаров»: цены по филиалам (цена прихода, наценка, цена продажи, оптовая), действующие акции с товаром и поставщики. Цена прихода и наценка скрыты у ролей без права видеть закупочную цену.

GET/company/bonus/promotion/product-card/{product}

Заголовки ​

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

Параметры пути ​

ПараметрОписание
productProduct

Ответ · 200 ​

Поля ответа
ПолеТипОписание
pricesobject[]Цены
prices[].company_idintegerКомпания
prices[].company_namestringКомпания
prices[].purchase_priceintegerЦена при покупке
prices[].markupinteger
prices[].priceintegerЦена
prices[].wholesale_pricenullОптовая цена
prices[].currencystringВалюта
promotionsobject[]
promotions[].idintegerID
promotions[].namestringНазвание
promotions[].typestringТип
promotions[].statusstringСтатус
promotions[].branch_idsarrayФилиалы
suppliersarray
stocksobject[]
stocks[].company_idintegerКомпания
stocks[].company_namestringКомпания
stocks[].quantityintegerКоличество
stocks[].inactive_quantityinteger
stocks[].stocksobject[]
stocks[].stocks[].stock_idintegerСклад
stocks[].stocks[].namestringНазвание
stocks[].stocks[].is_availablebooleanДоступен
stocks[].stocks[].quantityintegerКоличество
stock_productsobject[]
stock_products[].idintegerID
stock_products[].stock_idintegerСклад
stock_products[].company_idintegerКомпания
json
{
    "prices": [
        {
            "company_id": 1,
            "company_name": "Company 1",
            "purchase_price": 1000,
            "markup": 10,
            "price": 1100,
            "wholesale_price": null,
            "currency": "uzs"
        },
        {
            "company_id": 2,
            "company_name": "Company 1-1",
            "purchase_price": null,
            "markup": null,
            "price": null,
            "wholesale_price": null,
            "currency": null
        }
    ],
    "promotions": [
        {
            "id": 27,
            "name": "Карандаши",
            "type": "percent",
            "status": "active",
            "branch_ids": []
        }
    ],
    "suppliers": [
        "Supplier 1"
    ],
    "stocks": [
        {
            "company_id": 1,
            "company_name": "Company 1",
            "quantity": 1,
            "inactive_quantity": 0,
            "stocks": [
                {
                    "stock_id": 1,
                    "name": "Stock 1",
                    "is_available": true,
                    "quantity": 1
                }
            ]
        }
    ],
    "stock_products": [
        {
            "id": 1,
            "stock_id": 1,
            "company_id": 1
        }
    ]
}

Шаблон промокодов ​

Excel с колонками «Промокод», «Общий лимит использований», «Лимит на клиента» и строкой-подсказкой, на языке пользователя.

GET/company/bonus/promotion/code/template

Заголовки ​

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

Ответ · 200 ​

Ответ — файл или текст, не JSON.

Прочитать файл промокодов ​

Читает XLSX, XLS или CSV по шаблону и возвращает коды (заглавными, без повторов); файл не сохраняется.

POST/company/bonus/promotion/code/import

Заголовки ​

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

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

ПолеТипОбязательноОписание
filefileДаФайл. Форматы: xlsx, xls, csv, txt. Макс. 5120 КБ
json
{}
bash
curl -X POST "https://api.wasyt.uz/company/bonus/promotion/code/import" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '[]'

Ответ · 200 ​

Поля ответа
ПолеТипОписание
dataobject[]Данные
data[].codestringКод
data[].total_limitintegerОбщий лимит использований
data[].client_limitnullЛимит на клиента
countintegerКоличество
json
{
    "data": [
        {
            "code": "SALE1",
            "total_limit": 5,
            "client_limit": null
        },
        {
            "code": "SALE2",
            "total_limit": null,
            "client_limit": null
        }
    ],
    "count": 2
}

Экспорт промокодов ​

Excel с переданным списком кодов.

POST/company/bonus/promotion/code/export

Заголовки ​

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

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

ПолеТипОбязательноОписание
codesobject[]ДаПромокоды. Макс. 10000 элементов
codes[].codestringДаКод. Макс. 20 символов
codes[].total_limitintegerНетОбщий лимит использований. Не меньше 1
codes[].client_limitintegerНетЛимит на клиента. Не меньше 1
json
{
    "codes": [
        {
            "code": "SALE1",
            "total_limit": 10
        }
    ]
}
bash
curl -X POST "https://api.wasyt.uz/company/bonus/promotion/code/export" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"codes":[{"code":"SALE1","total_limit":10}]}'

Ответ · 200 ​

Ответ — файл или текст, не JSON.

Акции с промокодом ​

Работающие в филиале акции по промокоду — справочный список панели «Введите код» кассы.

GET/company/bonus/promotion/promo-list

Заголовки ​

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

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

ПолеТипОбязательноОписание
company_idintegerДаКомпания. Допустимые значения: 2, 1

Ответ · 200 ​

Поля ответа
ПолеТипОписание
dataobject[]Данные
data[].idintegerID
data[].namestringНазвание
data[].typestringТип
data[].codes_countinteger
data[].ends_atstringКонец
json
{
    "data": [
        {
            "id": 51,
            "name": "ТЕСТ",
            "type": "coupon_percent",
            "codes_count": 2,
            "ends_at": "2026-11-27 16:46:26"
        }
    ]
}

Проверить промокод ​

Код принимается, если это промокод или код файла работающей в филиале акции. Для кода с лимитом использований нужен client_id; исчерпанный лимит — 422.

POST/company/bonus/promotion/check-code

Заголовки ​

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

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

ПолеТипОбязательноОписание
company_idintegerДаКомпания. Допустимые значения: 2, 1
codestringДаКод. Макс. 40 символов
client_idintegerНетКлиент. ID существующей записи, доступной пользователю
json
{
    "company_id": 1,
    "code": " blog1 "
}
bash
curl -X POST "https://api.wasyt.uz/company/bonus/promotion/check-code" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"company_id":1,"code":" blog1 "}'

Ответ · 200 ​

Поля ответа
ПолеТипОписание
idintegerID
namestringНазвание
typestringТип
codestringКод
json
{
    "id": 48,
    "name": "Блогеры",
    "type": "coupon_percent",
    "code": "BLOG1"
}

Скидки акций на корзину ​

Что работающие акции филиала снимают с корзины: lines — скидка на единицу по ключу строки (key), promotions — применённые акции с суммой, total. Неверный промокод не применяется и возвращается в errors.promo_code. Продажа пересчитывает то же самое: доля акций в скидке строки не требует права на скидку и не ограничена лимитом сотрудника и минимальной ценой.

POST/company/bonus/promotion/calculate

Заголовки ​

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

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

ПолеТипОбязательноОписание
company_idintegerДаКомпания. Допустимые значения: 2, 1
currencystringНетВалюта. Макс. 3 символов
is_wholesalebooleanНет
promo_codestringНетПромокод. Макс. 40 символов
client_idintegerНетКлиент
productsobject[]НетПродукты. Макс. 100 элементов
products[].keystringНетСобытие. Макс. 64 символов
products[].product_idintegerДаПродукт
products[].quantitynumberДаКоличество. До 8 знаков после запятой. Не меньше 0.00000001
products[].pricenumberДаЦена. До 2 знаков после запятой. Не меньше 0. Не больше 999999999999.99
json
{
    "company_id": 1,
    "currency": "uzs",
    "products": [
        {
            "key": "a1",
            "product_id": 1,
            "quantity": 2,
            "price": 1100
        },
        {
            "key": "a2",
            "product_id": 2,
            "quantity": 1,
            "price": 5000
        }
    ]
}
bash
curl -X POST "https://api.wasyt.uz/company/bonus/promotion/calculate" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"company_id":1,"currency":"uzs","products":[{"key":"a1","product_id":1,"quantity":2,"price":1100},{"key":"a2","product_id":2,"quantity":1,"price":5000}]}'

Ответ · 200 ​

Поля ответа
ПолеТипОписание
linesobject
lines.a1integer
lines.a2integer
promotionsobject[]
promotions[].idintegerID
promotions[].namestringНазвание
promotions[].typestringТип
promotions[].amountintegerСумма
totalintegerВсего записей
promotion_idnull
promo_codenullПромокод
errorsarrayОшибки валидации по полям
json
{
    "lines": {
        "a1": 110,
        "a2": 0
    },
    "promotions": [
        {
            "id": 28,
            "name": "−10%",
            "type": "percent",
            "amount": 220
        }
    ],
    "total": 220,
    "promotion_id": null,
    "promo_code": null,
    "errors": []
}

Остановить акцию ​

Остановленная акция не применяется на кассе.

PATCH/company/bonus/promotion/{model}/stop

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

Заголовки ​

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

Параметры пути ​

ПараметрОписание
modelID записи

Ответ · 200 ​

Поля ответа
ПолеТипОписание
idintegerID
creator_idintegerСоздатель
updater_idintegerОбновитель
company_idintegerКомпания
typestringТип
namestringНазвание
descriptionnullОписание
branch_idsarrayФилиалы
conditionsobjectУсловия акции
conditions.percentintegerПроцент
price_scopestringПрименение скидки
starts_atnullНачало
ends_atnullКонец
is_promo_codebooleanРаботает по промокоду
promo_codenullПромокод
is_all_productsbooleanПрименить ко всем товарам
is_combinablebooleanРаботает вместе с другими акциями
excluded_idsarrayНе суммировать с акциями
is_stoppedboolean
products_countinteger
codes_countinteger
created_atstringСоздано
updated_atstringОбновлено
statusstringСтатус
json
{
    "id": 22,
    "creator_id": 2,
    "updater_id": 2,
    "company_id": 1,
    "type": "percent",
    "name": "Акция",
    "description": null,
    "branch_ids": [],
    "conditions": {
        "percent": 10
    },
    "price_scope": "both",
    "starts_at": null,
    "ends_at": null,
    "is_promo_code": false,
    "promo_code": null,
    "is_all_products": false,
    "is_combinable": false,
    "excluded_ids": [],
    "is_stopped": true,
    "products_count": 1,
    "codes_count": 0,
    "created_at": "2026-11-25 16:46:24",
    "updated_at": "2026-11-25 16:46:24",
    "status": "stopped"
}

Возобновить акцию ​

Возвращает акции статус по её датам: активна, запланирована или завершена.

PATCH/company/bonus/promotion/{model}/resume

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

Заголовки ​

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

Параметры пути ​

ПараметрОписание
modelID записи

Ответ · 200 ​

Поля ответа
ПолеТипОписание
idintegerID
creator_idintegerСоздатель
updater_idintegerОбновитель
company_idintegerКомпания
typestringТип
namestringНазвание
descriptionnullОписание
branch_idsarrayФилиалы
conditionsobjectУсловия акции
conditions.percentintegerПроцент
price_scopestringПрименение скидки
starts_atstringНачало
ends_atnullКонец
is_promo_codebooleanРаботает по промокоду
promo_codenullПромокод
is_all_productsbooleanПрименить ко всем товарам
is_combinablebooleanРаботает вместе с другими акциями
excluded_idsarrayНе суммировать с акциями
is_stoppedboolean
products_countinteger
codes_countinteger
created_atstringСоздано
updated_atstringОбновлено
statusstringСтатус
json
{
    "id": 23,
    "creator_id": 2,
    "updater_id": 2,
    "company_id": 1,
    "type": "percent",
    "name": "Акция",
    "description": null,
    "branch_ids": [],
    "conditions": {
        "percent": 10
    },
    "price_scope": "both",
    "starts_at": "2026-11-26 16:46:24",
    "ends_at": null,
    "is_promo_code": false,
    "promo_code": null,
    "is_all_products": false,
    "is_combinable": false,
    "excluded_ids": [],
    "is_stopped": false,
    "products_count": 1,
    "codes_count": 0,
    "created_at": "2026-11-25 16:46:24",
    "updated_at": "2026-11-25 16:46:24",
    "status": "scheduled"
}

Список акций ​

Постраничный список акций доступных компаний. filter[status] — вкладка (active, inactive — остановленные и завершённые, scheduled), filter[search] — ID, филиал, название или промокод, filter[branch_id], filter[type], filter[starts_from] / filter[ends_to] — даты, filter[product_id] — акции товара. counts — число акций каждой вкладки при остальных фильтрах.

GET/company/bonus/promotion

Заголовки ​

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

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

ПараметрОписание
filter[id]ID — точное значение
filter[type]Тип — точное значение
filter[is_promo_code]Работает по промокоду — точное значение
sort[]Сортировка, - — по убыванию: id, -id, name, -name, starts_at, -starts_at, ends_at, -ends_at
with[]Подгрузить связи: creator.profile, company, products.product.price, products.product.category, products.product.unit, gift_products.product.price, gift_products.product.category, gift_products.product.unit, codes
pageНомер страницы, с 1
page-sizeЗаписей на странице, не больше 20
http
GET /company/bonus/promotion?filter[status]=inactive

Ответ · 200 ​

Постраничный ответ: записи в data[], пагинация в links и meta.

Поля ответа
ПолеТипОписание
dataobject[]Данные
data[].idintegerID
data[].creator_idintegerСоздатель
data[].updater_idintegerОбновитель
data[].company_idintegerКомпания
data[].typestringТип
data[].namestringНазвание
data[].descriptionnullОписание
data[].branch_idsarrayФилиалы
data[].conditionsobjectУсловия акции
data[].conditions.percentintegerПроцент
data[].price_scopestringПрименение скидки
data[].starts_atnullНачало
data[].ends_atstringКонец
data[].is_promo_codebooleanРаботает по промокоду
data[].promo_codenullПромокод
data[].is_all_productsbooleanПрименить ко всем товарам
data[].is_combinablebooleanРаботает вместе с другими акциями
data[].excluded_idsarrayНе суммировать с акциями
data[].is_stoppedboolean
data[].products_countinteger
data[].codes_countinteger
data[].created_atstringСоздано
data[].updated_atstringОбновлено
data[].first_codenull
data[].statusstringСтатус
json
{
    "data": [
        {
            "id": 14,
            "creator_id": 2,
            "updater_id": 2,
            "company_id": 1,
            "type": "percent",
            "name": "Прошла",
            "description": null,
            "branch_ids": [],
            "conditions": {
                "percent": 10
            },
            "price_scope": "both",
            "starts_at": null,
            "ends_at": "2026-11-24 16:46:24",
            "is_promo_code": false,
            "promo_code": null,
            "is_all_products": false,
            "is_combinable": false,
            "excluded_ids": [],
            "is_stopped": false,
            "products_count": 1,
            "codes_count": 0,
            "created_at": "2026-11-25 16:46:24",
            "updated_at": "2026-11-25 16:46:24",
            "first_code": null,
            "status": "inactive"
        },
        {
            "id": 13,
            "creator_id": 2,
            "updater_id": 2,
            "company_id": 1,
            "type": "percent",
            "name": "Стоп",
            "description": null,
            "branch_ids": [],
            "conditions": {
                "percent": 10
            },
            "price_scope": "both",
            "starts_at": null,
            "ends_at": null,
            "is_promo_code": false,
            "promo_code": null,
            "is_all_products": false,
            "is_combinable": false,
            "excluded_ids": [],
            "is_stopped": true,
            "products_count": 1,
            "codes_count": 0,
            "created_at": "2026-11-25 16:46:24",
            "updated_at": "2026-11-25 16:46:24",
            "first_code": null,
            "status": "stopped"
        }
    ],
    "links": {
        "first": "https://api.wasyt.uz/company/bonus/promotion?page=1",
        "last": "https://api.wasyt.uz/company/bonus/promotion?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [],
        "path": "https://api.wasyt.uz/company/bonus/promotion",
        "per_page": 20,
        "to": 2,
        "total": 2
    },
    "counts": {
        "all": 4,
        "active": 1,
        "inactive": 2,
        "scheduled": 1
    }
}

Акция ​

Одна акция по ID; товары — with[]=products.product.price, товары по скидке — with[]=gift_products.product.price, коды файла — with[]=codes.

GET/company/bonus/promotion/{model}

Заголовки ​

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

Параметры пути ​

ПараметрОписание
modelID записи

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

ПараметрОписание
with[]Подгрузить связи
http
GET /company/bonus/promotion/9?with[0]=products.product.price&with[1]=gift_products.product.price&with[2]=codes

Ответ · 200 ​

Поля ответа
ПолеТипОписание
idintegerID
creator_idintegerСоздатель
updater_idintegerОбновитель
company_idintegerКомпания
typestringТип
namestringНазвание
descriptionnullОписание
branch_idsarrayФилиалы
conditionsobjectУсловия акции
conditions.percentintegerПроцент
price_scopestringПрименение скидки
starts_atnullНачало
ends_atnullКонец
is_promo_codebooleanРаботает по промокоду
promo_codenullПромокод
is_all_productsbooleanПрименить ко всем товарам
is_combinablebooleanРаботает вместе с другими акциями
excluded_idsarrayНе суммировать с акциями
is_stoppedboolean
products_countinteger
codes_countinteger
created_atstringСоздано
updated_atstringОбновлено
first_codenull
productsobject[]Продукты
products[].idintegerID
products[].company_idintegerКомпания
products[].promotion_idinteger
products[].product_idintegerПродукт
products[].is_giftboolean
products[].pricenullЦена
products[].created_atstringСоздано
products[].updated_atstringОбновлено
products[].productobject
products[].product.idintegerID
products[].product.parent_idnullРодитель
products[].product.creator_idintegerСоздатель
products[].product.company_idintegerКомпания
products[].product.category_idintegerКатегория
products[].product.brand_idintegerБренд
products[].product.unit_idintegerЕдиница измерения
products[].product.namestringНазвание
products[].product.full_textstringПолный текст
products[].product.plustringАртикул (PLU)
products[].product.custom_idnullID товара
products[].product.descriptionstringОписание
products[].product.is_free_pricebooleanПродажа по свободной цене
products[].product.is_favoritebooleanИзбранный
products[].product.has_variantsbooleanТовар с модификациями
products[].product.is_imeibooleanУчёт по IMEI
products[].product.variant_attributesarrayХарактеристики
products[].product.variant_valuesarrayЗначения варианта
products[].product.min_quantitynullМинимальный остаток
products[].product.barcodestringШтрих-код
products[].product.additional_barcodesarrayДополнительный штрих-код
products[].product.industrial_barcodenullПромышленный штрих-код
products[].product.additional_industrial_barcodesarray
products[].product.images_listarrayИзображения
products[].product.images_list_thumbsobject[]
products[].product.images_list_thumbs[].widen_100object
products[].product.images_list_thumbs[].widen_100.rawstring
products[].product.images_list_thumbs[].widen_100.webpstring
products[].product.images_list_thumbs[].widen_500object
products[].product.images_list_thumbs[].widen_500.rawstring
products[].product.images_list_thumbs[].widen_500.webpstring
products[].product.images_list_thumbs[].originalobject
products[].product.images_list_thumbs[].original.rawstring
products[].product.images_list_thumbs[].original.webpstring
products[].product.created_atstringСоздано
products[].product.updated_atstringОбновлено
products[].product.is_deletedbooleanУдалена
products[].product.priceobjectЦена
products[].product.price.idintegerID
products[].product.price.updater_idintegerОбновитель
products[].product.price.company_idintegerКомпания
products[].product.price.product_idintegerПродукт
products[].product.price.source_typestringИсточник
products[].product.price.source_idintegerИсточник
products[].product.price.priceintegerЦена
products[].product.price.currencystringВалюта
products[].product.price.min_pricenull
products[].product.price.min_price_percentnull
products[].product.price.wholesale_pricenullОптовая цена
products[].product.price.created_atstringСоздано
products[].product.price.updated_atstringОбновлено
products[].product.price.effective_min_priceinteger
products[].product.price.price_uzsinteger
products[].product.price.effective_min_price_uzsinteger
products[].product.price.wholesale_price_uzsnull
products[].product.price.price_usdnumber
products[].product.price.effective_min_price_usdinteger
products[].product.price.wholesale_price_usdnull
products[].product.price.price_eurnumber
products[].product.price.effective_min_price_eurinteger
products[].product.price.wholesale_price_eurnull
products[].product.price.price_rubnumber
products[].product.price.effective_min_price_rubinteger
products[].product.price.wholesale_price_rubnull
gift_productsobject[]Товары по скидке
gift_products[].idintegerID
gift_products[].company_idintegerКомпания
gift_products[].promotion_idinteger
gift_products[].product_idintegerПродукт
gift_products[].is_giftboolean
gift_products[].pricenullЦена
gift_products[].created_atstringСоздано
gift_products[].updated_atstringОбновлено
gift_products[].productobject
gift_products[].product.idintegerID
gift_products[].product.parent_idintegerРодитель
gift_products[].product.creator_idintegerСоздатель
gift_products[].product.company_idintegerКомпания
gift_products[].product.category_idintegerКатегория
gift_products[].product.brand_idintegerБренд
gift_products[].product.unit_idintegerЕдиница измерения
gift_products[].product.namestringНазвание
gift_products[].product.full_textstringПолный текст
gift_products[].product.plustringАртикул (PLU)
gift_products[].product.custom_idnullID товара
gift_products[].product.descriptionstringОписание
json
{
    "id": 9,
    "creator_id": 2,
    "updater_id": 2,
    "company_id": 1,
    "type": "percent",
    "name": "Акция",
    "description": null,
    "branch_ids": [],
    "conditions": {
        "percent": 10
    },
    "price_scope": "both",
    "starts_at": null,
    "ends_at": null,
    "is_promo_code": false,
    "promo_code": null,
    "is_all_products": false,
    "is_combinable": false,
    "excluded_ids": [],
    "is_stopped": false,
    "products_count": 1,
    "codes_count": 0,
    "created_at": "2026-11-25 16:46:24",
    "updated_at": "2026-11-25 16:46:24",
    "first_code": null,
    "products": [
        {
            "id": 10,
            "company_id": 1,
            "promotion_id": 9,
            "product_id": 1,
            "is_gift": false,
            "price": null,
            "created_at": "2026-11-25 16:46:24",
            "updated_at": "2026-11-25 16:46:24",
            "product": {
                "id": 1,
                "parent_id": null,
                "creator_id": 1,
                "company_id": 1,
                "category_id": 4,
                "brand_id": 1,
                "unit_id": 1,
                "name": "Product 1",
                "full_text": "Product 1",
                "plu": "0001",
                "custom_id": null,
                "description": "Description 1",
                "is_free_price": false,
                "is_favorite": false,
                "has_variants": false,
                "is_imei": false,
                "variant_attributes": [],
                "variant_values": [],
                "min_quantity": null,
                "barcode": "0000000000001",
                "additional_barcodes": [],
                "industrial_barcode": null,
                "additional_industrial_barcodes": [],
                "images_list": [
                    "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                    "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                ],
                "images_list_thumbs": [
                    {
                        "widen_100": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png"
                        },
                        "widen_500": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png"
                        },
                        "original": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png"
                        }
                    },
                    {
                        "widen_100": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                        },
                        "widen_500": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                        },
                        "original": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                        }
                    }
                ],
                "created_at": "2026-11-25 16:42:00",
                "updated_at": "2026-11-25 16:46:24",
                "is_deleted": false,
                "price": {
                    "id": 1,
                    "updater_id": 2,
                    "company_id": 1,
                    "product_id": 1,
                    "source_type": "purchase",
                    "source_id": 1,
                    "price": 1100,
                    "currency": "uzs",
                    "min_price": null,
                    "min_price_percent": null,
                    "wholesale_price": null,
                    "created_at": "2026-11-25 16:42:00",
                    "updated_at": "2026-11-25 16:42:00",
                    "effective_min_price": 0,
                    "price_uzs": 1100,
                    "effective_min_price_uzs": 0,
                    "wholesale_price_uzs": null,
                    "price_usd": 1.1,
                    "effective_min_price_usd": 0,
                    "wholesale_price_usd": null,
                    "price_eur": 1.1,
                    "effective_min_price_eur": 0,
                    "wholesale_price_eur": null,
                    "price_rub": 1.1,
                    "effective_min_price_rub": 0,
                    "wholesale_price_rub": null
                }
            }
        }
    ],
    "gift_products": [
        {
            "id": 11,
            "company_id": 1,
            "promotion_id": 9,
            "product_id": 2,
            "is_gift": true,
            "price": null,
            "created_at": "2026-11-25 16:46:24",
            "updated_at": "2026-11-25 16:46:24",
            "product": {
                "id": 2,
                "parent_id": 1,
                "creator_id": 1,
                "company_id": 1,
                "category_id": 4,
                "brand_id": 1,
                "unit_id": 1,
                "name": "Product 1-1",
                "full_text": "Product 1-1 full text",
                "plu": "0011",
                "custom_id": null,
                "description": "Description 1-1",
                "is_free_price": false,
                "is_favorite": false,
                "has_variants": false,
                "is_imei": false,
                "variant_attributes": [],
                "variant_values": [],
                "min_quantity": null,
                "barcode": "0000000000011",
                "additional_barcodes": [],
                "industrial_barcode": null,
                "additional_industrial_barcodes": [],
                "images_list": [
                    "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                    "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                ],
                "images_list_thumbs": [
                    {
                        "widen_100": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png"
                        },
                        "widen_500": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png"
                        },
                        "original": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/1.png"
                        }
                    },
                    {
                        "widen_100": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                        },
                        "widen_500": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                        },
                        "original": {
                            "raw": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png",
                            "webp": "https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
                        }
                    }
                ],
                "created_at": "2026-11-25 16:42:00",
                "updated_at": "2026-11-25 16:46:24",
                "is_deleted": false,
                "price": {
                    "id": 2,
                    "updater_id": 2,
                    "company_id": 1,
                    "product_id": 2,
                    "source_type": "purchase",
                    "source_id": 1,
                    "price": 2400,
                    "currency": "usd",
                    "min_price": null,
                    "min_price_percent": null,
                    "wholesale_price": null,
                    "created_at": "2026-11-25 16:42:00",
                    "updated_at": "2026-11-25 16:42:00",
                    "effective_min_price": 0,
                    "price_uzs": 2400000,
                    "effective_min_price_uzs": 0,
                    "wholesale_price_uzs": null,
                    "price_usd": 2400,
                    "effective_min_price_usd": 0,
                    "wholesale_price_usd": null,
                    "price_eur": 2400,
                    "effective_min_price_eur": 0,
                    "wholesale_price_eur": null,
                    "price_rub": 2400,
                    "effective_min_price_rub": 0,
                    "wholesale_price_rub": null
                }
            }
        }
    ],
    "codes": [],
    "status": "active"
}

Создать акцию ​

Создаёт акцию со всеми шагами мастера. Пустой branch_ids — все филиалы. Без starts_at/ends_at — без ограничения. Купонные типы (coupon_*) всегда работают по промокоду: нужен promo_code или список codes. Нужен хотя бы один товар, если не is_all_products; при conditions.price_mode = different у каждого товара своя price. У карусели и скидки на чек по сумме нет взаимоисключений, у типов на количество и на чек — price_scope.

POST/company/bonus/promotion

Заголовки ​

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

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

ПолеТипОбязательноОписание
typestringДаТип. Допустимые значения: percent, fixed_price, buy_get, carousel, quantity_percent, check_sum, check_quantity, coupon_percent, coupon_fixed_price, coupon_buy_get
namestringДаНазвание. Макс. 80 символов
descriptionstringНетОписание. Макс. 300 символов
branch_idsarrayНетФилиалы. Макс. 100 элементов. ID существующей записи, доступной пользователю
branch_ids[]integerНетФилиалы. Без повторов
price_scopestringНетПрименение скидки. Допустимые значения: retail, wholesale, both
starts_atstring (date)НетНачало
ends_atstring (date)НетКонец. Не раньше starts_at
is_promo_codebooleanНетРаботает по промокоду
promo_codestringНетПромокод. Макс. 20 символов. Шаблон /^[A-Z0-9_\-]{1,20}$/
codesobject[]НетПромокоды. Макс. 10000 элементов
codes[].codestringДаКод. Макс. 20 символов. Шаблон /^[A-Z0-9_\-]{1,20}$/. Без повторов
codes[].total_limitintegerНетОбщий лимит использований. Не меньше 1. Не больше 100000000
codes[].client_limitintegerНетЛимит на клиента. Не меньше 1. Не больше 100000000
is_all_productsbooleanНетПрименить ко всем товарам
productsobject[]НетПродукты. Макс. 5000 элементов
products[].product_idintegerДаПродукт. Без повторов
products[].pricenumberНетЦена. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
gift_productsobject[]НетТовары по скидке. Макс. 5000 элементов
gift_products[].product_idintegerДаПродукт. Без повторов
is_combinablebooleanНетРаботает вместе с другими акциями
excluded_idsarrayНетНе суммировать с акциями. Макс. 1000 элементов
excluded_ids[]integerНетНе суммировать с акциями
conditionsarrayНетУсловия акции
conditions.percentnumberДаПроцент. До 2 знаков после запятой. > 0. Не больше 100
conditions.price_modestringНетЦена по акции. Допустимые значения: single, different
conditions.pricenumberНетЦена. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
conditions.buy_quantityintegerНетКоличество для покупки. Не меньше 1. Не больше 1000
conditions.get_quantityintegerНетКоличество по скидке. Не меньше 1. Не больше 1000
conditions.min_quantitynumberНетМинимальный остаток. До 4 знаков после запятой. > 0. Не больше 1000000
conditions.levelsobject[]НетУровни. Мин. 1 элементов. Макс. 10 элементов
conditions.levels[].positionintegerНетДолжность. Не меньше 1. Не больше 1000
conditions.levels[].percentnumberНетПроцент. До 2 знаков после запятой. > 0. Не больше 100
conditions.levels[].amountnumberНетСумма. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
conditions.levels[].discountnumberНетСкидка. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
conditions.levels[].discount_typestringНетТип скидки. Допустимые значения: percent, amount
json
{
    "type": "percent",
    "name": "Осенняя распродажа",
    "description": "Скидка на карандаши",
    "branch_ids": "{{empty_array}}",
    "price_scope": "both",
    "starts_at": "2026-11-25 00:00:00",
    "ends_at": "2026-11-28 18:00:00",
    "conditions": {
        "percent": 10
    },
    "products": [
        {
            "product_id": 1
        }
    ]
}
bash
curl -X POST "https://api.wasyt.uz/company/bonus/promotion" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"type":"percent","name":"Осенняя распродажа","description":"Скидка на карандаши","branch_ids":"{{empty_array}}","price_scope":"both","starts_at":"2026-11-25 00:00:00","ends_at":"2026-11-28 18:00:00","conditions":{"percent":10},"products":[{"product_id":1}]}'

Ответ · 200 ​

Поля ответа
ПолеТипОписание
typestringТип
namestringНазвание
descriptionstringОписание
starts_atstringНачало
ends_atstringКонец
branch_idsarrayФилиалы
conditionsobjectУсловия акции
conditions.percentintegerПроцент
price_scopestringПрименение скидки
is_promo_codebooleanРаботает по промокоду
promo_codenullПромокод
is_all_productsbooleanПрименить ко всем товарам
is_combinablebooleanРаботает вместе с другими акциями
excluded_idsarrayНе суммировать с акциями
updated_atstringОбновлено
created_atstringСоздано
updater_idintegerОбновитель
creator_idintegerСоздатель
company_idintegerКомпания
idintegerID
products_countinteger
codes_countinteger
statusstringСтатус
json
{
    "type": "percent",
    "name": "Осенняя распродажа",
    "description": "Скидка на карандаши",
    "starts_at": "2026-11-25 00:00:00",
    "ends_at": "2026-11-28 18:00:00",
    "branch_ids": [],
    "conditions": {
        "percent": 10
    },
    "price_scope": "both",
    "is_promo_code": false,
    "promo_code": null,
    "is_all_products": false,
    "is_combinable": false,
    "excluded_ids": [],
    "updated_at": "2026-11-25 16:46:22",
    "created_at": "2026-11-25 16:46:22",
    "updater_id": 2,
    "creator_id": 2,
    "company_id": 1,
    "id": 1,
    "products_count": 1,
    "codes_count": 0,
    "status": "active"
}

Изменить акцию ​

Обновляет акцию и полностью заменяет её товары и коды переданными.

PUT/company/bonus/promotion/{model}

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

Заголовки ​

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

Параметры пути ​

ПараметрОписание
modelID записи

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

ПолеТипОбязательноОписание
typestringДаТип. Допустимые значения: percent, fixed_price, buy_get, carousel, quantity_percent, check_sum, check_quantity, coupon_percent, coupon_fixed_price, coupon_buy_get
namestringДаНазвание. Макс. 80 символов
descriptionstringНетОписание. Макс. 300 символов
branch_idsarrayНетФилиалы. Макс. 100 элементов. ID существующей записи, доступной пользователю
branch_ids[]integerНетФилиалы. Без повторов
price_scopestringНетПрименение скидки. Допустимые значения: retail, wholesale, both
starts_atstring (date)НетНачало
ends_atstring (date)НетКонец. Не раньше starts_at
is_promo_codebooleanНетРаботает по промокоду
promo_codestringНетПромокод. Макс. 20 символов. Шаблон /^[A-Z0-9_\-]{1,20}$/
codesobject[]НетПромокоды. Макс. 10000 элементов
codes[].codestringДаКод. Макс. 20 символов. Шаблон /^[A-Z0-9_\-]{1,20}$/. Без повторов
codes[].total_limitintegerНетОбщий лимит использований. Не меньше 1. Не больше 100000000
codes[].client_limitintegerНетЛимит на клиента. Не меньше 1. Не больше 100000000
is_all_productsbooleanНетПрименить ко всем товарам
productsobject[]НетПродукты. Макс. 5000 элементов
products[].product_idintegerДаПродукт. Без повторов
products[].pricenumberНетЦена. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
gift_productsobject[]НетТовары по скидке. Макс. 5000 элементов
gift_products[].product_idintegerДаПродукт. Без повторов
is_combinablebooleanНетРаботает вместе с другими акциями
excluded_idsarrayНетНе суммировать с акциями. Макс. 1000 элементов
excluded_ids[]integerНетНе суммировать с акциями
conditionsarrayНетУсловия акции
conditions.percentnumberДаПроцент. До 2 знаков после запятой. > 0. Не больше 100
conditions.price_modestringНетЦена по акции. Допустимые значения: single, different
conditions.pricenumberНетЦена. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
conditions.buy_quantityintegerНетКоличество для покупки. Не меньше 1. Не больше 1000
conditions.get_quantityintegerНетКоличество по скидке. Не меньше 1. Не больше 1000
conditions.min_quantitynumberНетМинимальный остаток. До 4 знаков после запятой. > 0. Не больше 1000000
conditions.levelsobject[]НетУровни. Мин. 1 элементов. Макс. 10 элементов
conditions.levels[].positionintegerНетДолжность. Не меньше 1. Не больше 1000
conditions.levels[].percentnumberНетПроцент. До 2 знаков после запятой. > 0. Не больше 100
conditions.levels[].amountnumberНетСумма. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
conditions.levels[].discountnumberНетСкидка. До 2 знаков после запятой. Не меньше 0.01. Не больше 999999999999.99
conditions.levels[].discount_typestringНетТип скидки. Допустимые значения: percent, amount
json
{
    "type": "percent",
    "name": "Новое имя",
    "description": "Скидка на карандаши",
    "branch_ids": "{{empty_array}}",
    "price_scope": "both",
    "starts_at": "2026-11-25 00:00:00",
    "ends_at": "2026-11-28 18:00:00",
    "conditions": {
        "percent": 10
    },
    "products": [
        {
            "product_id": 2
        }
    ]
}
bash
curl -X PUT "https://api.wasyt.uz/company/bonus/promotion/8" \
  -H "Accept: application/json" \
  -H "Accept-Language: ru" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"type":"percent","name":"Новое имя","description":"Скидка на карандаши","branch_ids":"{{empty_array}}","price_scope":"both","starts_at":"2026-11-25 00:00:00","ends_at":"2026-11-28 18:00:00","conditions":{"percent":10},"products":[{"product_id":2}]}'

Ответ · 200 ​

Поля ответа
ПолеТипОписание
idintegerID
creator_idintegerСоздатель
updater_idintegerОбновитель
company_idintegerКомпания
typestringТип
namestringНазвание
descriptionstringОписание
branch_idsarrayФилиалы
conditionsobjectУсловия акции
conditions.percentintegerПроцент
price_scopestringПрименение скидки
starts_atstringНачало
ends_atstringКонец
is_promo_codebooleanРаботает по промокоду
promo_codenullПромокод
is_all_productsbooleanПрименить ко всем товарам
is_combinablebooleanРаботает вместе с другими акциями
excluded_idsarrayНе суммировать с акциями
is_stoppedboolean
products_countinteger
codes_countinteger
created_atstringСоздано
updated_atstringОбновлено
statusstringСтатус
json
{
    "id": 8,
    "creator_id": 2,
    "updater_id": 2,
    "company_id": 1,
    "type": "percent",
    "name": "Новое имя",
    "description": "Скидка на карандаши",
    "branch_ids": [],
    "conditions": {
        "percent": 10
    },
    "price_scope": "both",
    "starts_at": "2026-11-25 00:00:00",
    "ends_at": "2026-11-28 18:00:00",
    "is_promo_code": false,
    "promo_code": null,
    "is_all_products": false,
    "is_combinable": false,
    "excluded_ids": [],
    "is_stopped": false,
    "products_count": 1,
    "codes_count": 0,
    "created_at": "2026-11-25 16:46:23",
    "updated_at": "2026-11-25 16:46:24",
    "status": "active"
}

Удалить акцию ​

Удаляет остановленную или завершённую акцию вместе с товарами и кодами; работающую или запланированную — 400 «Чтобы удалить, сначала остановите акцию».

DELETE/company/bonus/promotion/{model}

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

Заголовки ​

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

Параметры пути ​

ПараметрОписание
modelID записи

Ответ · 200 ​

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