{ "openapi": "3.1.0", "info": { "title": "Смарт Каса API v1.0.18", "version": "1.0.18", "description": "## Media Types\n\n```\nContent-Type: application/json\n```\n\n## Відповіді від серверу\n\nВикористовуються загальноприйняті [HTTP-коди відповідей](https://github.com/for-GET/know-your-http-well/blob/master/status-codes.md).\n\n## Підпис запитів\n\nКожен запит повинен супроводжуватись наявністю заголовку: ```X-API-KEY```. \\\nДля запитів які потребують авторизації користувача повинен бути наявним додатково заголовок: ```Authorization```.", "contact": { "name": "SmartKasa Support", "url": "https://smartkasa.ua" }, "license": { "name": "Proprietary", "url": "https://www.smartkasa.ua/wp-content/uploads/2025/03/ukrtrimeks-api-integracziya.pdf" } }, "servers": [ { "url": "https://core.smartkasa.ua", "description": "SmartKasa Production API Server" } ], "tags": [ { "name": "Авторизація", "description": "Авторизація користувача на порталі, отримання сесійних ключів" }, { "name": "Термінали", "description": "Операції з ресурсами групи \"Термінали\"" }, { "name": "Торгові точки", "description": "Операції з ресурсами групи \"Торгові точки\"" }, { "name": "Працівники", "description": "Операції з ресурсами групи \"Працівники\"" }, { "name": "Одиниці виміру", "description": "Операції з ресурсами групи \"Одиниці виміру\"" }, { "name": "Каталоги", "description": "Операції з ресурсами групи \"Каталоги\"" }, { "name": "Товари", "description": "Операції з ресурсами групи \"Товари\"" }, { "name": "Облік товарів", "description": "Операції з ресурсами групи \"Облік товарів\"" }, { "name": "Товарні підгрупи", "description": "Операції з ресурсами групи \"Товарні підгрупи\"" }, { "name": "Імпорт", "description": "Операції з ресурсами групи \"Імпорт\"" }, { "name": "Зміни", "description": "Операції з ресурсами групи \"Зміни\"" }, { "name": "POS", "description": "Операції з ресурсами групи \"POS\"" }, { "name": "Звітність", "description": "Операції з ресурсами групи \"Звітність\"" } ], "paths": { "/api/v1/auth/sessions": { "summary": "Вхід", "description": "Процедура встановлення належності користувачеві інформації в системі по номеру телефона та паролю", "post": { "summary": "Запити аутентифікації", "tags": [ "Авторизація" ], "operationId": "post_api_v1_auth_sessions", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": null, "access": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTY0MTc0OTcsInVzZXJfdHlwZV9pZCI6MSwib3duZXJfaWQiOjEwMzc1Nywicm9sZV9pZCI6bnVsbCwic2Vzc2lvbl90b2tlbiI6ImYxY2JmNWE1LTJkNDUtNGRjNi1hZDJhLTk0ZmUyZTZjM2ZkZSIsInVzZXJfaWQiOjEwMzc1NywidWlkIjoiZDU2OTM4YmMtMjU4Mi00YTJiLWFmZDgtMDk1ZmYyMjdmYjhkIiwiZXhwIjoxNjE2NTAwMjk3fQ.Y87pAVTWIGE7EWMdSgOSt4LSHaV4Ry_YQDfeL7RkKos", "access_expires_at": "2021-03-23T13:51:37.000+02:00", "csrf": "aPhV1ZNQyuoTStIlnw7PlSGU8jRMzhsu3voUrIxYmnJqZmzDGzYizlHIjGqGBbrTVfxJOQU98g+EAkcv9wRsJg==", "refresh": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTY0MTc0OTcsInNlc3Npb25fdG9rZW4iOiJmMWNiZjVhNS0yZDQ1LTRkYzYtYWQyYS05NGZlMmU2YzNmZGUiLCJ1c2VyX2lkIjoxMDM3NTcsInVpZCI6Ijc5NWY0YWYzLWQ4MjUtNDUwYi1iZmJhLTVkZjFkZWRkNDg1MyIsImV4cCI6MTYxOTA0MzY0M30.oWTtZguR4e1LkAhWen8W8iKPWiit5xHW3cyu98EXtqg", "refresh_expires_at": "2021-04-22T01:20:43.000+03:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "base": [ { "error": "phone_number_or_password_invalid" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "phone_number": { "type": "string", "description": "Номер телефону" }, "password": { "type": "string", "description": "Пароль" } }, "required": [ "phone_number", "password" ], "additionalProperties": true }, "example": { "password": "123456789", "phone_number": "380960000006" } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/api/v1/auth/refresh": { "summary": "Поновлення токену авторизації для сесії", "post": { "summary": "Запити поновлення токену", "tags": [ "Авторизація" ], "operationId": "post_api_v1_auth_refresh", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": null, "access": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzY5ODI3NjMsInVzZXJfdHlwZV9pZCI6MCwib3duZXJfaWQiOjk1LCJyb2xlX2lkIjpudWxsLCJzZXNzaW9uX3Rva2VuIjoiZjViNmJjODUtODI1My00MTdmLWJiMmMtMzMyYTZhOGU1NGE5IiwidXNlcl9pZCI6OTUsInVpZCI6ImRiYzhmYWMwLTBjMjctNDgwOS1hZGUxLTA2OGM0NTZmM2ZhNiIsImV4cCI6MTY3OTYwODkwOX0.HOjLHycrS62i7UqMPcXB4EMI2qpOdqINLHkbj92wXSo", "access_expires_at": "2023-03-23T22:01:49.000+00:00", "csrf": "xMt3hxr41k+snNPbQnKYF1FwAYA+PmRn7OrJh/tRVypD3mFX9/F/FtzIER55VXAwWpwHI6dxcpt083v0rKqYAw==", "refresh": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzY5ODI3NjMsInNlc3Npb25fdG9rZW4iOiJmNWI2YmM4NS04MjUzLTQxN2YtYmIyYy0zMzJhNmE4ZTU0YTkiLCJ1c2VyX2lkIjo5NSwidWlkIjoiNDgwNTk1ZTItZmI3Yi00OGJmLWI0ZjUtZmViMThmOWZiODdkIiwiZXhwIjoxNjc5NjA4OTA5fQ.Kj7rUy9nFrljQjDJVifPSQnNZienDaSTV-CGj1QsPSg", "refresh_expires_at": "2023-03-23T22:01:49.000+00:00" }, "meta": {} } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object" }, "example": { "message": "Unauthorized" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/auth/sessions/logout": { "summary": "Вихід з системи", "delete": { "summary": "Закриття поточної сесії", "tags": [ "Авторизація" ], "operationId": "delete_api_v1_auth_sessions_logout", "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "49cb6c02-9951-4c6b-9e55-e2d2b615f5bb" }, "meta": {} } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object" }, "example": { "message": "Unauthorized" } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/terminals": { "summary": "Список терміналів", "get": { "summary": "Отримання списку терміналів", "tags": [ "Термінали" ], "operationId": "get_api_v1_pos_terminals", "parameters": [ { "name": "id", "in": "query", "required": false, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } }, { "name": "name", "in": "query", "required": false, "description": "Назва терміналу", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } }, { "name": "page", "in": "query", "required": false, "description": "Сторінка", "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "required": false, "description": "Кількіть записів на сторінку", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 20007, "activated_at": null, "core_terminal_id": 1, "created_at": "2021-03-22T13:52:06.216+02:00", "name": "Test terminal", "picture": { "id": "cd8479459fe1e42d67d4be153101cbdc", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/cd8479459fe1e42d67d4be153101cbdc" }, "properties": null, "serial_number": "108210974046530", "shop_id": 37958, "state": 1, "updated_at": "2021-03-22T13:52:06.216+02:00" } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 1, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/terminals/{id}": { "summary": "Операції з терміналом", "get": { "summary": "Отримання інформації про термінал", "tags": [ "Термінали" ], "operationId": "get_api_v1_pos_terminals_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } }, { "name": "name", "in": "query", "required": false, "description": "Назва терміналу", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 20011, "activated_at": null, "core_terminal_id": 1, "created_at": "2021-03-22T13:52:06.603+02:00", "name": "Test terminal", "picture": { "id": "3e276fb6692553a0ac665c9a48745dee", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/3e276fb6692553a0ac665c9a48745dee" }, "properties": null, "serial_number": "981340041313795", "shop_id": 37963, "state": 1, "updated_at": "2021-03-22T13:52:06.603+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "put": { "summary": "Оновлення даних терміналу", "tags": [ "Термінали" ], "operationId": "put_api_v1_pos_terminals_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 20012, "activated_at": null, "core_terminal_id": 1, "created_at": "2021-03-22T13:52:06.675+02:00", "name": "Suscipit quis et odit.", "picture": { "id": "5889920bac63c1660e25da2592a61889", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/5889920bac63c1660e25da2592a61889" }, "properties": null, "serial_number": "863684811804753", "shop_id": 37964, "state": 1, "updated_at": "2021-03-22T13:52:06.675+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": "[Pos::TerminalForm.new] \"wrong\" (String) has invalid type for :shop_id violates constraints (invalid value for Integer(): \"wrong\" failed)" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Назва терміналу" }, "shop_id": { "type": "integer", "description": "Ідентифікатор торгової точки" } }, "additionalProperties": true }, "example": { "id": 20012, "name": "Suscipit quis et odit.", "shop_id": 37964 } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення терміналу", "tags": [ "Термінали" ], "operationId": "delete_api_v1_pos_terminals_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 20016, "activated_at": null, "core_terminal_id": 1, "created_at": "2021-03-22T13:52:06.921+02:00", "name": "Test terminal", "properties": null, "serial_number": "497787772057768", "shop_id": 1, "state": 1, "updated_at": "2021-03-22T13:52:06.921+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "id": [ { "error": "invalid" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Назва терміналу" }, "shop_id": { "type": "string", "description": "Ідентифікатор торгової точки" } }, "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/rsn/shops": { "summary": "Список торгових точок", "get": { "summary": "Отримання списку торгових точок", "tags": [ "Торгові точки" ], "operationId": "get_api_v1_rsn_shops", "parameters": [ { "name": "title", "in": "query", "required": false, "description": "Назва торгової точки", "schema": { "type": "string" } }, { "name": "phone_number", "in": "query", "required": false, "description": "Номер телефону", "schema": { "type": "string" } }, { "name": "email", "in": "query", "required": false, "description": "Email", "schema": { "type": "string" } }, { "name": "address", "in": "query", "required": false, "description": "Об'єкт адреси", "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "description": "Статус", "schema": { "type": "string" } }, { "name": "website_url", "in": "query", "required": false, "description": "Посилання на сайт", "schema": { "type": "string" } }, { "name": "business_category_id", "in": "query", "required": false, "description": "Сфера діяльності", "schema": { "type": "string" } }, { "name": "picture", "in": "query", "required": false, "description": "Зображення", "schema": { "type": "string" } }, { "name": "fiscal_numbers", "in": "query", "required": false, "description": "Список номерів пРРО", "schema": { "type": "string" } }, { "name": "fiscalization_enabled", "in": "query", "required": false, "description": "Ознака фіскалізації", "schema": { "type": "string" } }, { "name": "is_vat_taxation", "in": "query", "required": false, "description": "Ознака платника ПДВ", "schema": { "type": "string" } }, { "name": "is_excise_taxation", "in": "query", "required": false, "description": "Ознака додаткових зборів", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 37969, "address": { "id": 38197, "address_type_id": 0, "city_name": "Київ", "content": "пров. Вічева, 17", "created_at": "2021-03-22T13:52:08.214+02:00", "updated_at": "2021-03-22T13:52:08.214+02:00", "zip_code": "08800" }, "business_category_id": 1, "created_at": "2021-03-22T13:52:08.206+02:00", "email": "britt@macgyver.name", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 1, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:52:08.206+02:00", "website_url": "https://www.example.com" } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 1, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення нової торгової точки", "tags": [ "Торгові точки" ], "operationId": "post_api_v1_rsn_shops", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 37968, "address": { "id": 38196, "address_type_id": 0, "city_name": "Київ", "content": "вулиця Молодіжна, 195", "created_at": "2021-03-22T13:52:08.158+02:00", "updated_at": "2021-03-22T13:52:08.158+02:00", "zip_code": "08800" }, "business_category_id": 1, "created_at": "2021-03-22T13:52:08.148+02:00", "email": "rolandekling@lockman.biz", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 1, "phone_number": "380971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:52:08.148+02:00", "website_url": "https://www.example.com" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "title": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" }, "email": { "type": "string" }, "phone_number": { "type": "string" }, "state": { "type": "integer" }, "website_url": { "type": "string" }, "business_category_id": { "type": "integer" }, "fiscal_numbers": { "type": "array", "items": { "type": "object" } }, "fiscalization_enabled": { "type": "boolean" }, "is_vat_taxation": { "type": "boolean" }, "is_excise_taxation": { "type": "boolean" }, "address": { "type": "object" } }, "additionalProperties": true }, "example": { "title": "Test shop", "email": "rolandekling@lockman.biz", "phone_number": "0971234567", "state": 0, "website_url": "https://www.example.com", "business_category_id": 1, "fiscal_numbers": [], "fiscalization_enabled": false, "is_vat_taxation": true, "is_excise_taxation": false, "address": { "zip_code": "08800", "city_name": "Київ", "content": "вулиця Молодіжна, 195" } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/rsn/shops/{id}": { "summary": "Операції з торговою точкою", "get": { "summary": "Інформація про торгову точку", "tags": [ "Торгові точки" ], "operationId": "get_api_v1_rsn_shops_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } }, { "name": "title", "in": "query", "required": false, "description": "Назва торгової точки", "schema": { "type": "string" } }, { "name": "phone_number", "in": "query", "required": false, "description": "Номер телефону", "schema": { "type": "string" } }, { "name": "email", "in": "query", "required": false, "description": "Email", "schema": { "type": "string" } }, { "name": "address", "in": "query", "required": false, "description": "Об'єкт адреси", "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "description": "Статус", "schema": { "type": "string" } }, { "name": "website_url", "in": "query", "required": false, "description": "Посилання на сайт", "schema": { "type": "string" } }, { "name": "business_category_id", "in": "query", "required": false, "description": "Сфера діяльності", "schema": { "type": "string" } }, { "name": "picture", "in": "query", "required": false, "description": "Зображення", "schema": { "type": "string" } }, { "name": "fiscal_numbers", "in": "query", "required": false, "description": "Список номерів пРРО", "schema": { "type": "string" } }, { "name": "fiscalization_enabled", "in": "query", "required": false, "description": "Ознака фіскалізації", "schema": { "type": "string" } }, { "name": "is_vat_taxation", "in": "query", "required": false, "description": "Ознака платника ПДВ", "schema": { "type": "string" } }, { "name": "is_excise_taxation", "in": "query", "required": false, "description": "Ознака додаткових зборів", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 37971, "address": { "id": 38199, "address_type_id": 0, "city_name": "Київ", "content": "пл. Молодіжна, 151", "created_at": "2021-03-22T13:52:08.350+02:00", "updated_at": "2021-03-22T13:52:08.350+02:00", "zip_code": "08800" }, "business_category_id": 1, "created_at": "2021-03-22T13:52:08.347+02:00", "email": "theresa@runolfon.com", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 1, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:52:08.347+02:00", "website_url": "https://www.example.com" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "put": { "summary": "Оновлення даних торгової точки", "tags": [ "Торгові точки" ], "operationId": "put_api_v1_rsn_shops_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 37972, "address": { "id": 38200, "address_type_id": 0, "city_name": "Київ", "content": "вулиця Молодіжна, 195", "created_at": "2021-03-22T13:52:08.416+02:00", "updated_at": "2021-03-22T13:52:08.416+02:00", "zip_code": "08800" }, "business_category_id": 1, "created_at": "2021-03-22T13:52:08.413+02:00", "email": "rolandekling@lockman.biz", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 1, "phone_number": "380971234567", "state": 0, "terminals_count": 0, "title": "New title", "updated_at": "2021-03-22T13:52:08.413+02:00", "website_url": "https://www.example.com" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "title": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "Назва торгової точки" }, "phone_number": { "type": "string", "description": "Номер телефону" }, "email": { "type": "string", "description": "Email" }, "address": { "type": "object", "description": "Об'єкт адреси" }, "state": { "type": "integer", "description": "Статус" }, "website_url": { "type": "string", "description": "Посилання на сайт" }, "business_category_id": { "type": "integer", "description": "Сфера діяльності" }, "picture": { "type": "string", "description": "Зображення" }, "fiscal_numbers": { "type": "array", "items": { "type": "object" }, "description": "Список номерів пРРО" }, "fiscalization_enabled": { "type": "boolean", "description": "Ознака фіскалізації" }, "is_vat_taxation": { "type": "boolean", "description": "Ознака платника ПДВ" }, "is_excise_taxation": { "type": "boolean", "description": "Ознака додаткових зборів" } }, "additionalProperties": true }, "example": { "title": "New title", "email": "rolandekling@lockman.biz", "phone_number": "0971234567", "state": 0, "website_url": "https://www.example.com", "business_category_id": 1, "fiscal_numbers": [], "fiscalization_enabled": false, "is_vat_taxation": true, "is_excise_taxation": false, "address": { "zip_code": "08800", "city_name": "Київ", "content": "вулиця Молодіжна, 195" } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення торгової точки", "tags": [ "Торгові точки" ], "operationId": "delete_api_v1_rsn_shops_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 37974 }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "Назва торгової точки" }, "phone_number": { "type": "string", "description": "Номер телефону" }, "email": { "type": "string", "description": "Email" }, "address": { "type": "string", "description": "Об'єкт адреси" }, "state": { "type": "string", "description": "Статус" }, "website_url": { "type": "string", "description": "Посилання на сайт" }, "business_category_id": { "type": "string", "description": "Сфера діяльності" }, "picture": { "type": "string", "description": "Зображення" }, "fiscal_numbers": { "type": "string", "description": "Список номерів пРРО" }, "fiscalization_enabled": { "type": "string", "description": "Ознака фіскалізації" }, "is_vat_taxation": { "type": "string", "description": "Ознака платника ПДВ" }, "is_excise_taxation": { "type": "string", "description": "Ознака додаткових зборів" } }, "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/rsn/shops/employees": { "summary": "Перелік працівників на торговій точці", "get": { "summary": "Отримання списку працівник на торговій точці", "tags": [ "Торгові точки" ], "operationId": "get_api_v1_rsn_shops_employees", "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 37970, "employees": [ { "id": 1306, "first_name": "Потап", "last_name": "Майстренко", "role_id": 1, "state": 0, "updated_at": "2021-03-22T13:52:08.280+02:00" } ], "employees_count": 0, "state": 0, "title": "Test shop" } ], "meta": { "total_count": 1 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/rsn/employees": { "summary": "Список працівників", "get": { "summary": "Отримання списку працівників", "tags": [ "Працівники" ], "operationId": "get_api_v1_rsn_employees", "parameters": [ { "name": "phone_number", "in": "query", "required": false, "description": "Номер телефону", "schema": { "type": "string" } }, { "name": "email", "in": "query", "required": false, "description": "Email", "schema": { "type": "string" } }, { "name": "first_name", "in": "query", "required": false, "description": "Ім’я", "schema": { "type": "string" } }, { "name": "last_name", "in": "query", "required": false, "description": "Прізвище", "schema": { "type": "string" } }, { "name": "middle_name", "in": "query", "required": false, "description": "По-Батькові", "schema": { "type": "string" } }, { "name": "inn", "in": "query", "required": false, "description": "ІПН", "schema": { "type": "string" } }, { "name": "passport_serial", "in": "query", "required": false, "description": "Паспорт - серія", "schema": { "type": "string" } }, { "name": "passport_number", "in": "query", "required": false, "description": "Паспорт - номер", "schema": { "type": "string" } }, { "name": "role_id", "in": "query", "required": false, "description": "Ідентифікатор посади", "schema": { "type": "string" } }, { "name": "address_actual", "in": "query", "required": false, "description": "Адреса проживання", "schema": { "type": "string" } }, { "name": "address_legal", "in": "query", "required": false, "description": "Адреса прописки", "schema": { "type": "string" } }, { "name": "joined_at", "in": "query", "required": false, "description": "День початку роботи у компанії", "schema": { "type": "string" } }, { "name": "birthday", "in": "query", "required": false, "description": "День народження", "schema": { "type": "string" } }, { "name": "gender_type_id", "in": "query", "required": false, "description": "Стать", "schema": { "type": "string" } }, { "name": "notes", "in": "query", "required": false, "description": "Помітки", "schema": { "type": "string" } }, { "name": "additional_phone_number", "in": "query", "required": false, "description": "Додатковий телефон", "schema": { "type": "string" } }, { "name": "pin_code", "in": "query", "required": false, "description": "Код доступу до каси", "schema": { "type": "string" } }, { "name": "avatar", "in": "query", "required": false, "description": "Фото", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 1300, "additional_phone_number": null, "birthday": "1980-01-01T00:00:00.000+00:00", "created_at": "2021-03-22T13:52:07.666+02:00", "email": "chrisspencer@kuphalkunze.biz", "first_name": "Богдан", "gender_type_id": 1, "inn": "1234567891", "joined_at": null, "last_name": "Палій", "middle_name": null, "notes": "Quos ut porro et.", "passport_number": "123456", "passport_serial": "SN", "phone_number": "380970000016", "role": { "id": 856, "created_at": "2021-03-22T13:52:07.645+02:00", "name": "Test", "state": 0, "updated_at": "2021-03-22T13:52:07.645+02:00" }, "role_id": 856, "state": 0, "updated_at": "2021-03-22T13:52:07.666+02:00" } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 1, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення нового працівника", "tags": [ "Працівники" ], "operationId": "post_api_v1_rsn_employees", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 1299, "additional_phone_number": "380971234568", "address_legal": { "id": 38195, "address_type_id": 1, "city_id": null, "city_name": null, "content": "пр. Нижанківського, 196", "created_at": "2021-03-22T13:52:07.548+02:00", "region_id": null, "updated_at": "2021-03-22T13:52:07.548+02:00", "zip_code": "08132" }, "avatar": { "id": "70f44ebb9cf6a79efb0c2e1b9c2b1414.png", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/70f44ebb9cf6a79efb0c2e1b9c2b1414.png" }, "birthday": "1980-01-01T00:00:00.000+00:00", "created_at": "2021-03-22T13:52:07.546+02:00", "email": "bo@schmidt.net", "first_name": "Віктор", "gender_type_id": 1, "inn": "1234567891", "joined_at": "2012-01-01T00:00:00.000+00:00", "last_name": "Лагойда", "middle_name": "Гордійчук", "notes": "Voluptatem quod laborum porro.", "passport_number": "123456", "passport_serial": "SN", "phone_number": "380971234567", "pin_code": "1123", "role": { "id": 854, "created_at": "2021-03-22T13:52:07.473+02:00", "name": "Test", "state": 0, "updated_at": "2021-03-22T13:52:07.473+02:00" }, "role_id": 854, "state": 0, "updated_at": "2021-03-22T13:52:07.546+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "first_name": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "phone_number": { "type": "string", "description": "Номер телефону" }, "email": { "type": "string", "description": "Email" }, "first_name": { "type": "string", "description": "Ім’я" }, "last_name": { "type": "string", "description": "Прізвище" }, "middle_name": { "type": "string", "description": "По-Батькові" }, "inn": { "type": "string", "description": "ІПН" }, "passport_serial": { "type": "string", "description": "Паспорт - серія" }, "passport_number": { "type": "string", "description": "Паспорт - номер" }, "role_id": { "type": "integer", "description": "Ідентифікатор посади" }, "address_actual": { "type": "object", "description": "Адреса проживання" }, "address_legal": { "type": "object", "description": "Адреса прописки" }, "joined_at": { "type": "string", "description": "День початку роботи у компанії" }, "birthday": { "type": "string", "description": "День народження" }, "gender_type_id": { "type": "integer", "description": "Стать" }, "notes": { "type": "string", "description": "Помітки" }, "additional_phone_number": { "type": "string", "description": "Додатковий телефон" }, "pin_code": { "type": "string", "description": "Код доступу до каси" }, "avatar": { "type": "object", "description": "Фото" } }, "additionalProperties": true }, "example": { "avatar": { "id": "uploads/cache/ed9cceadff03afb63bebb732e56e804e", "filename": "test.png", "mime_type": "image/png", "size": 8132 }, "email": "bo@schmidt.net", "first_name": "Віктор", "middle_name": "Гордійчук", "last_name": "Лагойда", "phone_number": "0971234567", "inn": "1234567891", "pin_code": "1123", "passport_serial": "SN", "passport_number": "123456", "role_id": 854, "address_actual": { "zip_code": "08800", "content": "пров. Вічева, 5" }, "address_legal": { "zip_code": "08132", "content": "пр. Нижанківського, 196" }, "birthday": "1980-01-01", "joined_at": "2012-01-01", "gender_type_id": 1, "notes": "Voluptatem quod laborum porro.", "additional_phone_number": "0971234568" } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/rsn/employees/{id}": { "summary": "Операції з працівником", "delete": { "summary": "Видалення працівника", "tags": [ "Працівники" ], "operationId": "delete_api_v1_rsn_employees_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 1304 }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "phone_number": { "type": "string", "description": "Номер телефону" }, "email": { "type": "string", "description": "Email" }, "first_name": { "type": "string", "description": "Ім’я" }, "last_name": { "type": "string", "description": "Прізвище" }, "middle_name": { "type": "string", "description": "По-Батькові" }, "inn": { "type": "string", "description": "ІПН" }, "passport_serial": { "type": "string", "description": "Паспорт - серія" }, "passport_number": { "type": "string", "description": "Паспорт - номер" }, "role_id": { "type": "string", "description": "Ідентифікатор посади" }, "address_actual": { "type": "string", "description": "Адреса проживання" }, "address_legal": { "type": "string", "description": "Адреса прописки" }, "joined_at": { "type": "string", "description": "День початку роботи у компанії" }, "birthday": { "type": "string", "description": "День народження" }, "gender_type_id": { "type": "string", "description": "Стать" }, "notes": { "type": "string", "description": "Помітки" }, "additional_phone_number": { "type": "string", "description": "Додатковий телефон" }, "pin_code": { "type": "string", "description": "Код доступу до каси" }, "avatar": { "type": "string", "description": "Фото" } }, "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "put": { "summary": "Оновлення профілю працівника", "tags": [ "Працівники" ], "operationId": "put_api_v1_rsn_employees_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 1302, "additional_phone_number": "380971234568", "avatar": { "id": "2c10d4c8bb4f5e07f7c9f54dd9bff2af.png", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/2c10d4c8bb4f5e07f7c9f54dd9bff2af.png" }, "birthday": "1980-01-01T00:00:00.000+00:00", "created_at": "2021-03-22T13:52:07.820+02:00", "email": "bo@schmidt.net", "first_name": "New name", "gender_type_id": 1, "inn": "1234567891", "joined_at": "2012-01-01T00:00:00.000+00:00", "last_name": "Лагойда", "middle_name": "Гордійчук", "notes": "Voluptatem quod laborum porro.", "passport_number": "123456", "passport_serial": "SN", "phone_number": "380971234567", "pin_code": null, "role_id": 1, "state": 0, "updated_at": "2021-03-22T13:52:07.820+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "first_name": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "phone_number": { "type": "string", "description": "Номер телефону" }, "email": { "type": "string", "description": "Email" }, "first_name": { "type": "string", "description": "Ім’я" }, "last_name": { "type": "string", "description": "Прізвище" }, "middle_name": { "type": "string", "description": "По-Батькові" }, "inn": { "type": "string", "description": "ІПН" }, "passport_serial": { "type": "string", "description": "Паспорт - серія" }, "passport_number": { "type": "string", "description": "Паспорт - номер" }, "role_id": { "type": "integer", "description": "Ідентифікатор посади" }, "address_actual": { "type": "object", "description": "Адреса проживання" }, "address_legal": { "type": "object", "description": "Адреса прописки" }, "joined_at": { "type": "string", "description": "День початку роботи у компанії" }, "birthday": { "type": "string", "description": "День народження" }, "gender_type_id": { "type": "integer", "description": "Стать" }, "notes": { "type": "string", "description": "Помітки" }, "additional_phone_number": { "type": "string", "description": "Додатковий телефон" }, "pin_code": { "type": "string", "description": "Код доступу до каси" }, "avatar": { "type": "object", "description": "Фото" } }, "additionalProperties": true }, "example": { "avatar": { "id": "uploads/cache/a9104b9b143d42a5c49ac4c11876c193", "filename": "test.png", "mime_type": "image/png", "size": 8132 }, "email": "bo@schmidt.net", "first_name": "New name", "middle_name": "Гордійчук", "last_name": "Лагойда", "phone_number": "0971234567", "inn": "1234567891", "pin_code": "1123", "passport_serial": "SN", "passport_number": "123456", "role_id": 1, "address_actual": { "zip_code": "08800", "content": "пров. Вічева, 5" }, "address_legal": { "zip_code": "08132", "content": "пр. Нижанківського, 196" }, "birthday": "1980-01-01", "joined_at": "2012-01-01", "gender_type_id": 1, "notes": "Voluptatem quod laborum porro.", "additional_phone_number": "0971234568" } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "get": { "summary": "Інформація про працівника", "tags": [ "Працівники" ], "operationId": "get_api_v1_rsn_employees_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } }, { "name": "phone_number", "in": "query", "required": false, "description": "Номер телефону", "schema": { "type": "string" } }, { "name": "email", "in": "query", "required": false, "description": "Email", "schema": { "type": "string" } }, { "name": "first_name", "in": "query", "required": false, "description": "Ім’я", "schema": { "type": "string" } }, { "name": "last_name", "in": "query", "required": false, "description": "Прізвище", "schema": { "type": "string" } }, { "name": "middle_name", "in": "query", "required": false, "description": "По-Батькові", "schema": { "type": "string" } }, { "name": "inn", "in": "query", "required": false, "description": "ІПН", "schema": { "type": "string" } }, { "name": "passport_serial", "in": "query", "required": false, "description": "Паспорт - серія", "schema": { "type": "string" } }, { "name": "passport_number", "in": "query", "required": false, "description": "Паспорт - номер", "schema": { "type": "string" } }, { "name": "role_id", "in": "query", "required": false, "description": "Ідентифікатор посади", "schema": { "type": "string" } }, { "name": "address_actual", "in": "query", "required": false, "description": "Адреса проживання", "schema": { "type": "string" } }, { "name": "address_legal", "in": "query", "required": false, "description": "Адреса прописки", "schema": { "type": "string" } }, { "name": "joined_at", "in": "query", "required": false, "description": "День початку роботи у компанії", "schema": { "type": "string" } }, { "name": "birthday", "in": "query", "required": false, "description": "День народження", "schema": { "type": "string" } }, { "name": "gender_type_id", "in": "query", "required": false, "description": "Стать", "schema": { "type": "string" } }, { "name": "notes", "in": "query", "required": false, "description": "Помітки", "schema": { "type": "string" } }, { "name": "additional_phone_number", "in": "query", "required": false, "description": "Додатковий телефон", "schema": { "type": "string" } }, { "name": "pin_code", "in": "query", "required": false, "description": "Код доступу до каси", "schema": { "type": "string" } }, { "name": "avatar", "in": "query", "required": false, "description": "Фото", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 1301, "additional_phone_number": null, "birthday": "1980-01-01T00:00:00.000+00:00", "created_at": "2021-03-22T13:52:07.741+02:00", "email": "alphonsolubowitz@lakin.com", "first_name": "Зорян", "gender_type_id": 1, "inn": "1234567891", "joined_at": null, "last_name": "Павлишин", "middle_name": null, "notes": "Quos aspernatur quis et.", "passport_number": "123456", "passport_serial": "SN", "phone_number": "380970000017", "pin_code": "6122", "role": { "id": 857, "created_at": "2021-03-22T13:52:07.716+02:00", "name": "Test", "state": 0, "updated_at": "2021-03-22T13:52:07.716+02:00" }, "role_id": 857, "state": 0, "updated_at": "2021-03-22T13:52:07.741+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/unit_types": { "summary": "Список одиниць виміру", "get": { "summary": "Отримання списку одиниць виміру", "tags": [ "Одиниці виміру" ], "operationId": "get_api_v1_inventory_unit_types", "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 12, "code": 175, "is_visible": true, "is_weighted": false, "name": "Година", "short_name": "год" }, { "id": 9, "code": 303, "is_visible": true, "is_weighted": true, "name": "Грам", "short_name": "гр" }, { "id": 10, "code": 301, "is_visible": true, "is_weighted": true, "name": "Кілограм", "short_name": "кг" }, { "id": 7, "code": 102, "is_visible": true, "is_weighted": false, "name": "Кілометр", "short_name": "км" }, { "id": 8, "code": 101, "is_visible": true, "is_weighted": false, "name": "Метр", "short_name": "м" }, { "id": 13, "code": 144, "is_visible": true, "is_weighted": true, "name": "Міліметр", "short_name": "мм" }, { "id": 5, "code": 2061, "is_visible": true, "is_weighted": false, "name": "Пляшка", "short_name": "пляшка" }, { "id": 6, "code": 3011, "is_visible": true, "is_weighted": false, "name": "Порція", "short_name": "порція" }, { "id": 14, "code": 104, "is_visible": true, "is_weighted": true, "name": "Сантиметр", "short_name": "см" }, { "id": 11, "code": 178, "is_visible": true, "is_weighted": false, "name": "Хвилина", "short_name": "хв" }, { "id": 4, "code": 2009, "is_visible": true, "is_weighted": false, "name": "Штука", "short_name": "шт" } ], "meta": { "total_count": 11 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/categories": { "summary": "Список каталогів", "get": { "summary": "Отримання списку каталогів", "tags": [ "Каталоги" ], "operationId": "get_api_v1_inventory_categories", "parameters": [ { "name": "id", "in": "query", "required": false, "description": "Ідентифікатор каталогу", "schema": { "type": "string" } }, { "name": "title", "in": "query", "required": false, "description": "Назва каталогу", "schema": { "type": "string" } }, { "name": "parent_id", "in": "query", "required": false, "description": "Ідентифікатор батьківського каталогу", "schema": { "type": "string" } }, { "name": "color_id", "in": "query", "required": false, "description": "Ідентифікатор кольору (enum)", "schema": { "type": "string" } }, { "name": "shop_ids", "in": "query", "required": false, "description": "Масив ідентифікаторів торгових точок", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "870798b3-224f-4e1d-bff9-8499027f1c9a", "color_id": 0, "created_at": "2021-03-22T13:51:47.935+02:00", "parent_id": null, "partner": { "id": 7697, "code": "744328675", "created_at": "2021-03-22T13:51:47.933+02:00", "name": "ДП Львівтрейд", "partner_type_id": 0, "state": 0, "title": "Just for test", "updated_at": "2021-03-22T13:51:47.933+02:00" }, "partner_id": 7697, "products_count": 0, "shop_ids": [], "title": "Recusandae eos eum ea.", "updated_at": "2021-03-22T13:51:47.935+02:00" } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 1, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення нового каталогу", "tags": [ "Каталоги" ], "operationId": "post_api_v1_inventory_categories", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "06aa5d56-4922-44e1-91d5-01feb0431a31", "color_id": null, "created_at": "2021-03-22T11:51:48.296+02:00", "parent_id": "f3ad326f-cf21-454d-9d4c-aab98213c7d2", "partner_id": 7699, "products_count": 0, "shop_ids": [], "title": "Natus et quod voluptas.", "updated_at": "2021-03-22T11:51:48.296+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "title": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор каталогу" }, "title": { "type": "string", "description": "Назва каталогу" }, "parent_id": { "type": "string", "description": "Ідентифікатор батьківського каталогу" }, "color_id": { "type": "string", "description": "Ідентифікатор кольору (enum)" }, "shop_ids": { "type": "string", "description": "Масив ідентифікаторів торгових точок" } }, "additionalProperties": true }, "example": { "title": "Natus et quod voluptas.", "color": 2, "partner_id": 7699, "parent_id": "f3ad326f-cf21-454d-9d4c-aab98213c7d2" } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/categories/{id}": { "summary": "Операції з каталогом", "put": { "summary": "Оновлення інформації про каталог", "tags": [ "Каталоги" ], "operationId": "put_api_v1_inventory_categories_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор каталогу", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "6a578a21-ff67-4970-ad46-a6497a8504b5", "color_id": 0, "created_at": "2021-03-22T13:51:48.382+02:00", "parent_id": null, "partner_id": 7701, "products_count": 0, "shop_ids": [], "title": "Natus et quod voluptas.", "updated_at": "2021-03-22T11:51:48.428+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "Назва каталогу" }, "parent_id": { "type": "string", "description": "Ідентифікатор батьківського каталогу" }, "color_id": { "type": "string", "description": "Ідентифікатор кольору (enum)" }, "shop_ids": { "type": "string", "description": "Масив ідентифікаторів торгових точок" } }, "additionalProperties": true }, "example": { "id": "6a578a21-ff67-4970-ad46-a6497a8504b5", "title": "Natus et quod voluptas.", "color": 2 } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення каталогу", "tags": [ "Каталоги" ], "operationId": "delete_api_v1_inventory_categories_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "e5d2034b-f758-4c0c-9286-97d0816ec4d3", "color_id": 0, "created_at": "2021-03-22T13:51:48.445+02:00", "parent_id": null, "partner_id": 7702, "products_count": 0, "shop_ids": [], "title": "Architecto consequuntur a porro.", "updated_at": "2021-03-22T13:51:48.445+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/products": { "summary": "Список товарів", "get": { "summary": "Отримання списку товарів", "tags": [ "Товари" ], "operationId": "get_api_v1_inventory_products", "parameters": [ { "name": "q", "in": "query", "required": false, "description": "Пошуковий запит (повнотекстовий пошук)", "schema": { "type": "string" } }, { "name": "number", "in": "query", "required": false, "description": "Штрих-код", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } }, { "name": "subgroup_id", "in": "query", "required": false, "description": "Ідентифікатор товарної підгрупи", "schema": { "type": "string" } }, { "name": "category_id", "in": "query", "required": false, "description": "Ідентифікатор каталогу", "schema": { "type": "string" } }, { "name": "page", "in": "query", "required": false, "description": "Номер сторінки (пагінація)", "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "required": false, "description": "Кількість записів на сторінку (пагінація)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "6ba87885-a4af-47ac-a31a-50de0d6b93ce", "alter_number": "9909720899", "alter_title": "Exercitationem aut atque fugiat.", "bookmark_ids": [], "category_id": "6718d176-b9d2-42d2-a22d-afb7728f0303", "category_type_id": 7537043, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:49.603+02:00", "is_free_price": false, "is_without_number": false, "number": "1944840247", "owner_id": 103927, "partner": { "id": 7706, "code": null, "created_at": null, "name": null, "partner_type_id": null, "state": null, "title": "Just for test", "updated_at": null }, "partner_id": 7706, "partner_title": "Just for test", "picture": { "id": "fdd86b0b8767eb6397988ce910253990", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/fdd86b0b8767eb6397988ce910253990" }, "portion_amount": 800, "portion_type_id": 0, "price": "3064.0", "procurement_price": "100.0", "sold_by_weight": false, "stock": {}, "subgroup_id": null, "subgroup_title": null, "tax_amount": { "А": 1520 }, "tax_group_id": 1, "title": "Est dolore quidem qui.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:49.603+02:00", "user_id": 103928 }, { "id": "0d3082ad-f4e0-4734-9716-dc6b4ffd49bb", "alter_number": null, "alter_title": null, "bookmark_ids": [], "category_id": "6718d176-b9d2-42d2-a22d-afb7728f0303", "category_type_id": 5704445, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:49.581+02:00", "is_free_price": false, "is_without_number": false, "number": "3933933345", "owner_id": 103927, "partner": { "id": 7706, "code": null, "created_at": null, "name": null, "partner_type_id": null, "state": null, "title": "Just for test", "updated_at": null }, "partner_id": 7706, "partner_title": "Just for test", "portion_amount": 800, "portion_type_id": 0, "price": "7549.0", "procurement_price": "100.0", "sold_by_weight": false, "stock": {}, "subgroup_id": null, "subgroup_title": null, "tax_amount": { "А": 360 }, "tax_group_id": 1, "title": "Eum alias doloremque facere.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:49.581+02:00", "user_id": 103928 } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 2, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення тового товару", "tags": [ "Товари" ], "operationId": "post_api_v1_inventory_products", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "7f527f59-bcdb-4bbd-a187-00b6ee7b68f5" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "title": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string" }, "title": { "type": "string" }, "unit_type_id": { "type": "integer" }, "portion_amount": { "type": "integer" }, "portion_type_id": { "type": "integer" }, "price": { "type": "number" }, "procurement_price": { "type": "integer" }, "classifier_type_id": { "type": "integer" }, "classifier_code": { "type": "string" }, "tax_group_id": { "type": "integer" }, "category_id": { "type": "string" }, "category_type_id": { "type": "integer" }, "sold_by_weight": { "type": "boolean" }, "bookmark_ids": { "type": "array", "items": { "type": "object" } }, "user_id": { "type": "integer" }, "owner_id": { "type": "integer" } }, "additionalProperties": true }, "example": { "number": "6930426566", "title": "Optio numquam molestiae amet.", "unit_type_id": 0, "portion_amount": 800, "portion_type_id": 0, "price": 71.89, "procurement_price": 50, "classifier_type_id": 2, "classifier_code": "543210123456789", "tax_group_id": 1, "category_id": "992670be-c998-4169-a62c-63bfe2a4e1a0", "category_type_id": 2201372, "sold_by_weight": false, "bookmark_ids": [], "user_id": 103930, "owner_id": 103929 } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/products/{id}": { "summary": "Операції з товаром", "get": { "summary": "Отримання інформації по товару", "tags": [ "Товари" ], "operationId": "get_api_v1_inventory_products_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор товару", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "f747fbc5-4782-4489-92b4-51691dea1f63", "alter_number": null, "alter_title": null, "bookmark_ids": [], "cards": [ { "id": 10789, "count": "100.0", "counting_enabled": true, "created_at": "2021-03-22T13:51:50.148+02:00", "owner_id": null, "product_id": "f747fbc5-4782-4489-92b4-51691dea1f63", "shop_id": 37933, "updated_at": "2021-03-22T13:51:50.148+02:00" }, { "id": 10790, "count": "10.0", "counting_enabled": true, "created_at": "2021-03-22T13:51:50.149+02:00", "owner_id": null, "product_id": "f747fbc5-4782-4489-92b4-51691dea1f63", "shop_id": 37934, "updated_at": "2021-03-22T13:51:50.149+02:00" } ], "category": { "id": "72c1f7f7-751d-4caf-a0c7-5c8b0314a9f2", "color_id": 0, "created_at": "2021-03-22T13:51:50.110+02:00", "parent_id": null, "partner_id": 7711, "products_count": 0, "title": "Velit enim repellendus reprehenderit.", "updated_at": "2021-03-22T13:51:50.110+02:00" }, "category_id": "72c1f7f7-751d-4caf-a0c7-5c8b0314a9f2", "category_type": { "id": 9000681, "parent_id": null, "title": "Corporis consectetur deserunt quae." }, "category_type_id": 9000681, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:50.114+02:00", "is_free_price": false, "is_without_number": false, "number": "1481689397", "owner_id": 103937, "picture": { "id": "6dc1f53c8138e3001bb3099f8d04dc8d", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "/uploads/store/6dc1f53c8138e3001bb3099f8d04dc8d" }, "portion_amount": 800, "portion_type_id": 0, "price": "7829.0", "procurement_price": "100.0", "sold_by_weight": false, "subgroup_id": null, "tax_amount": { "А": 540 }, "tax_group_id": 1, "title": "Sit ab delectus non.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:50.114+02:00", "user_id": 103938 }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "patch": { "summary": "Оновлення даних товару", "tags": [ "Товари" ], "operationId": "patch_api_v1_inventory_products_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор товару", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "e29eaab0-f846-40cf-a445-db81f9101a25" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "string" }, "title": { "type": "string" }, "unit_type_id": { "type": "integer" }, "portion_amount": { "type": "integer" }, "portion_type_id": { "type": "integer" }, "price": { "type": "number" }, "procurement_price": { "type": "integer" }, "classifier_type_id": { "type": "integer" }, "classifier_code": { "type": "string" }, "tax_group_id": { "type": "integer" }, "category_id": { "type": "string" }, "category_type_id": { "type": "integer" }, "sold_by_weight": { "type": "boolean" }, "bookmark_ids": { "type": "array", "items": { "type": "object" } }, "user_id": { "type": "integer" }, "owner_id": { "type": "integer" } }, "additionalProperties": true }, "example": { "id": "e29eaab0-f846-40cf-a445-db81f9101a25", "number": "6930426566", "title": "Optio numquam molestiae amet.", "unit_type_id": 0, "portion_amount": 800, "portion_type_id": 0, "price": 71.89, "procurement_price": 50, "classifier_type_id": 2, "classifier_code": "543210123456789", "tax_group_id": 1, "category_id": "4de477d4-316b-4149-83aa-c25f41aa2c4d", "category_type_id": 8498814, "sold_by_weight": false, "bookmark_ids": [], "user_id": 103942, "owner_id": 103941 } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення товару", "tags": [ "Товари" ], "operationId": "delete_api_v1_inventory_products_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор товару", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "f1fda3a6-b8c1-4c6f-91b0-6db30699c5fc" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/cards": { "summary": "Список інвентарних карток", "get": { "summary": "Список інвентарних карток", "tags": [ "Облік товарів" ], "operationId": "get_api_v1_inventory_cards", "parameters": [ { "name": "id", "in": "query", "required": false, "description": "Ідентифікатор", "schema": { "type": "string" } }, { "name": "product_id", "in": "query", "required": false, "description": "Ідентифікатор товару", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } }, { "name": "counting_enabled", "in": "query", "required": false, "description": "Ознака відслідковування залишків", "schema": { "type": "string" } }, { "name": "count", "in": "query", "required": false, "description": "Кількість", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 10767, "count": "3.5", "counting_enabled": true, "created_at": "2021-03-22T13:51:46.815+02:00", "owner_id": 103881, "product": { "id": "a327c691-1542-4b65-b8cd-05c51847bcad", "alter_number": null, "alter_title": null, "bookmark_ids": [], "category_id": "837cd759-fb0a-44b4-9fdb-91b0b9c7b112", "category_type_id": 5629779, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:46.774+02:00", "is_free_price": false, "is_without_number": false, "number": "1428005484", "owner_id": 103881, "portion_amount": 800, "portion_type_id": 0, "price": "5483.0", "procurement_price": "100.0", "sold_by_weight": false, "subgroup_id": null, "tax_amount": { "А": 1040 }, "tax_group_id": 1, "title": "Doloremque et eligendi laborum.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:46.774+02:00", "user_id": 103882 }, "product_id": "a327c691-1542-4b65-b8cd-05c51847bcad", "shop": { "id": 37916, "business_category_id": 1, "created_at": "2021-03-22T13:51:46.796+02:00", "email": "hye@beerdickinson.co", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 103881, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:51:46.796+02:00", "website_url": "https://www.example.com" }, "shop_id": 37916, "updated_at": "2021-03-22T13:51:46.815+02:00" }, { "id": 10766, "count": "3.5", "counting_enabled": true, "created_at": "2021-03-22T13:51:46.813+02:00", "owner_id": 103881, "product": { "id": "1744c191-498b-48bf-8e0c-19792b3d17c4", "alter_number": null, "alter_title": null, "bookmark_ids": [], "category_id": "2c8c0740-f940-459d-a6dd-b06373f99656", "category_type_id": 6496175, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:46.745+02:00", "is_free_price": false, "is_without_number": false, "number": "1264404741", "owner_id": 103881, "portion_amount": 800, "portion_type_id": 0, "price": "6145.0", "procurement_price": "100.0", "sold_by_weight": false, "subgroup_id": null, "tax_amount": { "А": 1960 }, "tax_group_id": 1, "title": "Fuga animi repellendus tenetur.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:46.745+02:00", "user_id": 103882 }, "product_id": "1744c191-498b-48bf-8e0c-19792b3d17c4", "shop": { "id": 37916, "business_category_id": 1, "created_at": "2021-03-22T13:51:46.796+02:00", "email": "hye@beerdickinson.co", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 103881, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:51:46.796+02:00", "website_url": "https://www.example.com" }, "shop_id": 37916, "updated_at": "2021-03-22T13:51:46.813+02:00" }, { "id": 10765, "count": "3.5", "counting_enabled": true, "created_at": "2021-03-22T13:51:46.812+02:00", "owner_id": 103881, "product": { "id": "a327c691-1542-4b65-b8cd-05c51847bcad", "alter_number": null, "alter_title": null, "bookmark_ids": [], "category_id": "837cd759-fb0a-44b4-9fdb-91b0b9c7b112", "category_type_id": 5629779, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:46.774+02:00", "is_free_price": false, "is_without_number": false, "number": "1428005484", "owner_id": 103881, "portion_amount": 800, "portion_type_id": 0, "price": "5483.0", "procurement_price": "100.0", "sold_by_weight": false, "subgroup_id": null, "tax_amount": { "А": 1040 }, "tax_group_id": 1, "title": "Doloremque et eligendi laborum.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:46.774+02:00", "user_id": 103882 }, "product_id": "a327c691-1542-4b65-b8cd-05c51847bcad", "shop": { "id": 37915, "business_category_id": 1, "created_at": "2021-03-22T13:51:46.764+02:00", "email": "evangeline@vandervort.biz", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 103881, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:51:46.764+02:00", "website_url": "https://www.example.com" }, "shop_id": 37915, "updated_at": "2021-03-22T13:51:46.812+02:00" }, { "id": 10764, "count": "3.5", "counting_enabled": true, "created_at": "2021-03-22T13:51:46.807+02:00", "owner_id": 103881, "product": { "id": "1744c191-498b-48bf-8e0c-19792b3d17c4", "alter_number": null, "alter_title": null, "bookmark_ids": [], "category_id": "2c8c0740-f940-459d-a6dd-b06373f99656", "category_type_id": 6496175, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:46.745+02:00", "is_free_price": false, "is_without_number": false, "number": "1264404741", "owner_id": 103881, "portion_amount": 800, "portion_type_id": 0, "price": "6145.0", "procurement_price": "100.0", "sold_by_weight": false, "subgroup_id": null, "tax_amount": { "А": 1960 }, "tax_group_id": 1, "title": "Fuga animi repellendus tenetur.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:46.745+02:00", "user_id": 103882 }, "product_id": "1744c191-498b-48bf-8e0c-19792b3d17c4", "shop": { "id": 37915, "business_category_id": 1, "created_at": "2021-03-22T13:51:46.764+02:00", "email": "evangeline@vandervort.biz", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 103881, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:51:46.764+02:00", "website_url": "https://www.example.com" }, "shop_id": 37915, "updated_at": "2021-03-22T13:51:46.807+02:00" } ], "meta": { "total_count": 4 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення інвентарної картки", "tags": [ "Облік товарів" ], "operationId": "post_api_v1_inventory_cards", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 10776, "count": "5.0", "counting_enabled": true, "created_at": "2021-03-22T13:51:47.187+02:00", "owner_id": null, "product_id": "0ee5ca34-a864-4ca1-a144-f0f4fe48e036", "shop_id": 37919, "updated_at": "2021-03-22T13:51:47.187+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "product_id": [ { "error": "invalid" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор" }, "product_id": { "type": "string", "description": "Ідентифікатор товару" }, "shop_id": { "type": "integer", "description": "Ідентифікатор торгової точки" }, "counting_enabled": { "type": "boolean", "description": "Ознака відслідковування залишків" }, "count": { "type": "integer", "description": "Кількість" } }, "additionalProperties": true }, "example": { "product_id": "0ee5ca34-a864-4ca1-a144-f0f4fe48e036", "shop_id": 37919, "counting_enabled": true, "count": 5 } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/cards/{id}": { "summary": "Операції з інвентарною карткою", "get": { "summary": "Перегляд даних інвентарної картки", "tags": [ "Облік товарів" ], "operationId": "get_api_v1_inventory_cards_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор", "schema": { "type": "string" } }, { "name": "product_id", "in": "query", "required": false, "description": "Ідентифікатор товару", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } }, { "name": "counting_enabled", "in": "query", "required": false, "description": "Ознака відслідковування залишків", "schema": { "type": "string" } }, { "name": "count", "in": "query", "required": false, "description": "Кількість", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 10785, "count": "3.5", "counting_enabled": true, "created_at": "2021-03-22T13:51:47.550+02:00", "owner_id": 103891, "product": { "id": "52f87f5e-9d97-4f8a-b9ed-1af1ef03411e", "alter_number": null, "alter_title": null, "bookmark_ids": [], "category_id": "6d20304d-589d-4ef4-8a23-302b30449191", "category_type_id": 4203449, "classifier_code": "123456789012345", "classifier_type_id": 1, "created_at": "2021-03-22T13:51:47.485+02:00", "is_free_price": false, "is_without_number": false, "number": "7565420032", "owner_id": 103891, "portion_amount": 800, "portion_type_id": 0, "price": "9267.0", "procurement_price": "100.0", "sold_by_weight": false, "subgroup_id": null, "tax_amount": { "А": 1380 }, "tax_group_id": 1, "title": "Dignissimos aut rem modi.", "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:51:47.485+02:00", "user_id": 103892 }, "product_id": "52f87f5e-9d97-4f8a-b9ed-1af1ef03411e", "shop": { "id": 37925, "business_category_id": 1, "created_at": "2021-03-22T13:51:47.518+02:00", "email": "marty@okuneva.co", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 103891, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-03-22T13:51:47.518+02:00", "website_url": "https://www.example.com" }, "shop_id": 37925, "updated_at": "2021-03-22T13:51:47.550+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "put": { "summary": "Оновлення даних в інвентарній картці", "tags": [ "Облік товарів" ], "operationId": "put_api_v1_inventory_cards_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 10786 }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "product_id": [ { "error": "invalid" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "product_id": { "type": "string", "description": "Ідентифікатор товару" }, "shop_id": { "type": "integer", "description": "Ідентифікатор торгової точки" }, "counting_enabled": { "type": "boolean", "description": "Ознака відслідковування залишків" }, "count": { "type": "number", "description": "Кількість" } }, "additionalProperties": true }, "example": { "id": 10786, "shop_id": 37928, "counting_enabled": true, "count": 9.99 } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення інвентарної картки", "tags": [ "Облік товарів" ], "operationId": "delete_api_v1_inventory_cards_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 10788 }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "product_id": { "type": "string", "description": "Ідентифікатор товару" }, "shop_id": { "type": "string", "description": "Ідентифікатор торгової точки" }, "counting_enabled": { "type": "string", "description": "Ознака відслідковування залишків" }, "count": { "type": "string", "description": "Кількість" } }, "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/product_subgroups": { "summary": "Список товарних підгруп", "get": { "summary": "Отримання списку товарних підгруп", "tags": [ "Товарні підгрупи" ], "operationId": "get_api_v1_inventory_product_subgroups", "parameters": [ { "name": "id", "in": "query", "required": false, "description": "Ідентифікатор товарної підгрупи", "schema": { "type": "string" } }, { "name": "title", "in": "query", "required": false, "description": "Назва товарної підгрупи", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 7277, "created_at": "2021-03-22T13:51:49.301+02:00", "title": "Ut facilis nesciunt laborum.", "updated_at": "2021-03-22T13:51:49.301+02:00" } ], "meta": { "total_count": 1 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення товарної підгрупи", "tags": [ "Товарні підгрупи" ], "operationId": "post_api_v1_inventory_product_subgroups", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 7279, "created_at": "2021-03-22T13:51:49.411+02:00", "title": "Aliquid quod omnis nostrum.", "updated_at": "2021-03-22T13:51:49.411+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "title": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор товарної підгрупи" }, "title": { "type": "string", "description": "Назва товарної підгрупи" } }, "additionalProperties": true }, "example": { "title": "Aliquid quod omnis nostrum." } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/product_subgroups/{id}": { "summary": "Операції з товарною підгрупою", "put": { "summary": "Оновлення інформації про товарну підгрупу", "tags": [ "Товарні підгрупи" ], "operationId": "put_api_v1_inventory_product_subgroups_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор товарної підгрупи", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 7280, "created_at": "2021-03-22T13:51:49.467+02:00", "title": "Aliquid quod omnis nostrum.", "updated_at": "2021-03-22T13:51:49.467+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "Назва товарної підгрупи" } }, "additionalProperties": true }, "example": { "id": 7280, "title": "Aliquid quod omnis nostrum." } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення товарної підгрупи", "tags": [ "Товарні підгрупи" ], "operationId": "delete_api_v1_inventory_product_subgroups_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор товарної підгрупи", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 7281, "created_at": "2021-03-22T13:51:49.520+02:00", "title": "Id voluptatem dolorum facilis.", "updated_at": "2021-03-22T13:51:49.520+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "Назва товарної підгрупи" } }, "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/categories/batch": { "summary": "Каталоги - групова обробка", "post": { "summary": "Групове створення каталогів", "tags": [ "Імпорт" ], "operationId": "post_api_v1_inventory_categories_batch", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "3fa7df7a-c7e6-4f40-833b-e49e7ae5dc79", "color_id": null, "created_at": "2021-03-22T11:51:48.552+02:00", "parent_id": null, "partner_id": null, "products_count": 0, "shop_ids": [], "title": "Natus et quod voluptas.", "updated_at": "2021-03-22T11:51:48.552+02:00" }, { "id": "26bb1a4c-f28b-4900-b7eb-34e4e8547144", "color_id": null, "created_at": "2021-03-22T11:51:48.553+02:00", "parent_id": null, "partner_id": null, "products_count": 0, "shop_ids": [], "title": "Natus et quod voluptas.", "updated_at": "2021-03-22T11:51:48.553+02:00" }, { "id": "4f8c8f9d-de32-4e82-8629-2dbe8d3c1489", "color_id": null, "created_at": "2021-03-22T11:51:48.555+02:00", "parent_id": null, "partner_id": null, "products_count": 0, "shop_ids": [], "title": "Natus et quod voluptas.", "updated_at": "2021-03-22T11:51:48.555+02:00" } ], "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "categories": [ { "error": "invalid" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object" } } }, "additionalProperties": true }, "example": { "categories": [ { "title": "Natus et quod voluptas.", "color": 2 }, { "title": "Natus et quod voluptas.", "color": 2 }, { "title": "Natus et quod voluptas.", "color": 2 } ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Групове видалення каталогів", "tags": [ "Імпорт" ], "operationId": "delete_api_v1_inventory_categories_batch", "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "63301fca-b333-47cd-aa03-32965a9326d2", "color_id": 0, "created_at": "2021-03-22T13:51:48.629+02:00", "parent_id": null, "partner_id": null, "products_count": 0, "shop_ids": [], "title": "Ducimus esse molestiae dolorem.", "updated_at": "2021-03-22T13:51:48.629+02:00" }, { "id": "ef4f25b0-8671-4cfc-acc0-dba73327be9b", "color_id": 0, "created_at": "2021-03-22T13:51:48.631+02:00", "parent_id": null, "partner_id": null, "products_count": 0, "shop_ids": [], "title": "Maiores unde repellat dolorem.", "updated_at": "2021-03-22T13:51:48.631+02:00" }, { "id": "dee14390-a852-4fca-8ca3-a815ce569fc5", "color_id": 0, "created_at": "2021-03-22T13:51:48.633+02:00", "parent_id": null, "partner_id": null, "products_count": 0, "shop_ids": [], "title": "Adipisci ratione beatae recusandae.", "updated_at": "2021-03-22T13:51:48.633+02:00" } ], "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": true }, "example": { "ids": [ "63301fca-b333-47cd-aa03-32965a9326d2", "ef4f25b0-8671-4cfc-acc0-dba73327be9b", "dee14390-a852-4fca-8ca3-a815ce569fc5" ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/products/batch": { "summary": "Товари - групова обробка", "post": { "summary": "Групове створення товарів", "tags": [ "Імпорт" ], "operationId": "post_api_v1_inventory_products_batch", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "be7fd16e-25b4-4389-996d-08b80f69d6c5" }, { "id": "6e7b9e4d-d47d-481b-ae53-b5e751454a2d" }, { "id": "0e393eac-6bc3-4364-a60e-16ffdd3cbbde" } ], "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "products": [ { "error": "invalid", "messages": "title: Не може бути пустим" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "products": { "type": "array", "items": { "type": "object" } } }, "additionalProperties": true }, "example": { "products": [ { "number": "6930426566", "title": "Optio numquam molestiae amet.", "unit_type_id": 0, "portion_amount": 800, "portion_type_id": 0, "price": 71.89, "procurement_price": 50, "classifier_type_id": 2, "classifier_code": "543210123456789", "tax_group_id": 1, "category_id": "b3c286e0-1823-4c2b-a850-12f7fd921020", "category_type_id": 2938762, "sold_by_weight": false, "bookmark_ids": [] }, { "number": "6930426566", "title": "Optio numquam molestiae amet.", "unit_type_id": 0, "portion_amount": 800, "portion_type_id": 0, "price": 71.89, "procurement_price": 50, "classifier_type_id": 2, "classifier_code": "543210123456789", "tax_group_id": 1, "category_id": "b3c286e0-1823-4c2b-a850-12f7fd921020", "category_type_id": 2938762, "sold_by_weight": false, "bookmark_ids": [] }, { "number": "6930426566", "title": "Optio numquam molestiae amet.", "unit_type_id": 0, "portion_amount": 800, "portion_type_id": 0, "price": 71.89, "procurement_price": 50, "classifier_type_id": 2, "classifier_code": "543210123456789", "tax_group_id": 1, "category_id": "b3c286e0-1823-4c2b-a850-12f7fd921020", "category_type_id": 2938762, "sold_by_weight": false, "bookmark_ids": [] } ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Групове видалення товарів", "tags": [ "Імпорт" ], "operationId": "delete_api_v1_inventory_products_batch", "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "0b9f6d4a-4723-4e90-a9d5-8ded3fca1ac1" }, { "id": "22532536-7f51-406f-a16e-2f5cc46c981e" }, { "id": "7b27b044-0043-4a0b-bf03-4ae0d38de4bf" } ], "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": true }, "example": { "ids": [ "0b9f6d4a-4723-4e90-a9d5-8ded3fca1ac1", "22532536-7f51-406f-a16e-2f5cc46c981e", "7b27b044-0043-4a0b-bf03-4ae0d38de4bf" ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/import_products": { "summary": "Список імпортованих файлів", "post": { "summary": "Обмін даними через файли", "tags": [ "Імпорт" ], "operationId": "post_api_v1_inventory_import_products", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 584, "created_at": "2021-03-22T13:51:49.230+02:00", "created_count": 0, "filename": "nomenclature-products_success.json", "products_count": 0, "state": 0, "updated_at": "2021-03-22T13:51:49.230+02:00", "updated_count": 0 }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": { "url": [ { "error": "blank" } ], "category_id": [ { "error": "blank" } ] } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "Посилання на файл" }, "category_id": { "type": "string", "description": "Ідентифікатор каталогу куди повинні імпортуватись товари" } }, "additionalProperties": true }, "example": { "url": "https://s3.test.com/nomenclature-products_success.json", "category_id": "972bd369-27db-4ee8-80d5-7767f002f1c4" } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "get": { "summary": "Отримання історії імпорту", "tags": [ "Імпорт" ], "operationId": "get_api_v1_inventory_import_products", "parameters": [ { "name": "url", "in": "query", "required": false, "description": "Посилання на файл", "schema": { "type": "string" } }, { "name": "category_id", "in": "query", "required": false, "description": "Ідентифікатор каталогу куди повинні імпортуватись товари", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 583, "created_at": "2021-03-22T13:51:49.128+02:00", "created_count": 0, "filename": null, "products_count": 0, "state": 0, "updated_at": "2021-03-22T13:51:49.128+02:00", "updated_count": 0 }, { "id": 582, "created_at": "2021-03-22T13:51:49.125+02:00", "created_count": 0, "filename": null, "products_count": 0, "state": 0, "updated_at": "2021-03-22T13:51:49.125+02:00", "updated_count": 0 } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 2, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/inventory/import_products/{id}": { "summary": "Файл імпорту", "get": { "summary": "Отримання інформація про статус імпорту", "tags": [ "Імпорт" ], "operationId": "get_api_v1_inventory_import_products_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 581, "created_at": "2021-03-22T13:51:49.066+02:00", "created_count": 0, "filename": null, "products_count": 0, "results": {}, "state": 0, "updated_at": "2021-03-22T13:51:49.066+02:00", "updated_count": 0 }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/shifts": { "summary": "Перелік змін", "get": { "summary": "Отримання списку торгових та фіскальних змін", "tags": [ "Зміни" ], "operationId": "get_api_v1_pos_shifts", "parameters": [ { "name": "id", "in": "query", "required": false, "description": "Ідентифікатор зміни", "schema": { "type": "string" } }, { "name": "remote_shift_id", "in": "query", "required": false, "description": "Ідентифікатор торгової зміни на сервері ДПС", "schema": { "type": "string" } }, { "name": "fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер зміни", "schema": { "type": "string" } }, { "name": "cash_balance", "in": "query", "required": false, "description": "Готівка в касі", "schema": { "type": "string" } }, { "name": "device_uid", "in": "query", "required": false, "description": "Унікальний ідентифікатор пристрою", "schema": { "type": "string" } }, { "name": "registrar_fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер пРРО", "schema": { "type": "string" } }, { "name": "opened_by", "in": "query", "required": false, "description": "ПІБ ким було розпочато зміну", "schema": { "type": "string" } }, { "name": "closed_by", "in": "query", "required": false, "description": "ПІБ ким було завершено зміну", "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "description": "Статус", "schema": { "type": "string" } }, { "name": "terminal_user_id", "in": "query", "required": false, "description": "Ідентифікатор користувача на терміналі", "schema": { "type": "string" } }, { "name": "employee_id", "in": "query", "required": false, "description": "Ідентифікатор працівника", "schema": { "type": "string" } }, { "name": "page", "in": "query", "required": false, "description": "Сторінка", "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "required": false, "description": "Кількість записів на сторінку", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "03bc8594-bf71-4ee0-b3ee-27f35379cf8d", "cash_balance": "0.99", "closed_at": null, "closed_by": null, "device_uid": "78b341e8-a400-4c5d-a5ad-2d4ab7b816a2", "employee_id": null, "fiscal_number": "Iusto non eos sint.", "opened_at": "2021-03-22T11:52:05.594+02:00", "opened_by": "John Dow", "registrar_fiscal_number": null, "remote_shift_id": "67969f57-f512-4a46-b6eb-df71020008bb", "state": 0, "terminal_id": 19987, "terminal_user_id": null }, { "id": "62b7f575-f1f4-459a-a52a-64bd4afb53c9", "cash_balance": "0.99", "closed_at": null, "closed_by": null, "device_uid": "60db03f6-7426-4f6d-b53c-6da7de4fbad7", "employee_id": null, "fiscal_number": "Maxime saepe sunt sit.", "opened_at": "2021-03-22T11:52:05.601+02:00", "opened_by": "John Dow", "registrar_fiscal_number": null, "remote_shift_id": "3f14c690-10c0-43b2-a2a8-2174ab1cf82f", "state": 0, "terminal_id": 19988, "terminal_user_id": null }, { "id": "718078a4-1e76-486c-bd93-ac24391268a9", "cash_balance": "0.99", "closed_at": null, "closed_by": null, "device_uid": "78b341e8-a400-4c5d-a5ad-2d4ab7b816a2", "employee_id": null, "fiscal_number": "Soluta iste non at.", "opened_at": "2021-03-14T05:52:05.599+02:00", "opened_by": "John Dow", "registrar_fiscal_number": null, "remote_shift_id": "b9173f82-7615-4de0-8d1a-041ec988011a", "state": 2, "terminal_id": 19987, "terminal_user_id": null }, { "id": "d968a02d-7164-4660-9834-13ca752dd5ce", "cash_balance": "0.99", "closed_at": "2021-03-22T13:47:05.596+02:00", "closed_by": "John Dow", "device_uid": "78b341e8-a400-4c5d-a5ad-2d4ab7b816a2", "employee_id": null, "fiscal_number": "Repudiandae alias dolorem libero.", "opened_at": "2021-03-22T11:52:05.596+02:00", "opened_by": "John Dow", "registrar_fiscal_number": null, "remote_shift_id": "14361e4f-c05e-4f01-84e1-8af2b2cca2aa", "state": 1, "terminal_id": 19987, "terminal_user_id": null } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 4, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/shifts/{id}": { "summary": "Операції із зміною", "get": { "summary": "Перегляд інформації про зміну", "tags": [ "Зміни" ], "operationId": "get_api_v1_pos_shifts_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор зміни", "schema": { "type": "string" } }, { "name": "remote_shift_id", "in": "query", "required": false, "description": "Ідентифікатор торгової зміни на сервері ДПС", "schema": { "type": "string" } }, { "name": "fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер зміни", "schema": { "type": "string" } }, { "name": "cash_balance", "in": "query", "required": false, "description": "Готівка в касі", "schema": { "type": "string" } }, { "name": "device_uid", "in": "query", "required": false, "description": "Унікальний ідентифікатор пристрою", "schema": { "type": "string" } }, { "name": "registrar_fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер пРРО", "schema": { "type": "string" } }, { "name": "opened_by", "in": "query", "required": false, "description": "ПІБ ким було розпочато зміну", "schema": { "type": "string" } }, { "name": "closed_by", "in": "query", "required": false, "description": "ПІБ ким було завершено зміну", "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "description": "Статус", "schema": { "type": "string" } }, { "name": "terminal_user_id", "in": "query", "required": false, "description": "Ідентифікатор користувача на терміналі", "schema": { "type": "string" } }, { "name": "employee_id", "in": "query", "required": false, "description": "Ідентифікатор працівника", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "753759cc-2851-4c56-ad67-23f377cee803", "cash_balance": "0.99", "closed_at": null, "closed_by": null, "device_uid": "4f71b1d8-2cdf-4341-8828-ce56b6f2d778", "employee_id": null, "fiscal_number": "Tempore harum saepe officia.", "opened_at": "2021-03-22T11:52:05.844+02:00", "opened_by": "John Dow", "registrar_fiscal_number": null, "remote_shift_id": "719d1bae-eb9d-49b6-8167-7dc5a3f40091", "state": 0, "terminal_id": 19995, "terminal_user_id": null }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/receipts": { "summary": "Список чеків", "get": { "summary": "Отримання списку чеків", "tags": [ "POS" ], "operationId": "get_api_v1_pos_receipts", "parameters": [ { "name": "id", "in": "query", "required": false, "description": "Ідентифікатор чеку", "schema": { "type": "string" } }, { "name": "shift_id", "in": "query", "required": false, "description": "Ідентифікатор зміни", "schema": { "type": "string" } }, { "name": "title", "in": "query", "required": false, "description": "Назва", "schema": { "type": "string" } }, { "name": "total_amount", "in": "query", "required": false, "description": "Загальна ціна", "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "description": "Статус", "schema": { "type": "string" } }, { "name": "type", "in": "query", "required": false, "description": "Тип", "schema": { "type": "string" } }, { "name": "discount_type_id", "in": "query", "required": false, "description": "Тип знижки (0 - відсоток, 1 - грошовий еквівалент)", "schema": { "type": "string" } }, { "name": "discount_amount", "in": "query", "required": false, "description": "Розмір знижки (в грошовому еквіваленті)", "schema": { "type": "string" } }, { "name": "discount_percentage", "in": "query", "required": false, "description": "Розмір знижки (у відсотках)", "schema": { "type": "string" } }, { "name": "seller_id", "in": "query", "required": false, "description": "Ідентифікатор продавця", "schema": { "type": "string" } }, { "name": "items", "in": "query", "required": false, "description": "Перелік позицій в чеку", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } }, { "name": "terminal_id", "in": "query", "required": false, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } }, { "name": "cashier_name", "in": "query", "required": false, "description": "Касир (ПІБ)", "schema": { "type": "string" } }, { "name": "description", "in": "query", "required": false, "description": "Опис", "schema": { "type": "string" } }, { "name": "fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер", "schema": { "type": "string" } }, { "name": "tax_amount", "in": "query", "required": false, "description": "Інформація про подактки", "schema": { "type": "string" } }, { "name": "registrar_fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер пРРО", "schema": { "type": "string" } }, { "name": "registrar_local_number", "in": "query", "required": false, "description": "Локальний номер пРРО", "schema": { "type": "string" } }, { "name": "rounding_amount", "in": "query", "required": false, "description": "Сума заокруглення", "schema": { "type": "string" } }, { "name": "offline_id", "in": "query", "required": false, "description": "Ідентифікатор офлайн зміни", "schema": { "type": "string" } }, { "name": "offline_seed", "in": "query", "required": false, "description": "Секретне число для режиму офлайн", "schema": { "type": "string" } }, { "name": "offline_local_number", "in": "query", "required": false, "description": "Локальний номер в межах офлайн пакету", "schema": { "type": "string" } }, { "name": "previous_receipt_hash", "in": "query", "required": false, "description": "Хеш попереднього чеку", "schema": { "type": "string" } }, { "name": "related_fiscal_number", "in": "query", "required": false, "description": "Зв'язаний фіскальний номер (наприклад для повернення)", "schema": { "type": "string" } }, { "name": "is_hidden", "in": "query", "required": false, "description": "Ознака прихованого чеку (службовий параметр)", "schema": { "type": "string" } }, { "name": "page", "in": "query", "required": false, "description": "Сторінка", "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "required": false, "description": "Кількість записів на сторінку", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "4683e036-598e-44a5-9d89-00a92c9728c9", "cashier_name": "John Doe", "created_at": "2021-07-06T20:26:14.730+00:00", "description": null, "discount_amount": "0.0", "discount_percentage": "0.0", "discount_type_id": 0, "fiscal_number": "16773376", "is_hidden": false, "items": [ { "id": "e3a4acdd-49af-4346-ad9a-8bd4e5860d0d", "amount": "1438.0", "classifier_code": "123", "classifier_type_id": 1, "created_at": "2021-07-06T23:26:14.728+00:00", "description": "", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Алкоголь", "price": "1438.0", "product_id": "f3ba907b-c718-4949-91ee-4dfdfa88d12c", "quantity": "1.0", "receipt_id": "4683e036-598e-44a5-9d89-00a92c9728c9", "sku": null, "sold_by_weight": false, "stock_item_id": 1, "tax_group_id": 6, "unit_type_id": 2009, "unit_type_name": "шт", "updated_at": "2021-07-06T23:26:14.728+00:00" } ], "offline_id": 0, "offline_local_number": null, "offline_seed": "", "payment_transactions": [ { "id": "7d523a18-e812-43f3-beb5-85a0029f5f86", "amount": "1438.0", "approval_code": null, "batch": null, "change_amount": "0.0", "created_at": "2021-07-06T20:26:16.151+00:00", "deposit_amount": "1438.0", "description": null, "pan": null, "pan_hash": null, "payload": null, "payment_type_id": 0, "receipt_id": "4683e036-598e-44a5-9d89-00a92c9728c9", "result_code": null, "rrn": "162Q560ZQ3I174JY431", "signature": false, "stan": null, "state": 1, "timestamp": "2021-07-06T20:26:14.433+00:00", "transaction_type_id": 0, "updated_at": "2021-07-06T20:26:16.151+00:00" } ], "previous_receipt_hash": null, "registrar_fiscal_number": "4000026885", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": "0.0", "seller_id": 0, "shift_id": "77890312-1312-4c57-a0fe-c57352678f45", "shop_id": 13, "state": 2, "tax_amount": { "А": 22825, "З": 6848 }, "terminal_id": null, "terminal_shift_id": null, "title": "", "total_amount": "1438.0", "type": 0, "updated_at": "2021-07-06T20:26:14.730+00:00" }, { "id": "2c109138-f15d-4ab5-bc81-31cb20c2c779", "cashier_name": "John Doe", "created_at": "2021-05-21T08:12:45.465+00:00", "description": null, "discount_amount": "0.0", "discount_percentage": "0.0", "discount_type_id": 0, "fiscal_number": null, "is_hidden": false, "items": [ { "id": "f5467c27-663a-4ef4-81a9-8b9bef6b1b93", "amount": "500.0", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-05-21T11:12:45.463+00:00", "description": "1213131584648,", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "лапшуха", "price": "500.0", "product_id": "980e1bdb-181f-4847-8ea8-5933785e905a", "quantity": "1.0", "receipt_id": "2c109138-f15d-4ab5-bc81-31cb20c2c779", "sku": null, "sold_by_weight": true, "stock_item_id": 1, "tax_group_id": 0, "unit_type_id": 101, "unit_type_name": "м", "updated_at": "2021-05-21T11:12:45.463+00:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "payment_transactions": [ { "id": "9926a27e-0044-4580-854a-a6c5be656e63", "amount": "500.0", "approval_code": null, "batch": null, "change_amount": "0.0", "created_at": "2021-05-21T08:12:45.557+00:00", "deposit_amount": "500.0", "description": null, "pan": null, "pan_hash": null, "payload": null, "payment_type_id": 0, "receipt_id": "2c109138-f15d-4ab5-bc81-31cb20c2c779", "result_code": null, "rrn": "16YX2158LG47620PV09", "signature": false, "stan": null, "state": 1, "timestamp": "2021-05-21T08:12:42.010+00:00", "transaction_type_id": 0, "updated_at": "2021-05-21T08:12:45.557+00:00" } ], "previous_receipt_hash": null, "registrar_fiscal_number": null, "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": "0.0", "seller_id": 0, "shift_id": "8d8c3c40-4341-4057-a5ed-db81e59aef7a", "shop_id": 13, "state": 2, "tax_amount": {}, "terminal_id": null, "terminal_shift_id": null, "title": "", "total_amount": "500.0", "type": 0, "updated_at": "2021-05-21T08:12:45.465+00:00" } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 2, "limit_value": 10, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "post": { "summary": "Створення нового чеку", "tags": [ "POS" ], "operationId": "post_api_v1_pos_receipts", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "f1b49979-5d30-4110-b6a4-bdfaba716394", "cashier_name": "Fugit omnis tempora asperiores.", "created_at": "2021-03-22T13:52:04.694+02:00", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "discount_amount": "15.0", "discount_percentage": null, "fiscal_number": "123456789012345", "is_hidden": false, "items": [ { "id": "604efa83-e492-416b-9979-eca560d98c09", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.694+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "f1b49979-5d30-4110-b6a4-bdfaba716394", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.694+02:00" }, { "id": "6434abe4-341b-4640-a53f-8f4384436bb9", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.694+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "f1b49979-5d30-4110-b6a4-bdfaba716394", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.694+02:00" }, { "id": "8c69f93b-5627-4e3f-aefe-7c7d74e55342", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.694+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "f1b49979-5d30-4110-b6a4-bdfaba716394", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.694+02:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 23.5 }, "terminal_id": null, "terminal_shift_id": null, "title": "new receipt", "total_amount": "145.0", "type": 0, "updated_at": "2021-03-22T13:52:04.694+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": "[Pos::ReceiptForm.new] \"wrong\" (String) has invalid type for :total_amount violates constraints (invalid value for Float(): \"wrong\" failed)" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор чеку" }, "shift_id": { "type": [ "string", "null" ], "description": "Ідентифікатор зміни" }, "title": { "type": "string", "description": "Назва" }, "total_amount": { "type": "integer", "description": "Загальна ціна" }, "state": { "type": "integer", "description": "Статус" }, "type": { "type": "integer", "description": "Тип" }, "discount_type_id": { "type": "string", "description": "Тип знижки (0 - відсоток, 1 - грошовий еквівалент)" }, "discount_amount": { "type": "integer", "description": "Розмір знижки (в грошовому еквіваленті)" }, "discount_percentage": { "type": "string", "description": "Розмір знижки (у відсотках)" }, "seller_id": { "type": "integer", "description": "Ідентифікатор продавця" }, "items": { "type": "array", "items": { "type": "object" }, "description": "Перелік позицій в чеку" }, "shop_id": { "type": "string", "description": "Ідентифікатор торгової точки" }, "terminal_id": { "type": "string", "description": "Ідентифікатор терміналу" }, "cashier_name": { "type": "string", "description": "Касир (ПІБ)" }, "description": { "type": "string", "description": "Опис" }, "fiscal_number": { "type": "string", "description": "Фіскальний номер" }, "tax_amount": { "type": "object", "description": "Інформація про подактки" }, "registrar_fiscal_number": { "type": "string", "description": "Фіскальний номер пРРО" }, "registrar_local_number": { "type": "string", "description": "Локальний номер пРРО" }, "rounding_amount": { "type": "string", "description": "Сума заокруглення" }, "offline_id": { "type": "string", "description": "Ідентифікатор офлайн зміни" }, "offline_seed": { "type": "string", "description": "Секретне число для режиму офлайн" }, "offline_local_number": { "type": "string", "description": "Локальний номер в межах офлайн пакету" }, "previous_receipt_hash": { "type": "string", "description": "Хеш попереднього чеку" }, "related_fiscal_number": { "type": "string", "description": "Зв'язаний фіскальний номер (наприклад для повернення)" }, "is_hidden": { "type": "boolean", "description": "Ознака прихованого чеку (службовий параметр)" }, "page": { "type": "string", "description": "Сторінка" }, "per_page": { "type": "string", "description": "Кількість записів на сторінку" } }, "additionalProperties": true }, "example": { "title": "new receipt", "total_amount": 145, "state": 2, "type": 0, "discount_amount": 15, "seller_id": 1, "shift_id": null, "fiscal_number": "123456789012345", "registrar_fiscal_number": "123456789054321", "cashier_name": "Fugit omnis tempora asperiores.", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "tax_amount": { "А": 23.5 }, "is_hidden": false, "items": [ { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." } ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/receipts/{id}": { "summary": "Операції з чеком", "get": { "summary": "Перегляд даних по чеку", "tags": [ "POS" ], "operationId": "get_api_v1_pos_receipts_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор чеку", "schema": { "type": "string" } }, { "name": "shift_id", "in": "query", "required": false, "description": "Ідентифікатор зміни", "schema": { "type": "string" } }, { "name": "title", "in": "query", "required": false, "description": "Назва", "schema": { "type": "string" } }, { "name": "total_amount", "in": "query", "required": false, "description": "Загальна ціна", "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "description": "Статус", "schema": { "type": "string" } }, { "name": "type", "in": "query", "required": false, "description": "Тип", "schema": { "type": "string" } }, { "name": "discount_type_id", "in": "query", "required": false, "description": "Тип знижки (0 - відсоток, 1 - грошовий еквівалент)", "schema": { "type": "string" } }, { "name": "discount_amount", "in": "query", "required": false, "description": "Розмір знижки (в грошовому еквіваленті)", "schema": { "type": "string" } }, { "name": "discount_percentage", "in": "query", "required": false, "description": "Розмір знижки (у відсотках)", "schema": { "type": "string" } }, { "name": "seller_id", "in": "query", "required": false, "description": "Ідентифікатор продавця", "schema": { "type": "string" } }, { "name": "items", "in": "query", "required": false, "description": "Перелік позицій в чеку", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } }, { "name": "terminal_id", "in": "query", "required": false, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } }, { "name": "cashier_name", "in": "query", "required": false, "description": "Касир (ПІБ)", "schema": { "type": "string" } }, { "name": "description", "in": "query", "required": false, "description": "Опис", "schema": { "type": "string" } }, { "name": "fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер", "schema": { "type": "string" } }, { "name": "tax_amount", "in": "query", "required": false, "description": "Інформація про подактки", "schema": { "type": "string" } }, { "name": "registrar_fiscal_number", "in": "query", "required": false, "description": "Фіскальний номер пРРО", "schema": { "type": "string" } }, { "name": "registrar_local_number", "in": "query", "required": false, "description": "Локальний номер пРРО", "schema": { "type": "string" } }, { "name": "rounding_amount", "in": "query", "required": false, "description": "Сума заокруглення", "schema": { "type": "string" } }, { "name": "offline_id", "in": "query", "required": false, "description": "Ідентифікатор офлайн зміни", "schema": { "type": "string" } }, { "name": "offline_seed", "in": "query", "required": false, "description": "Секретне число для режиму офлайн", "schema": { "type": "string" } }, { "name": "offline_local_number", "in": "query", "required": false, "description": "Локальний номер в межах офлайн пакету", "schema": { "type": "string" } }, { "name": "previous_receipt_hash", "in": "query", "required": false, "description": "Хеш попереднього чеку", "schema": { "type": "string" } }, { "name": "related_fiscal_number", "in": "query", "required": false, "description": "Зв'язаний фіскальний номер (наприклад для повернення)", "schema": { "type": "string" } }, { "name": "is_hidden", "in": "query", "required": false, "description": "Ознака прихованого чеку (службовий параметр)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "c3300e4b-df4a-4621-950f-f13c25237365", "cashier_name": "Nihil fugit aut facilis.", "created_at": "2021-03-22T13:52:04.772+02:00", "description": "Ut voluptatem ut. Ut et sit. Et quia vitae.", "discount_amount": "10.0", "discount_percentage": "10.0", "fiscal_number": "123456789012345", "is_hidden": false, "items": [ { "id": "5728b1fb-0570-42d0-93f2-211ede9952c2", "amount": "75.6", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.775+02:00", "description": null, "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Aut officiis corporis et.", "price": "50.4", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "1.5", "receipt_id": "c3300e4b-df4a-4621-950f-f13c25237365", "sku": "Fugiat non fugit aut.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.775+02:00" }, { "id": "5f2dfe96-52fc-41e6-b151-34b3b384be31", "amount": "75.6", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.777+02:00", "description": null, "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Quam est dolor ad.", "price": "50.4", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "1.5", "receipt_id": "c3300e4b-df4a-4621-950f-f13c25237365", "sku": "Excepturi rerum dolorum blanditiis.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.777+02:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 200 }, "terminal_id": 19971, "terminal_shift_id": null, "title": "Test receipt", "total_amount": "1200.0", "type": 0, "updated_at": "2021-03-22T13:52:04.772+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "put": { "summary": "Оновлення даних чеку", "tags": [ "POS" ], "operationId": "put_api_v1_pos_receipts_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор чеку", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "86450e56-481c-4d8f-8cbf-6c7fd674d529", "cashier_name": "Fugit omnis tempora asperiores.", "created_at": "2021-03-22T13:52:04.834+02:00", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "discount_amount": "15.0", "discount_percentage": "10.0", "fiscal_number": "123456789012345", "is_hidden": false, "items": [ { "id": "f2069c60-6d32-0139-cb95-44b301b90771", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.879+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "86450e56-481c-4d8f-8cbf-6c7fd674d529", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.879+02:00" }, { "id": "f2069d00-6d32-0139-cb95-44b301b90771", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.879+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "86450e56-481c-4d8f-8cbf-6c7fd674d529", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.879+02:00" }, { "id": "f2069d40-6d32-0139-cb95-44b301b90771", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:04.879+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "86450e56-481c-4d8f-8cbf-6c7fd674d529", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:04.879+02:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 23.5 }, "terminal_id": 19972, "terminal_shift_id": null, "title": "new receipt", "total_amount": "145.0", "type": 0, "updated_at": "2021-03-22T13:52:04.879+02:00" }, "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": "[Pos::ReceiptForm.new] \"wrong\" (String) has invalid type for :total_amount violates constraints (invalid value for Float(): \"wrong\" failed)" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "shift_id": { "type": [ "string", "null" ], "description": "Ідентифікатор зміни" }, "title": { "type": "string", "description": "Назва" }, "total_amount": { "type": "integer", "description": "Загальна ціна" }, "state": { "type": "integer", "description": "Статус" }, "type": { "type": "integer", "description": "Тип" }, "discount_type_id": { "type": "string", "description": "Тип знижки (0 - відсоток, 1 - грошовий еквівалент)" }, "discount_amount": { "type": "integer", "description": "Розмір знижки (в грошовому еквіваленті)" }, "discount_percentage": { "type": "string", "description": "Розмір знижки (у відсотках)" }, "seller_id": { "type": "integer", "description": "Ідентифікатор продавця" }, "items": { "type": "array", "items": { "type": "object" }, "description": "Перелік позицій в чеку" }, "shop_id": { "type": "string", "description": "Ідентифікатор торгової точки" }, "terminal_id": { "type": "string", "description": "Ідентифікатор терміналу" }, "cashier_name": { "type": "string", "description": "Касир (ПІБ)" }, "description": { "type": "string", "description": "Опис" }, "fiscal_number": { "type": "string", "description": "Фіскальний номер" }, "tax_amount": { "type": "object", "description": "Інформація про подактки" }, "registrar_fiscal_number": { "type": "string", "description": "Фіскальний номер пРРО" }, "registrar_local_number": { "type": "string", "description": "Локальний номер пРРО" }, "rounding_amount": { "type": "string", "description": "Сума заокруглення" }, "offline_id": { "type": "string", "description": "Ідентифікатор офлайн зміни" }, "offline_seed": { "type": "string", "description": "Секретне число для режиму офлайн" }, "offline_local_number": { "type": "string", "description": "Локальний номер в межах офлайн пакету" }, "previous_receipt_hash": { "type": "string", "description": "Хеш попереднього чеку" }, "related_fiscal_number": { "type": "string", "description": "Зв'язаний фіскальний номер (наприклад для повернення)" }, "is_hidden": { "type": "boolean", "description": "Ознака прихованого чеку (службовий параметр)" } }, "additionalProperties": true }, "example": { "id": "86450e56-481c-4d8f-8cbf-6c7fd674d529", "title": "new receipt", "total_amount": 145, "state": 2, "type": 0, "discount_amount": 15, "seller_id": 1, "shift_id": null, "fiscal_number": "123456789012345", "registrar_fiscal_number": "123456789054321", "cashier_name": "Fugit omnis tempora asperiores.", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "tax_amount": { "А": 23.5 }, "is_hidden": false, "items": [ { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." } ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Видалення чеку", "tags": [ "POS" ], "operationId": "delete_api_v1_pos_receipts_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Ідентифікатор чеку", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "c2bfc8a9-5c5e-44d9-ad84-debe130a7440", "cashier_name": "Dolorem molestiae eligendi ipsa.", "created_at": "2021-03-22T13:52:04.967+02:00", "description": "Neque alias voluptatem. Ratione temporibus perspiciatis. Dignissimos officia velit.", "discount_amount": "10.0", "discount_percentage": "10.0", "fiscal_number": "123456789012345", "is_hidden": false, "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 200 }, "terminal_id": 19974, "terminal_shift_id": null, "title": "Test receipt", "total_amount": "1200.0", "type": 0, "updated_at": "2021-03-22T13:52:04.967+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "shift_id": { "type": "string", "description": "Ідентифікатор зміни" }, "title": { "type": "string", "description": "Назва" }, "total_amount": { "type": "string", "description": "Загальна ціна" }, "state": { "type": "string", "description": "Статус" }, "type": { "type": "string", "description": "Тип" }, "discount_type_id": { "type": "string", "description": "Тип знижки (0 - відсоток, 1 - грошовий еквівалент)" }, "discount_amount": { "type": "string", "description": "Розмір знижки (в грошовому еквіваленті)" }, "discount_percentage": { "type": "string", "description": "Розмір знижки (у відсотках)" }, "seller_id": { "type": "string", "description": "Ідентифікатор продавця" }, "items": { "type": "string", "description": "Перелік позицій в чеку" }, "shop_id": { "type": "string", "description": "Ідентифікатор торгової точки" }, "terminal_id": { "type": "string", "description": "Ідентифікатор терміналу" }, "cashier_name": { "type": "string", "description": "Касир (ПІБ)" }, "description": { "type": "string", "description": "Опис" }, "fiscal_number": { "type": "string", "description": "Фіскальний номер" }, "tax_amount": { "type": "string", "description": "Інформація про подактки" }, "registrar_fiscal_number": { "type": "string", "description": "Фіскальний номер пРРО" }, "registrar_local_number": { "type": "string", "description": "Локальний номер пРРО" }, "rounding_amount": { "type": "string", "description": "Сума заокруглення" }, "offline_id": { "type": "string", "description": "Ідентифікатор офлайн зміни" }, "offline_seed": { "type": "string", "description": "Секретне число для режиму офлайн" }, "offline_local_number": { "type": "string", "description": "Локальний номер в межах офлайн пакету" }, "previous_receipt_hash": { "type": "string", "description": "Хеш попереднього чеку" }, "related_fiscal_number": { "type": "string", "description": "Зв'язаний фіскальний номер (наприклад для повернення)" }, "is_hidden": { "type": "string", "description": "Ознака прихованого чеку (службовий параметр)" } }, "additionalProperties": true } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/payment_transactions/{id}": { "summary": "Деталі транзакції", "get": { "summary": "Інформація про платіжну транзакцію", "tags": [ "POS" ], "operationId": "get_api_v1_pos_payment_transactions_id", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID параметр: id", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/pos/receipts/batch": { "summary": "Групова обробка", "post": { "summary": "Групове створення чеків", "tags": [ "POS" ], "operationId": "post_api_v1_pos_receipts_batch", "parameters": [], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": "5e815780-27f8-4d39-a3f7-72a3675199b7", "cashier_name": "Fugit omnis tempora asperiores.", "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "discount_amount": "15.0", "discount_percentage": null, "fiscal_number": "123456789012345", "is_hidden": false, "items": [ { "id": "afffe0f2-5aa7-4826-92b1-62f62eef0b08", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "5e815780-27f8-4d39-a3f7-72a3675199b7", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "f42ae26c-1cc0-4a65-a077-a1a41fa79b30", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "5e815780-27f8-4d39-a3f7-72a3675199b7", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "73595b37-f535-4049-9f22-884cfa6576f8", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "5e815780-27f8-4d39-a3f7-72a3675199b7", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 23.5 }, "terminal_id": null, "terminal_shift_id": null, "title": "new receipt", "total_amount": "145.0", "type": 0, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "29c5507b-c757-472a-8ae3-26820ed99c35", "cashier_name": "Fugit omnis tempora asperiores.", "created_at": "2021-03-22T13:52:05.085+02:00", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "discount_amount": "15.0", "discount_percentage": null, "fiscal_number": "123456789012345", "is_hidden": false, "items": [ { "id": "4cc94e2e-5bc9-432b-a2f8-6c99c4a98818", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "29c5507b-c757-472a-8ae3-26820ed99c35", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "fac9762e-04c7-4d48-b2c5-9969ee6c9258", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "29c5507b-c757-472a-8ae3-26820ed99c35", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "c37174e6-c3ec-4143-9d02-088299eba5a7", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "29c5507b-c757-472a-8ae3-26820ed99c35", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 23.5 }, "terminal_id": null, "terminal_shift_id": null, "title": "new receipt", "total_amount": "145.0", "type": 0, "updated_at": "2021-03-22T13:52:05.085+02:00" }, { "id": "ab0f787a-1e22-4e89-a4c0-1320eb4b7c36", "cashier_name": "Fugit omnis tempora asperiores.", "created_at": "2021-03-22T13:52:05.090+02:00", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "discount_amount": "15.0", "discount_percentage": null, "fiscal_number": "123456789012345", "is_hidden": false, "items": [ { "id": "efa94dce-0475-4dd3-887a-008d69c06413", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "ab0f787a-1e22-4e89-a4c0-1320eb4b7c36", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "59aceb04-20a4-45aa-b8d2-5391d5a3b84b", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "ab0f787a-1e22-4e89-a4c0-1320eb4b7c36", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" }, { "id": "0af9e35c-3389-400a-8a1b-07544674cb2c", "amount": "246.75", "classifier_code": null, "classifier_type_id": 0, "created_at": "2021-03-22T13:52:05.080+02:00", "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem.", "discount_amount": null, "is_free_price": false, "is_product": true, "name": "Temporibus maxime consequuntur illum.", "price": "70.5", "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "quantity": "3.5", "receipt_id": "ab0f787a-1e22-4e89-a4c0-1320eb4b7c36", "sku": "Amet quis consequuntur at.", "stock_item_id": 1, "tax_group_id": 1, "unit_type_id": 0, "unit_type_name": null, "updated_at": "2021-03-22T13:52:05.080+02:00" } ], "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 23.5 }, "terminal_id": null, "terminal_shift_id": null, "title": "new receipt", "total_amount": "145.0", "type": 0, "updated_at": "2021-03-22T13:52:05.090+02:00" } ], "meta": {} } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object" }, "example": { "errors": "[Pos::ReceiptBatchItemForm.new] \"wrong\" (String) has invalid type for :total_amount violates constraints (invalid value for Float(): \"wrong\" failed)" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "receipts": { "type": "array", "items": { "type": "object" } } }, "additionalProperties": true }, "example": { "receipts": [ { "title": "new receipt", "total_amount": 145, "state": 2, "type": 0, "discount_amount": 15, "seller_id": 1, "shift_id": null, "fiscal_number": "123456789012345", "registrar_fiscal_number": "123456789054321", "cashier_name": "Fugit omnis tempora asperiores.", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "tax_amount": { "А": 23.5 }, "is_hidden": false, "items": [ { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." } ] }, { "title": "new receipt", "total_amount": 145, "state": 2, "type": 0, "discount_amount": 15, "seller_id": 1, "shift_id": null, "fiscal_number": "123456789012345", "registrar_fiscal_number": "123456789054321", "cashier_name": "Fugit omnis tempora asperiores.", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "tax_amount": { "А": 23.5 }, "is_hidden": false, "items": [ { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." } ] }, { "title": "new receipt", "total_amount": 145, "state": 2, "type": 0, "discount_amount": 15, "seller_id": 1, "shift_id": null, "fiscal_number": "123456789012345", "registrar_fiscal_number": "123456789054321", "cashier_name": "Fugit omnis tempora asperiores.", "description": "Quia excepturi ducimus. Cum est corrupti. Vero quia placeat.", "tax_amount": { "А": 23.5 }, "is_hidden": false, "items": [ { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." }, { "name": "Temporibus maxime consequuntur illum.", "price": 70.5, "amount": 246.75, "quantity": 3.5, "sku": "Amet quis consequuntur at.", "tax_group_id": 1, "is_product": true, "product_id": "db8b8402-cd2a-4ad1-947f-bc521ca5f13f", "stock_item_id": 1, "unit_type_id": 0, "description": "Voluptate quis tenetur. In praesentium omnis. Hic eaque dolorem." } ] } ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] }, "delete": { "summary": "Групове видалення чеків", "tags": [ "POS" ], "operationId": "delete_api_v1_pos_receipts_batch", "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": "286af558-f7a8-4cc1-99cd-bdf536f04e70", "amount": "104.0", "approval_code": "000123", "batch": "123", "created_at": "2021-03-22T13:52:03.987+02:00", "description": null, "pan": "trancated pan", "pan_hash": "hash", "payload": { "merchant": "RETAILUT", "terminal": "UKRTRIMEXRETAIL" }, "payment_type_id": 0, "receipt": { "id": "908ee58a-43c8-4dac-97a6-21d153af35a1", "cashier_name": "Sapiente assumenda maiores optio.", "created_at": "2021-03-22T13:52:03.983+02:00", "description": "Ipsam porro saepe. Illum quod non. Occaecati quod culpa.", "discount_amount": "10.0", "discount_percentage": "10.0", "fiscal_number": "123456789012345", "is_hidden": false, "offline_id": null, "offline_local_number": null, "offline_seed": null, "previous_receipt_hash": null, "registrar_fiscal_number": "123456789054321", "registrar_local_number": null, "related_fiscal_number": null, "rounding_amount": null, "seller_id": 1, "shift_id": null, "shop_id": null, "state": 2, "tax_amount": { "А": 200 }, "terminal_id": 1, "terminal_shift_id": null, "title": "Test receipt", "total_amount": "1200.0", "type": 0, "updated_at": "2021-03-22T13:52:03.983+02:00" }, "receipt_id": "908ee58a-43c8-4dac-97a6-21d153af35a1", "result_code": "000", "rrn": "test_rrn", "signature": false, "stan": "12321", "state": 1, "timestamp": "2021-03-22T13:22:03.000+02:00", "transaction_type_id": 1, "updated_at": "2021-03-22T13:52:03.987+02:00" }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": true }, "example": { "ids": [ "b28f4b0a-8347-4964-b60d-ec16d431468b" ] } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/stats/product_daily_sales/alter": { "summary": "Звіт по товарам та послугам", "get": { "summary": "Запит отримання даних звіту по товарам та послугам", "tags": [ "Звітність" ], "operationId": "get_api_v1_stats_product_daily_sales_alter", "parameters": [ { "name": "date_start", "in": "query", "required": false, "description": "Дача початку виборки (формат ISO 8601)", "schema": { "type": "string" } }, { "name": "date_end", "in": "query", "required": false, "description": "Дача кінця виборки (формат ISO 8601)", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": { "id": 0, "products": [ { "id": "53dc610f-f9c2-4c96-a9bf-663c3fe2f780", "category_id": "c73aeff8-b54a-42be-a498-f3b31d40eb77", "number": "1516986502", "picture": { "id": "fa649f220325d7c06bd146c0f9bcd26b", "filename": "test.png", "mime_type": "image/png", "size": 8132, "url": "http://localhost/uploads/store/fa649f220325d7c06bd146c0f9bcd26b" }, "popularity": "100.0", "price": "8677.0", "subgroup_id": null, "subgroup_title": null, "title": "Ut soluta nam quis.", "total_amount": "75.6", "total_count": "1.5", "unit_type_id": 0, "unit_type_name": null } ], "total_amount": 75.6, "total_count": 1.5 }, "meta": {} } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } }, "/api/v1/reports/z-reports": { "summary": "Список Z-звітів", "get": { "summary": "Запит списку Z-звітів", "tags": [ "Звітність" ], "operationId": "get_api_v1_reports_z-reports", "parameters": [ { "name": "date_start", "in": "query", "required": false, "description": "Дача початку виборки (формат ISO 8601)", "schema": { "type": "string" } }, { "name": "date_end", "in": "query", "required": false, "description": "Дача кінця виборки (формат ISO 8601)", "schema": { "type": "string" } }, { "name": "termianl_user_id", "in": "query", "required": false, "description": "Ідентифікатор касира", "schema": { "type": "string" } }, { "name": "terminal_id", "in": "query", "required": false, "description": "Ідентифікатор терміналу", "schema": { "type": "string" } }, { "name": "shop_id", "in": "query", "required": false, "description": "Ідентифікатор торгової точки", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" }, "example": { "data": [ { "id": 51, "cash_amount": 0, "cash_receipts_count": 4, "cash_total": 12276.25, "created_at": "2021-08-06T13:23:09.020+00:00", "fiscal_number": "7069483", "payload": { "cash": { "total": 12276.25, "commission": 0, "receipts_count": 4 }, "timestamp": "1618495142092", "cash_amount": 0, "cashierName": "Андрій Миколайович Солопчук", "fiscalNumber": "7069483", "service_input": 0, "service_output": 0, "turnover_amount": 0, "registrarLocalNumber": "1", "registrarFiscalNumber": "4000026885" }, "refund_cash_total": 0, "refund_cashless_total": 0, "refund_receipts_count": 0, "refund_tax_a_total": 0, "refund_tax_b_total": 0, "refund_tax_d_total": 0, "refund_tax_v_total": 0, "refund_tax_z_total": 0, "refund_total": 0, "registrar_fiscal_number": "4000026885", "sale_cash_total": 0, "sale_cashless_total": 0, "sale_receipts_count": 0, "sale_tax_a_total": 0, "sale_tax_b_total": 0, "sale_tax_d_total": 0, "sale_tax_v_total": 0, "sale_tax_z_total": 0, "sale_total": 0, "service_input": 0, "service_output": 0, "shift": { "id": "55dc9a5e-9308-4bfc-a3b7-382a67667aa9", "cash_balance": "0.99", "closed_at": null, "closed_by": null, "device_uid": "8133c494-7c2f-4441-b913-20cfd06e1eda", "employee_id": null, "fiscal_number": "Eum et esse dolorem.", "opened_at": "2021-08-09T08:23:08.995+00:00", "opened_by": "John Dow", "registrar_fiscal_number": null, "remote_shift_id": "5b3ab3a8-7ddf-4d7a-a45a-109745043314", "state": 0, "terminal_id": null, "terminal_user_id": 46 }, "shift_id": "55dc9a5e-9308-4bfc-a3b7-382a67667aa9", "shop": { "id": 155, "business_category_id": 1, "created_at": "2021-08-09T13:23:09.000+00:00", "email": "maynard@renner.info", "employees_count": 0, "fiscal_numbers": [], "fiscalization_enabled": false, "is_excise_taxation": false, "is_vat_taxation": true, "owner_id": 1025, "phone_number": "0971234567", "state": 0, "terminals_count": 0, "title": "Test shop", "updated_at": "2021-08-09T13:23:09.000+00:00", "website_url": "https://www.example.com" }, "shop_id": 155, "terminal_id": 297, "terminal_user_name": "Щастислав Павленко", "turnover_amount": 0 } ], "meta": { "current_page": 1, "next_page": null, "prev_page": null, "total_pages": 1, "total_count": 1, "limit_value": 25, "offset_value": 0 } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "object", "description": "Об'єкт з помилками валідації" } } } } } } }, "security": [ { "ApiKeyAuth": [], "BearerAuth": [] } ] } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "X-Api-Key", "description": "API ключ для аутентифікації. Кожен запит повинен містити цей заголовок." }, "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "JWT токен для авторизації користувача. Отримується при аутентифікації через /api/v1/auth/sessions" } }, "schemas": { "Product": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор товару" }, "remote_id": { "type": "string", "description": "Ідентифікатор товару в зовнішній системі користувача" }, "number": { "type": "string", "description": "Штрих-код" }, "title": { "type": "string", "description": "Назва товару" }, "unit_type_id": { "type": "number", "description": "Код одиниці виміру" }, "price": { "type": "number", "description": "Ціна за одиницю" }, "procurement_price": { "type": "number", "description": "Ціна закупки" }, "alter_title": { "type": "string", "description": "Коротка назва" }, "alter_number": { "type": "string", "description": "Артикул" }, "category_id": { "type": "string", "description": "Ідентифікатор каталогу" }, "sold_by_weight": { "type": "boolean", "description": "Ознака вагового товарту" }, "is_free_price": { "type": "boolean", "description": "Ознака продажу по вільній ціні" }, "classifier_code": { "type": "string", "description": "Код класифікатора" }, "classifier_type_id": { "type": "string", "description": "Тип класифікатора:" }, "tax_group_id": { "type": "string", "description": "Ідентифікатор податкової групи:" }, "subgroup_id": { "type": "number", "description": "Ідентифікатор товарної підгрупи" }, "picture": { "type": "object", "description": "Об'єкт файлу для підвантаження" }, "bookmark_ids": { "type": "array", "description": "Помітки" } }, "required": [ "id", "title", "price" ] }, "Receipt": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор чеку" }, "shift_id": { "type": "string", "description": "Ідентифікатор зміни" }, "title": { "type": "string", "description": "Назва" }, "total_amount": { "type": "number", "description": "Загальна ціна" }, "state": { "type": "number", "description": "Статус:" }, "type": { "type": "number", "description": "Тип:" }, "discount_type_id": { "type": "number", "description": "Тип знижки:" }, "discount_amount": { "type": "number", "description": "Розмір знижки (в грошовому еквіваленті)" }, "discount_percentage": { "type": "number", "description": "Розмір знижки (у відсотках)" }, "seller_id": { "type": "number", "description": "Ідентифікатор продавця" }, "items": { "type": "array", "description": "Перелік позицій в чеку" }, "shop_id": { "type": "number", "description": "Ідентифікатор торгової точки" }, "terminal_id": { "type": "number", "description": "Ідентифікатор терміналу" }, "cashier_name": { "type": "string", "description": "Касир (ПІБ)" }, "description": { "type": "string", "description": "Опис" }, "fiscal_number": { "type": "string", "description": "Фіскальний номер" }, "tax_amount": { "type": "string", "description": "Інформація про подактки" }, "registrar_fiscal_number": { "type": "string", "description": "Фіскальний номер пРРО" }, "registrar_local_number": { "type": "string", "description": "Локальний номер пРРО" }, "rounding_amount": { "type": "number", "description": "Сума заокруглення" }, "offline_id": { "type": "number", "description": "Ідентифікатор офлайн зміни" }, "offline_seed": { "type": "string", "description": "Секретне число для режиму офлайн" }, "offline_local_number": { "type": "number", "description": "Локальний номер в межах офлайн пакету" }, "previous_receipt_hash": { "type": "string", "description": "Хеш попереднього чеку" }, "related_fiscal_number": { "type": "string", "description": "Зв'язаний фіскальний номер (наприклад для повернення)" }, "payment_transactions": { "type": "array", "description": "Платіжні транзакції" } } }, "Transaction": { "type": "object", "properties": { "id": { "type": "string", "description": "Ідентифікатор транзакції" }, "amount": { "type": "number", "description": "Сума транзакції" }, "approval_code": { "type": "string", "description": "Код авторизації" }, "batch": { "type": "string", "description": "Номер транзакції в батчі" }, "deposit_amount": { "type": "number", "description": "Кількість коштів внесених готівкою" }, "change_amount": { "type": "number", "description": "Решта" }, "description": { "type": "string", "description": "Опис" }, "pan": { "type": "string", "description": "Маскований номер картки" }, "payment_type_id": { "type": "string", "description": "Тип операції:" }, "receipt_id": { "type": "number", "description": "Ідентифікатор чеку" }, "rrn": { "type": "string", "description": "RRN" }, "state": { "type": "number", "description": "Статус" }, "timestamp": { "type": "string", "description": "Дата та час проведення операції" }, "transaction_type_id": { "type": "number", "description": "Засоби оплати:" } }, "required": [ "id", "amount", "receipt_id", "rrn", "transaction_type_id" ] } } }, "security": [ { "ApiKeyAuth": [] } ] }