[POST] …/v1/UserOperatingCash/Get
Возвращает информацию о доступных кассах пользователя.
Входные параметры
Название | Тип данных | Обязательность | Описание |
---|---|---|---|
ids | Array of Int64 | Необязательный | id пользователя |
user_id | Int64 | Необязательный | |
operating_cash_id | Int64 | Необязательный | id кассы |
price_type_ids | Array of Int64 | Необязательный | |
stock_ids | Array of Int64 | Необязательный | |
isVirtual | Boolean | Необязательный | Метка о том, что касса виртуальная |
sort_orders | Array of SortOrders | Необязательный | Сортировака выходных параметров |
search | String | Необязательный | Строка поиска по полям: user_first_name - , middle_name - , last_name - , main_phone - , phones - |
limit | Int32 | Необязательный | Количество элементов выборки, возвращаемых при запросе |
offset | Int32 | Необязательный | Смещение от начала выборки |
Модель сортировки выходных параметров
Название | Тип данных | Обязательность | Описание |
---|---|---|---|
column | Enum | Необязательный | Значение для сортировки: <Id | 1 > - ID кассы пользователя, <OperatingCashId | 2 > - ID кассы, <UserFullName | 3 > - ФИО пользователя, <UserMainPhone | 4 > - Телефон пользователя |
direction | Enum | Необязательный | Порядок сортировки: <ASC | 1 > - по возростанию, <DESC | 2 > - по убыванию |
Пример запроса
{
"ids": [
1
],
"user_id": 1,
"operating_cash_id": 1,
"price_type_ids": [
1
],
"stock_ids": [
1
],
"isVirtual": true,
"sort_orders": [
{
"column": "Id",
"direction": "ASC"
}
],
"search": "example",
"limit":1,
"offset":1
}
Выходные параметры
Название | Тип данных | Описание |
---|---|---|
result | Array of UserOperatingCash | Массив касс пользователей |
next_offset | Int32 | Смещение для следующей выборки данных |
total | Int32 | Количество элементов выборки |
Пример ответа
{
"ok": true,
"result": [
{
"id": 24,
"user_id": 26,
"user": {
"id": 1,
"full_name": "John Fitzgerald Kennedy",
"main_phone": "998123456789",
"user_group": {
"id": 1,
"parent_id": 1,
"name": "Administrators",
"child_count": 1,
"last_update": 1529755889
},
"enable_hints": true,
"system": true,
"seller_barcode": "1010000001000000",
"last_update": 1532276019,
"first_name": "John",
"last_name": "Kennedy",
"middle_name": "Fitzgerald",
"sex": "Male",
"date_of_birth": "1993-12-21",
"address": "456 Elm Street, Suite 3, Los Angeles, CA 90001, USA",
"phones": "998123456789",
"email": "example@example.com",
"description": "example",
"login": "Admin",
"can_authorize": true,
"active": true,
"language_code": "RUS"
},
"operating_cash": {
"id": 13,
"stock": {
"id": 4,
"name": "valera torg",
"firm": {
"id": 4,
"group": {
"id": 1,
"parent_id": 0,
"name": "Firm 2",
"child_count": 0,
"last_update": 1595177446
},
"deleted_mark": false,
"last_update": 1579847129,
"name": "valera trade",
"fullname": null,
"boss_name": null,
"address": null,
"phones": null,
"description": null,
"inn": null,
"bank_name": null,
"mfo": null,
"rs": null,
"oked": null,
"vat_index": null
},
"deleted_mark": false,
"last_update": 1579847152
},
"key": null,
"price_type": {
"id": 1,
"name": "Розничная",
"round_to": 1.00,
"markup": 0.00,
"max_discount": 70.00,
"last_update": 1603455616
},
"description": "Abd",
"virtual": true,
"auto_close": true,
"max_cheque_quantity_in_session": 50,
"last_update": 1599800786,
"UserAccept": null
}
}
],
"next_offset": 0,
"total": 2
}