Skip to content

Instantly share code, notes, and snippets.

@JrooTJunior
Created July 22, 2020 07:34
Show Gist options
  • Save JrooTJunior/282a800582fe9eb12746d00521608bba to your computer and use it in GitHub Desktop.
Save JrooTJunior/282a800582fe9eb12746d00521608bba to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.2",
"info": {
"title": "SRSO API",
"description": "Core API of Software Registrar of Settlement Operations",
"version": "0.1.0"
},
"paths": {
"/api/v1/cashier/signin": {
"post": {
"tags": [
"Cashier"
],
"summary": "Sign In Cashier",
"description": "Вхід користувача (касира) за допомогою логіна та паролю",
"operationId": "sign_in_cashier_api_v1_cashier_signin_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashierSignIn"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashierAccessTokenResponseModel"
}
}
}
},
"403": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/cashier/signinSignature": {
"post": {
"tags": [
"Cashier"
],
"summary": "Sign In Cashier Via Signature",
"description": "Вхід користувача (касира) за допомогою КЕП. Необхідно для касирів з типом підпису \"API\"",
"operationId": "sign_in_cashier_via_signature_api_v1_cashier_signinSignature_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashierSignInSignature"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashierAccessTokenResponseModel"
}
}
}
},
"403": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/cashier/signinPinCode": {
"post": {
"tags": [
"Cashier"
],
"summary": "Sign In Cashier Via Pin Code",
"description": "Вхід користувача (касира) за допомогою пін-коду. Необхідно для касових реєстраторів типу \"AGENT\"",
"operationId": "sign_in_cashier_via_pin_code_api_v1_cashier_signinPinCode_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashierSignInPinCode"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashierAccessTokenResponseModel"
}
}
}
},
"403": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cash register license key": [
]
}
]
}
},
"/api/v1/cashier/signout": {
"post": {
"tags": [
"Cashier"
],
"summary": "Sign Out Cashier",
"description": "Завершення сесії користувача (касира) з поточним токеном доступу",
"operationId": "sign_out_cashier_api_v1_cashier_signout_post",
"responses": {
"205": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/cashier/me": {
"get": {
"tags": [
"Cashier"
],
"summary": "Get Cashier Profile",
"description": "Отримання інформації про поточного користувача (касира)",
"operationId": "get_cashier_profile_api_v1_cashier_me_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedCashierModel"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/cashier/shift": {
"get": {
"tags": [
"Cashier"
],
"summary": "Get Cashier Shift",
"description": "Отримання інформації про активну зміну користувача (касира)",
"operationId": "get_cashier_shift_api_v1_cashier_shift_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShiftWithCashRegisterModel"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/cash-registers": {
"get": {
"tags": [
"Cash register"
],
"summary": "Get Cash Registers",
"description": "Отримання касових реєстраторів",
"operationId": "get_cash_registers_api_v1_cash_registers_get",
"parameters": [
{
"required": false,
"schema": {
"title": "Limit",
"maximum": 100.0,
"exclusiveMinimum": 0.0,
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Offset",
"minimum": 0.0,
"type": "integer",
"default": 0
},
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResult_DetailedCashRegisterModel_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/cash-registers/info": {
"get": {
"tags": [
"Cash register"
],
"summary": "Get Cash Register Info",
"description": "Отримання інформації про касовий реєстратор за ключем ліцензії. Необхідно для агенту РРО.",
"operationId": "get_cash_register_info_api_v1_cash_registers_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CashRegisterDeviceModel"
}
}
}
}
},
"security": [
{
"Cash register license key": [
]
}
]
}
},
"/api/v1/cash-registers/{cash_register_id}": {
"get": {
"tags": [
"Cash register"
],
"summary": "Get Cash Register",
"description": "Отримання інформації про касовий реєстратор",
"operationId": "get_cash_register_api_v1_cash_registers__cash_register_id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Cash Register Id",
"type": "string",
"format": "uuid"
},
"name": "cash_register_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedCashRegisterModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/cash-registers/{cash_register_id}/shifts": {
"get": {
"tags": [
"Cash register"
],
"summary": "Get Shifts",
"description": "Отримання списку змін на даному касовому реєстраторі відсортованих по статусу та часу оновлення",
"operationId": "get_shifts_api_v1_cash_registers__cash_register_id__shifts_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Cash Register Id",
"type": "string",
"format": "uuid"
},
"name": "cash_register_id",
"in": "path"
},
{
"required": false,
"schema": {
"title": "Show only specified shift statuses",
"type": "array",
"items": {
"enum": [
"CREATED",
"OPENING",
"OPENED",
"CLOSING",
"CLOSED"
]
}
},
"name": "statuses",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Limit",
"maximum": 100.0,
"exclusiveMinimum": 0.0,
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Offset",
"minimum": 0.0,
"type": "integer",
"default": 0
},
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResult_ShiftWithCashierModel_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Shifts",
"description": "Отримання змін поточного користувача (касира)",
"operationId": "get_shifts_api_v1_shifts_get",
"parameters": [
{
"required": false,
"schema": {
"title": "Show only specified shift statuses",
"type": "array",
"items": {
"enum": [
"CREATED",
"OPENING",
"OPENED",
"CLOSING",
"CLOSED"
]
}
},
"name": "statuses",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Limit",
"maximum": 100.0,
"exclusiveMinimum": 0.0,
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Offset",
"minimum": 0.0,
"type": "integer",
"default": 0
},
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResult_ShiftWithCashRegisterModel_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
},
"post": {
"tags": [
"Shifts"
],
"summary": "Create Shift",
"description": "Відкриття нової зміни користувачем (касиром).\n\nДля створення зміни необхідно вказати ключ ліцензії конкретного касового реєстратора поточної точки продажу.\n\nСтворюється об'єкт зміни в стані \"CREATED\" та транзакція відкриття зміни (поле \"initial_transaction_id\").\n\nДля переведення зміни в статус OPENED необхідно щоб транзакція була підписана за допомогою КЕП та доставлена в ДПС.\n\nСтатус зміни можна відслідковувати за допомогою GET запиту по шляху /api/v1/shifts/{shift_id},\nде {shift_id} - ідентифікатор зміни.\n\nПісля того як робочу зміну буде успішно відкрито можна її закрити або створювати чеки.",
"operationId": "create_shift_api_v1_shifts_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateShiftPayload"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShiftModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Shift",
"description": "Отримання інформації про зміну",
"operationId": "get_shift_api_v1_shifts__shift_id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShiftWithCashierAndCashRegister"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/close": {
"post": {
"tags": [
"Shifts"
],
"summary": "Close Shift",
"description": "Закриття поточної зміни користувачем (касиром).\n\nСтан зміни встановлюється як \"CLOSING\" та транзакція закриття зміни (поле \"closing_transaction_id\").\n\nДля переведення зміни в статус CLOSED необхідно щоб транзакція була підписана за допомогою КЕП та доставлена в ДПС.\n\nСтатус зміни можна відслідковувати за допомогою GET запиту по шляху /api/v1/shifts/{shift_id},\nде {shift_id} - ідентифікатор зміни.\n\nПісля закриття зміни в її рамках більше не можливо буде виконувати дії.\nДля продовження роботи потрібно створити нову зміну.",
"operationId": "close_shift_api_v1_shifts__shift_id__close_post",
"parameters": [
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"202": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Receipts",
"description": "Отримання списку чеків в рамках поточної зміни",
"operationId": "get_receipts_api_v1_shifts__shift_id__receipt_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
},
{
"required": false,
"schema": {
"title": "Limit",
"maximum": 100.0,
"exclusiveMinimum": 0.0,
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Offset",
"minimum": 0.0,
"type": "integer",
"default": 0
},
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResult_ReceiptModel_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt/{receipt_id}": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Receipt",
"description": "Отримання інформації про чек.",
"operationId": "get_receipt_api_v1_shifts__shift_id__receipt__receipt_id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Receipt Id",
"type": "string",
"format": "uuid"
},
"name": "receipt_id",
"in": "path"
},
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReceiptModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt/{receipt_id}/html": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Receipt Html",
"description": "Отримання HTML представлення чека.",
"operationId": "get_receipt_html_api_v1_shifts__shift_id__receipt__receipt_id__html_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Receipt Id",
"type": "string",
"format": "uuid"
},
"name": "receipt_id",
"in": "path"
},
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt/{receipt_id}/pdf": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Receipt Pdf",
"description": "Отримання PDF представлення чека.",
"operationId": "get_receipt_pdf_api_v1_shifts__shift_id__receipt__receipt_id__pdf_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Receipt Id",
"type": "string",
"format": "uuid"
},
"name": "receipt_id",
"in": "path"
},
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt/{receipt_id}/text": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Receipt Text",
"description": "Отримання текстового представлення чека для термопринтеру.",
"operationId": "get_receipt_text_api_v1_shifts__shift_id__receipt__receipt_id__text_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Receipt Id",
"type": "string",
"format": "uuid"
},
"name": "receipt_id",
"in": "path"
},
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
},
{
"description": "Print area width in characters",
"required": false,
"schema": {
"title": "Print area width",
"type": "integer",
"description": "Print area width in characters"
},
"name": "width",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt/{receipt_id}/qrcode": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Receipt Qr Code Image",
"description": "Отримання зображення qr коду чека.",
"operationId": "get_receipt_qr_code_image_api_v1_shifts__shift_id__receipt__receipt_id__qrcode_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Receipt Id",
"type": "string",
"format": "uuid"
},
"name": "receipt_id",
"in": "path"
},
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/receipt/sell": {
"post": {
"tags": [
"Shifts"
],
"summary": "Create Sell Receipt",
"description": "Створення чеку продажу, його фіскалізація та доставка клієнту по email.",
"operationId": "create_sell_receipt_api_v1_shifts__shift_id__receipt_sell_post",
"parameters": [
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReceiptSellPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReceiptModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/reports": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Reports",
"description": "Отримання звітів в поточній зміні",
"operationId": "get_reports_api_v1_shifts__shift_id__reports_get",
"parameters": [
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
},
{
"required": false,
"schema": {
"title": "Limit",
"maximum": 100.0,
"exclusiveMinimum": 0.0,
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Offset",
"minimum": 0.0,
"type": "integer",
"default": 0
},
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResult_ReportModel_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
},
"post": {
"tags": [
"Shifts"
],
"summary": "Create X Report",
"description": "Створення X звіту",
"operationId": "create_x_report_api_v1_shifts__shift_id__reports_post",
"parameters": [
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReportModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/shifts/{shift_id}/reports/{report_id}": {
"get": {
"tags": [
"Shifts"
],
"summary": "Get Report",
"description": "Отримання звіту",
"operationId": "get_report_api_v1_shifts__shift_id__reports__report_id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Report Id",
"type": "string",
"format": "uuid"
},
"name": "report_id",
"in": "path"
},
{
"required": true,
"schema": {
"title": "Shift Id",
"type": "string",
"format": "uuid"
},
"name": "shift_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/transactions": {
"get": {
"tags": [
"Transactions"
],
"summary": "Get Transactions",
"operationId": "get_transactions_api_v1_transactions_get",
"parameters": [
{
"required": false,
"schema": {
"title": "Status",
"type": "array",
"items": {
"enum": [
"CREATED",
"PENDING",
"SIGNED",
"DELIVERED",
"DONE",
"ERROR"
]
}
},
"name": "status",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Type",
"type": "array",
"items": {
"enum": [
"SHIFT_OPEN",
"X_REPORT",
"Z_REPORT",
"PING",
"RECEIPT",
"LAST_RECEIPT"
]
}
},
"name": "type",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Limit",
"maximum": 100.0,
"exclusiveMinimum": 0.0,
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Offset",
"minimum": 0.0,
"type": "integer",
"default": 0
},
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResult_ShortTransaction_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/transactions/{transaction_id}": {
"get": {
"tags": [
"Transactions"
],
"summary": "Get Transaction",
"operationId": "get_transaction_api_v1_transactions__transaction_id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Transaction Id",
"type": "string",
"format": "uuid"
},
"name": "transaction_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
},
"patch": {
"tags": [
"Transactions"
],
"summary": "Update Transaction",
"operationId": "update_transaction_api_v1_transactions__transaction_id__patch",
"parameters": [
{
"required": true,
"schema": {
"title": "Transaction Id",
"type": "string",
"format": "uuid"
},
"name": "transaction_id",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateTransactionPayload"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionModel"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Cashier JWT token": [
]
}
]
}
},
"/api/v1/tax": {
"get": {
"tags": [
"Tax rates"
],
"summary": "Get All Taxes",
"operationId": "get_all_taxes_api_v1_tax_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get All Taxes Api V1 Tax Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/TaxModel"
}
}
}
}
}
},
"security": [
{
"Cash register license key": [
]
}
]
}
}
},
"components": {
"schemas": {
"BranchModel": {
"title": "BranchModel",
"required": [
"id",
"name",
"address",
"organization",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"name": {
"title": "Name",
"type": "string"
},
"address": {
"title": "Address",
"type": "string"
},
"organization": {
"$ref": "#/components/schemas/OrganizationModel"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"CardPaymentPayload": {
"title": "CardPaymentPayload",
"required": [
"value",
"card_mask"
],
"type": "object",
"properties": {
"value": {
"title": "Value",
"type": "integer"
},
"label": {
"title": "Label",
"maxLength": 128,
"minLength": 1,
"type": "string",
"default": "Картка"
},
"card_mask": {
"title": "Card Mask",
"type": "string"
}
}
},
"CashRegisterDeviceModel": {
"title": "CashRegisterDeviceModel",
"required": [
"id",
"fiscal_number",
"created_at",
"address",
"title"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"fiscal_number": {
"title": "Fiscal Number",
"type": "string"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"address": {
"title": "Address",
"type": "string"
},
"title": {
"title": "Title",
"type": "string"
}
}
},
"CashRegisterModel": {
"title": "CashRegisterModel",
"required": [
"id",
"fiscal_number",
"type",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"fiscal_number": {
"title": "Fiscal Number",
"type": "string"
},
"type": {
"title": "Type",
"enum": [
"API",
"AGENT"
]
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"CashierAccessTokenResponseModel": {
"title": "CashierAccessTokenResponseModel",
"required": [
"access_token"
],
"type": "object",
"properties": {
"type": {
"title": "Authentication type",
"type": "string"
},
"access_token": {
"title": "JWT token",
"type": "string"
}
}
},
"CashierModel": {
"title": "CashierModel",
"required": [
"id",
"branch_id",
"full_name",
"nin",
"certificate_id",
"signature_type",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"branch_id": {
"title": "Branch Id",
"type": "string",
"format": "uuid"
},
"full_name": {
"title": "Full Name",
"type": "string"
},
"nin": {
"title": "Nin",
"type": "string"
},
"certificate_id": {
"title": "Certificate Id",
"type": "string"
},
"signature_type": {
"title": "Signature Type",
"enum": [
"AGENT",
"UKEY",
"DEPOSITSIGN"
]
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"CashierSignIn": {
"title": "CashierSignIn",
"required": [
"login",
"password"
],
"type": "object",
"properties": {
"login": {
"title": "Cashier login",
"type": "string"
},
"password": {
"title": "Personal cashier password",
"type": "string"
}
}
},
"CashierSignInPinCode": {
"title": "CashierSignInPinCode",
"required": [
"pin_code"
],
"type": "object",
"properties": {
"pin_code": {
"title": "Cashier PIN-code",
"type": "string"
}
}
},
"CashierSignInSignature": {
"title": "CashierSignInSignature",
"required": [
"signature"
],
"type": "object",
"properties": {
"signature": {
"title": "Base64-encoded signature of current timestamp in iso8601",
"type": "string",
"format": "byte"
}
}
},
"CreateShiftPayload": {
"title": "CreateShiftPayload",
"required": [
"license_key"
],
"type": "object",
"properties": {
"license_key": {
"title": "License Key",
"type": "string"
}
}
},
"DeliveryPayload": {
"title": "DeliveryPayload",
"type": "object",
"properties": {
"email": {
"title": "Email",
"type": "string",
"format": "email"
}
}
},
"DetailedCashRegisterModel": {
"title": "DetailedCashRegisterModel",
"required": [
"id",
"fiscal_number",
"type",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"fiscal_number": {
"title": "Fiscal Number",
"type": "string"
},
"type": {
"title": "Type",
"enum": [
"API",
"AGENT"
]
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"shift": {
"$ref": "#/components/schemas/ShiftWithCashierModel"
}
}
},
"DetailedCashierModel": {
"title": "DetailedCashierModel",
"required": [
"id",
"branch_id",
"full_name",
"nin",
"certificate_id",
"signature_type",
"created_at",
"branch"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"branch_id": {
"title": "Branch Id",
"type": "string",
"format": "uuid"
},
"full_name": {
"title": "Full Name",
"type": "string"
},
"nin": {
"title": "Nin",
"type": "string"
},
"certificate_id": {
"title": "Certificate Id",
"type": "string"
},
"signature_type": {
"title": "Signature Type",
"enum": [
"AGENT",
"UKEY",
"DEPOSITSIGN"
]
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"branch": {
"$ref": "#/components/schemas/BranchModel"
}
}
},
"DiscountPayload": {
"title": "DiscountPayload",
"required": [
"type",
"mode",
"value"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
"enum": [
"DISCOUNT",
"EXTRA_CHARGE"
],
"type": "string"
},
"mode": {
"title": "Mode",
"enum": [
"PERCENT",
"VALUE"
],
"type": "string"
},
"value": {
"title": "Value",
"exclusiveMinimum": 0.0,
"type": "number"
}
}
},
"GoodItemPayload": {
"title": "GoodItemPayload",
"required": [
"code",
"name",
"price",
"quantity"
],
"type": "object",
"properties": {
"code": {
"title": "Code",
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"barcode": {
"title": "Barcode",
"maxLength": 4096,
"type": "string"
},
"name": {
"title": "Name",
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"header": {
"title": "Text above item",
"maxLength": 1024,
"type": "string"
},
"footer": {
"title": "Text below item",
"maxLength": 1024,
"type": "string"
},
"price": {
"title": "Cost in kopecks for quantity = 1000)",
"minimum": 0.0,
"type": "integer"
},
"quantity": {
"title": "Quantity value always has 1000 dimension (1 piece = 1000, 2.25 kg = 2250)",
"minimum": 0.0,
"type": "integer"
},
"tax": {
"title": "TAX groups ids. Is empty if good has TAX exemption",
"maxItems": 2,
"type": "array",
"items": {
"type": "integer"
}
},
"discount": {
"title": "Discounts or extra charges",
"type": "array",
"items": {
"$ref": "#/components/schemas/DiscountPayload"
}
}
}
},
"GoodTaxModel": {
"title": "GoodTaxModel",
"required": [
"code",
"label",
"symbol",
"rate",
"value"
],
"type": "object",
"properties": {
"code": {
"title": "Code",
"type": "integer"
},
"label": {
"title": "Label",
"type": "string"
},
"symbol": {
"title": "Symbol",
"type": "string"
},
"rate": {
"title": "Rate",
"type": "integer"
},
"value": {
"title": "Value",
"type": "integer"
}
}
},
"GoodsModel": {
"title": "GoodsModel",
"required": [
"code",
"name",
"price",
"quantity",
"sum"
],
"type": "object",
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"barcode": {
"title": "Barcode",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"header": {
"title": "Header",
"type": "string"
},
"footer": {
"title": "Footer",
"type": "string"
},
"price": {
"title": "Price",
"type": "integer"
},
"quantity": {
"title": "Quantity",
"type": "integer"
},
"sum": {
"title": "Sum",
"type": "integer"
},
"taxes": {
"title": "Taxes",
"type": "array",
"items": {
"$ref": "#/components/schemas/GoodTaxModel"
}
}
}
},
"HTTPError": {
"title": "HTTPError",
"required": [
"detail"
],
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "string",
"description": "Detailed error message"
}
}
},
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"OrganizationModel": {
"title": "OrganizationModel",
"required": [
"id",
"title",
"edrpou",
"tax_number",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"title": {
"title": "Title",
"type": "string"
},
"edrpou": {
"title": "Edrpou",
"type": "string"
},
"tax_number": {
"title": "Tax Number",
"type": "string"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"PaginatedResult_DetailedCashRegisterModel_": {
"title": "PaginatedResult[DetailedCashRegisterModel]",
"required": [
"meta",
"results"
],
"type": "object",
"properties": {
"meta": {
"title": "Pagination metadata",
"allOf": [
{
"$ref": "#/components/schemas/PaginationMeta"
}
]
},
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/DetailedCashRegisterModel"
}
}
},
"description": "Пагінований результат"
},
"PaginatedResult_ReceiptModel_": {
"title": "PaginatedResult[ReceiptModel]",
"required": [
"meta",
"results"
],
"type": "object",
"properties": {
"meta": {
"title": "Pagination metadata",
"allOf": [
{
"$ref": "#/components/schemas/PaginationMeta"
}
]
},
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ReceiptModel"
}
}
},
"description": "Пагінований результат"
},
"PaginatedResult_ReportModel_": {
"title": "PaginatedResult[ReportModel]",
"required": [
"meta",
"results"
],
"type": "object",
"properties": {
"meta": {
"title": "Pagination metadata",
"allOf": [
{
"$ref": "#/components/schemas/PaginationMeta"
}
]
},
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ReportModel"
}
}
},
"description": "Пагінований результат"
},
"PaginatedResult_ShiftWithCashRegisterModel_": {
"title": "PaginatedResult[ShiftWithCashRegisterModel]",
"required": [
"meta",
"results"
],
"type": "object",
"properties": {
"meta": {
"title": "Pagination metadata",
"allOf": [
{
"$ref": "#/components/schemas/PaginationMeta"
}
]
},
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ShiftWithCashRegisterModel"
}
}
},
"description": "Пагінований результат"
},
"PaginatedResult_ShiftWithCashierModel_": {
"title": "PaginatedResult[ShiftWithCashierModel]",
"required": [
"meta",
"results"
],
"type": "object",
"properties": {
"meta": {
"title": "Pagination metadata",
"allOf": [
{
"$ref": "#/components/schemas/PaginationMeta"
}
]
},
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ShiftWithCashierModel"
}
}
},
"description": "Пагінований результат"
},
"PaginatedResult_ShortTransaction_": {
"title": "PaginatedResult[ShortTransaction]",
"required": [
"meta",
"results"
],
"type": "object",
"properties": {
"meta": {
"title": "Pagination metadata",
"allOf": [
{
"$ref": "#/components/schemas/PaginationMeta"
}
]
},
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ShortTransaction"
}
}
},
"description": "Пагінований результат"
},
"PaginationMeta": {
"title": "PaginationMeta",
"required": [
"total",
"count",
"limit",
"offset"
],
"type": "object",
"properties": {
"total": {
"title": "Total records count",
"type": "integer"
},
"count": {
"title": "Records on current page",
"type": "integer"
},
"limit": {
"title": "Records per page",
"type": "integer"
},
"offset": {
"title": "Current offset",
"type": "integer"
}
}
},
"PaymentModel": {
"title": "PaymentModel",
"required": [
"label",
"value"
],
"type": "object",
"properties": {
"label": {
"title": "Label",
"type": "string"
},
"value": {
"title": "Value",
"type": "integer"
}
}
},
"PaymentPayload": {
"title": "PaymentPayload",
"required": [
"value"
],
"type": "object",
"properties": {
"value": {
"title": "Value",
"type": "integer"
},
"label": {
"title": "Label",
"maxLength": 128,
"minLength": 1,
"type": "string",
"default": "Готівка"
}
}
},
"ReceiptModel": {
"title": "ReceiptModel",
"required": [
"id",
"transaction_id",
"serial",
"status",
"shift",
"goods",
"payments",
"total_sum",
"total_payment",
"total_rest",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"transaction_id": {
"title": "Transaction Id",
"type": "string",
"format": "uuid"
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"DONE",
"ERROR"
]
},
"shift": {
"$ref": "#/components/schemas/ShiftWithCashierAndCashRegister"
},
"goods": {
"title": "Goods",
"type": "array",
"items": {
"$ref": "#/components/schemas/GoodsModel"
}
},
"payments": {
"title": "Payments",
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentModel"
}
},
"total_sum": {
"title": "Total Sum",
"type": "integer"
},
"total_payment": {
"title": "Total Payment",
"type": "integer"
},
"total_rest": {
"title": "Total Rest",
"type": "integer"
},
"fiscal_code": {
"title": "Fiscal Code",
"type": "string"
},
"fiscal_date": {
"title": "Fiscal Date",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"ReceiptSellPayload": {
"title": "ReceiptSellPayload",
"required": [
"goods"
],
"type": "object",
"properties": {
"goods": {
"title": "Goods",
"type": "array",
"items": {
"$ref": "#/components/schemas/GoodItemPayload"
}
},
"delivery": {
"$ref": "#/components/schemas/DeliveryPayload"
},
"payments": {
"title": "Payments",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/PaymentPayload"
},
{
"$ref": "#/components/schemas/CardPaymentPayload"
}
]
},
"default": [
]
}
}
},
"ReportModel": {
"title": "ReportModel",
"required": [
"id",
"serial",
"payments",
"taxes",
"sell_receipts_count",
"return_receipts_count",
"transfers_count",
"transfers_sum",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"serial": {
"title": "Serial",
"type": "integer"
},
"payments": {
"title": "Payments",
"type": "array",
"items": {
"$ref": "#/components/schemas/ReportPaymentsModel"
}
},
"taxes": {
"title": "Taxes",
"type": "array",
"items": {
"$ref": "#/components/schemas/ReportTaxesModel"
}
},
"sell_receipts_count": {
"title": "Sell Receipts Count",
"type": "integer"
},
"return_receipts_count": {
"title": "Return Receipts Count",
"type": "integer"
},
"transfers_count": {
"title": "Transfers Count",
"type": "integer"
},
"transfers_sum": {
"title": "Transfers Sum",
"type": "integer"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"ReportPaymentsModel": {
"title": "ReportPaymentsModel",
"required": [
"id",
"type",
"label",
"sell_sum",
"return_sum",
"is_service"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"type": {
"title": "Type",
"enum": [
"CASH",
"CARD"
]
},
"label": {
"title": "Label",
"type": "string"
},
"sell_sum": {
"title": "Sell Sum",
"type": "integer"
},
"return_sum": {
"title": "Return Sum",
"type": "integer"
},
"is_service": {
"title": "Is Service",
"type": "boolean"
}
}
},
"ReportTaxesModel": {
"title": "ReportTaxesModel",
"required": [
"id",
"code",
"label",
"symbol",
"rate",
"sell_sum",
"return_sum",
"setup_date"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"code": {
"title": "Code",
"type": "integer"
},
"label": {
"title": "Label",
"type": "string"
},
"symbol": {
"title": "Symbol",
"type": "string"
},
"rate": {
"title": "Rate",
"type": "number"
},
"sell_sum": {
"title": "Sell Sum",
"type": "integer"
},
"return_sum": {
"title": "Return Sum",
"type": "integer"
},
"setup_date": {
"title": "Setup Date",
"type": "string",
"format": "date-time"
}
}
},
"ShiftModel": {
"title": "ShiftModel",
"required": [
"id",
"serial",
"status",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"OPENING",
"OPENED",
"CLOSING",
"CLOSED"
]
},
"initial_transaction_id": {
"title": "Initial Transaction Id",
"type": "string",
"format": "uuid"
},
"closing_transaction_id": {
"title": "Closing Transaction Id",
"type": "string",
"format": "uuid"
},
"opened_at": {
"title": "Opened At",
"type": "string",
"format": "date-time"
},
"closed_at": {
"title": "Closed At",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"ShiftWithCashRegisterModel": {
"title": "ShiftWithCashRegisterModel",
"required": [
"id",
"serial",
"status",
"created_at",
"cash_register"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"OPENING",
"OPENED",
"CLOSING",
"CLOSED"
]
},
"initial_transaction_id": {
"title": "Initial Transaction Id",
"type": "string",
"format": "uuid"
},
"closing_transaction_id": {
"title": "Closing Transaction Id",
"type": "string",
"format": "uuid"
},
"opened_at": {
"title": "Opened At",
"type": "string",
"format": "date-time"
},
"closed_at": {
"title": "Closed At",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"cash_register": {
"$ref": "#/components/schemas/CashRegisterModel"
}
}
},
"ShiftWithCashierAndCashRegister": {
"title": "ShiftWithCashierAndCashRegister",
"required": [
"id",
"serial",
"status",
"created_at",
"cash_register",
"cashier"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"OPENING",
"OPENED",
"CLOSING",
"CLOSED"
]
},
"initial_transaction_id": {
"title": "Initial Transaction Id",
"type": "string",
"format": "uuid"
},
"closing_transaction_id": {
"title": "Closing Transaction Id",
"type": "string",
"format": "uuid"
},
"opened_at": {
"title": "Opened At",
"type": "string",
"format": "date-time"
},
"closed_at": {
"title": "Closed At",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"cash_register": {
"$ref": "#/components/schemas/CashRegisterModel"
},
"cashier": {
"$ref": "#/components/schemas/CashierModel"
}
}
},
"ShiftWithCashierModel": {
"title": "ShiftWithCashierModel",
"required": [
"id",
"serial",
"status",
"created_at",
"cashier"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"OPENING",
"OPENED",
"CLOSING",
"CLOSED"
]
},
"initial_transaction_id": {
"title": "Initial Transaction Id",
"type": "string",
"format": "uuid"
},
"closing_transaction_id": {
"title": "Closing Transaction Id",
"type": "string",
"format": "uuid"
},
"opened_at": {
"title": "Opened At",
"type": "string",
"format": "date-time"
},
"closed_at": {
"title": "Closed At",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"cashier": {
"$ref": "#/components/schemas/CashierModel"
}
}
},
"ShortTransaction": {
"title": "ShortTransaction",
"required": [
"id",
"type",
"serial",
"status"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"type": {
"title": "Type",
"enum": [
"SHIFT_OPEN",
"X_REPORT",
"Z_REPORT",
"PING",
"RECEIPT",
"LAST_RECEIPT"
]
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"PENDING",
"SIGNED",
"DELIVERED",
"DONE",
"ERROR"
]
},
"request_signed_at": {
"title": "Request Signed At",
"type": "string",
"format": "date-time"
},
"request_received_at": {
"title": "Request Received At",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"TaxModel": {
"title": "TaxModel",
"required": [
"id",
"code",
"label",
"symbol",
"rate",
"created_at"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"code": {
"title": "Code",
"type": "integer"
},
"label": {
"title": "Label",
"type": "string"
},
"symbol": {
"title": "Symbol",
"type": "string"
},
"rate": {
"title": "Rate",
"type": "number"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
}
}
},
"TransactionModel": {
"title": "TransactionModel",
"required": [
"id",
"type",
"serial",
"status",
"cash_register"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"format": "uuid"
},
"type": {
"title": "Type",
"enum": [
"SHIFT_OPEN",
"X_REPORT",
"Z_REPORT",
"PING",
"RECEIPT",
"LAST_RECEIPT"
]
},
"serial": {
"title": "Serial",
"type": "integer"
},
"status": {
"title": "Status",
"enum": [
"CREATED",
"PENDING",
"SIGNED",
"DELIVERED",
"DONE",
"ERROR"
]
},
"request_signed_at": {
"title": "Request Signed At",
"type": "string",
"format": "date-time"
},
"request_received_at": {
"title": "Request Received At",
"type": "string",
"format": "date-time"
},
"created_at": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"updated_at": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"request_data": {
"title": "Request Data",
"type": "string",
"format": "byte"
},
"request_signature": {
"title": "Request Signature",
"type": "string",
"format": "byte"
},
"response_status": {
"title": "Response Status",
"type": "string"
},
"response_id": {
"title": "Response Id",
"type": "string"
},
"response_data_signature": {
"title": "Response Data Signature",
"type": "string",
"format": "byte"
},
"response_data": {
"title": "Response Data",
"type": "string",
"format": "byte"
},
"response_error_message": {
"title": "Response Error Message",
"type": "string"
},
"cash_register": {
"$ref": "#/components/schemas/CashRegisterModel"
}
}
},
"UpdateTransactionPayload": {
"title": "UpdateTransactionPayload",
"required": [
"request_signature"
],
"type": "object",
"properties": {
"request_signature": {
"title": "Request Signature",
"type": "string",
"format": "byte"
}
}
},
"ValidationError": {
"title": "ValidationError",
"required": [
"loc",
"msg",
"type"
],
"type": "object",
"properties": {
"loc": {
"title": "Location",
"type": "array",
"items": {
"type": "string"
}
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
}
}
},
"securitySchemes": {
"Cash register license key": {
"type": "apiKey",
"in": "header",
"name": "X-License-Key"
},
"Cashier JWT token": {
"type": "http",
"scheme": "bearer"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment