{"openapi":"3.0.0","paths":{"/receipt/advance/finalize":{"post":{"description":"Performs advance finalization in two internal steps using existing receipt flow: first creates an `ADVANCE/REFUND`, then creates `NORMAL/SALE` referencing that refund. Use `payments[].advanceAmount` for the advance amount. Returns `{ correlationId, refundReceipt, finalReceipt }`. Requires `referentDocumentNumber` set to the `invoiceNumber` of a prior `POST /receipt/advance/sale` (omitting it returns ERR_00201). On a demo account, advance items must use tax label A, E or F. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_advanceFinalize","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceFinalizeRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAdvanceFinalizeResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"409":{"description":"Business-rule conflict. `ERR_00302` = advance-item tax-label rule (on a demo account, advance items must use label A, E or F). Note this is HTTP 409, not 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":409,"code":"ERR_00302","message":"In sandbox mode, use A, E or F labels for advance items","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Finalize advance in one request","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/advance/finalize \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"ADV-FINAL-1001\",\n    \"referentDocumentNumber\": \"AZM5ZCCR-Dt1Ov2o0-507300\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"card\", \"amount\": 6000, \"advanceAmount\": 6000 }],\n    \"metaFields\": {}\n  }'"}]}},"/receipt/{invoiceType}/sale":{"post":{"description":"Issues a fiscal sale receipt for the given invoice type. Supported invoice types: `NORMAL`, `TRAINING`, `PROFORMA`, `COPY`, `ADVANCE`. `TRAINING` issues a non-fiscal test receipt (same flow, not registered with Poreska uprava) — use it to develop and test. referentDocumentNumber is optional for sale receipts. buyerId is optional for sale receipts (commonly used in B2B scenarios). To skip buyerId validation, set `settings.skipBuyerIdValidation` to true. Requires shop-level access via Bearer token or API key.\n\nReturns `{ correlationId, receipt }`. The QR image is NOT in this response — fetch it from `GET /archive/receipts/{invoiceNumber}`. For safe retries on a lost response, set `settings.returnIfOrderNumberExists=true` (returns the existing receipt instead of a duplicate). Common errors: `ERR_00202` (validation), `ERR_00701` (items vs payments mismatch), `ERR_01010` (Poreska uprava rejected) — see the introduction for the full error table.","operationId":"ReceiptController_createSaleReceipt","parameters":[{"name":"invoiceType","required":true,"in":"path","schema":{"enum":["normal","training","advance","proforma","copy"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleGatewayRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptResponseDto"},"example":{"correlationId":"54e041b7-1d28-4e09-a604-90cbdff587bf","receipt":{"invoiceNumber":"AZM5ZCCR-Dt1Ov2o0-507308","invoiceCounter":"468497/507302ОП","invoiceCounterExtension":"ОП","businessName":"PRIMER DOO","locationName":"PRIMER DOO","sdcDateTime":"2026-09-15T16:48:18.972Z","invoicePdfUrl":"https://api.fiscomm.rs/receipt/e4f2…","verificationUrl":"https://suf.purs.gov.rs/v/?vl=A0FaTTVaQ0NS…","totalAmount":6000,"invoiceType":"normal","transactionType":"sale","taxItems":[{"categoryType":0,"label":"A","amount":1000,"rate":20,"categoryName":"VAT"}],"additional":{"mrc":"99-3414-Dt1Ov2o0","tin":"RS112410326","signature":"…","messages":"Success"},"orderNumber":"ORDER-1001","metaFields":{"source":"webshop","orderId":"48213"},"journal":"======== ФИСКАЛНИ РАЧУН ========\r\n…"}}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"409":{"description":"Business-rule conflict. `ERR_00302` = advance-item tax-label rule (on a demo account, advance items must use label A, E or F). Note this is HTTP 409, not 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":409,"code":"ERR_00302","message":"In sandbox mode, use A, E or F labels for advance items","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a fiscal sale receipt","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/normal/sale \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"ORDER-1001\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"},{"lang":"TypeScript","label":"fiscomm-sdk-ts","source":"// npm install github:Fiscomm/fiscomm-sdk-ts\nimport { FiscommClient } from 'fiscomm-sdk';\n\nconst client = new FiscommClient({ apiKey: process.env.FISCOMM_API_KEY });\nconst { receipt } = await client.receipts.sale('normal', {\n  orderNumber: 'ORDER-1001',\n  items: [{ name: 'Item', quantity: 1, unitPrice: 6000, totalAmount: 6000, labels: ['A'] }],\n  payments: [{ type: 'cash', amount: 6000 }],\n  metaFields: {},\n});\nconsole.log(receipt.invoiceNumber, receipt.verificationUrl);"},{"lang":"PHP","label":"fiscomm-sdk-php","source":"// composer require fiscomm/sdk:dev-main\nuse Fiscomm\\Sdk\\FiscommClient;\n\n$client = new FiscommClient(getenv('FISCOMM_API_KEY'));\n$res = $client->receipts()->sale('normal', [\n  'orderNumber' => 'ORDER-1001',\n  'items' => [['name' => 'Item', 'quantity' => 1, 'unitPrice' => 6000, 'totalAmount' => 6000, 'labels' => ['A']]],\n  'payments' => [['type' => 'cash', 'amount' => 6000]],\n  'metaFields' => (object) [],\n]);\necho $res->receipt->invoiceNumber;"}]}},"/receipt/{invoiceType}/refund":{"post":{"description":"Issues a fiscal refund receipt for the given invoice type. Supported invoice types: `NORMAL`, `TRAINING`, `ADVANCE`. `TRAINING` issues a non-fiscal test refund (same flow, not registered with Poreska uprava). referentDocumentNumber is REQUIRED for refund receipts (must reference an original receipt invoice number). buyerId is REQUIRED for refund receipts (unless `settings.skipBuyerIdValidation` is set to true). Set `settings.skipBuyerIdValidation: true` in the request body to skip buyerId validation if necessary. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_createRefundReceipt","parameters":[{"name":"invoiceType","required":true,"in":"path","schema":{"enum":["normal","training","advance","proforma","copy"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundGatewayRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a fiscal refund receipt","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/normal/refund \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"REFUND-1001\",\n    \"referentDocumentNumber\": \"AZM5ZCCR-Dt1Ov2o0-507308\",\n    \"referentDocumentDt\": \"2026-09-15T16:48:18.972Z\",\n    \"buyerId\": \"10:112410326\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"},{"lang":"TypeScript","label":"fiscomm-sdk-ts","source":"const { receipt } = await client.receipts.refund('normal', {\n  orderNumber: 'REFUND-1001',\n  referentDocumentNumber: 'AZM5ZCCR-Dt1Ov2o0-507308',\n  referentDocumentDt: '2026-09-15T16:48:18.972Z',\n  buyerId: '10:112410326',\n  items: [{ name: 'Item', quantity: 1, unitPrice: 6000, totalAmount: 6000, labels: ['A'] }],\n  payments: [{ type: 'cash', amount: 6000 }],\n  metaFields: {},\n});"},{"lang":"PHP","label":"fiscomm-sdk-php","source":"$res = $client->receipts()->refund('normal', [\n  'orderNumber' => 'REFUND-1001',\n  'referentDocumentNumber' => 'AZM5ZCCR-Dt1Ov2o0-507308',\n  'referentDocumentDt' => '2026-09-15T16:48:18.972Z',\n  'buyerId' => '10:112410326',\n  'items' => [['name' => 'Item', 'quantity' => 1, 'unitPrice' => 6000, 'totalAmount' => 6000, 'labels' => ['A']]],\n  'payments' => [['type' => 'cash', 'amount' => 6000]],\n  'metaFields' => (object) [],\n]);"}]}},"/receipt/{invoiceType}/sale/async":{"post":{"description":"Enqueues a fiscal sale receipt creation request for asynchronous processing. Use this endpoint when you want fire-and-forget behaviour — the receipt is queued and processed in the background. NOTE: the async endpoints may be unavailable on some accounts and can return 500 (ERR_00002); prefer the synchronous endpoints and reconcile with /archive/receipts/fiscalization-lookup. Ideal for high-throughput integrations. buyerId is optional for sale receipts. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_createSaleReceiptAsync","parameters":[{"name":"invoiceType","required":true,"in":"path","schema":{"enum":["normal","training","advance","proforma","copy"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReceiptAsyncRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a fiscal sale receipt (async)","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/normal/sale/async \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"ORDER-1001\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"}]}},"/receipt/{invoiceType}/refund/async":{"post":{"description":"Enqueues a fiscal refund receipt creation request for asynchronous processing. Use this endpoint when you want fire-and-forget behaviour — the receipt is queued and processed in the background. NOTE: the async endpoints may be unavailable on some accounts and can return 500 (ERR_00002); prefer the synchronous endpoints and reconcile with /archive/receipts/fiscalization-lookup. Ideal for high-throughput integrations. referentDocumentNumber is REQUIRED for refund receipts (must reference an original receipt). buyerId is REQUIRED for refund receipts (unless settings.skipBuyerIdValidation is true). Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_createRefundReceiptAsync","parameters":[{"name":"invoiceType","required":true,"in":"path","schema":{"enum":["normal","training","advance","proforma","copy"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReceiptAsyncRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a fiscal refund receipt (async)","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/normal/refund/async \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"REFUND-1001\",\n    \"referentDocumentNumber\": \"AZM5ZCCR-Dt1Ov2o0-507308\",\n    \"referentDocumentDt\": \"2026-09-15T16:48:18.972Z\",\n    \"buyerId\": \"10:112410326\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"}]}},"/receipt/{invoiceType}/{transactionType}/async":{"post":{"description":"DEPRECATED: Use /sale/async or /refund/async endpoints instead for better clarity. Enqueues a fiscal receipt creation request for asynchronous processing. Use this endpoint when you want fire-and-forget behaviour — the receipt is queued and processed in the background. NOTE: the async endpoints may be unavailable on some accounts and can return 500 (ERR_00002); prefer the synchronous endpoints and reconcile with /archive/receipts/fiscalization-lookup. Ideal for high-throughput integrations. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_createReceiptAsync","parameters":[{"name":"invoiceType","required":true,"in":"path","schema":{"enum":["normal","training","advance","proforma","copy"],"type":"string"}},{"name":"transactionType","required":true,"in":"path","schema":{"enum":["sale","refund","finalize"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReceiptAsyncRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a fiscal receipt (async) - Generic","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/normal/sale/async \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"ORDER-1001\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"}]}},"/receipt/{invoiceNumber}/refund/full":{"post":{"description":"Issues a **FULL REFUND** (100% of the original amount) for a previously issued receipt identified by its `invoiceNumber`. This endpoint automatically retrieves the original items and payments to construct the refund payload, so you do NOT need to manually specify items or amounts — the system will refund everything. Useful for quick refund workflows where the entire transaction needs to be reversed. The invoiceNumber path parameter identifies which receipt to fully refund. NOTE: this path has NO `invoiceType` segment — call `POST /receipt/{invoiceNumber}/refund/full` (not `/receipt/{invoiceType}/…`); e.g. `/receipt/training/{invoiceNumber}/refund/full` returns 404. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_refundReceipt","parameters":[{"name":"invoiceNumber","required":true,"in":"path","description":"Invoice number of the receipt to fully refund (e.g., from the original sale receipt response)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundGatewayRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a full refund for a receipt","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/AZM5ZCCR-Dt1Ov2o0-507308/refund/full \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"FULLREF-1001\",\n    \"buyerId\": \"10:112410326\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"}]}},"/receipt/drafts":{"post":{"description":"Saves a receipt payload as a draft before final fiscal submission. Drafts can be reviewed, edited, and submitted at a later time. Useful for workflows where receipt data is assembled ahead of time. Returns the new draft `id` which is used in subsequent update, fetch, and delete calls. Requires `draftName`, `orderNumber` and `items`. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_createReceiptDraft","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReceiptDraftRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCreateReceiptDraftResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create a receipt draft","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/drafts \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"draftName\": \"My draft\",\n    \"orderNumber\": \"DRAFT-1001\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'"}]},"get":{"description":"Returns a paginated list of receipt drafts for the authenticated shop. Supports filtering by date range and status. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_getReceiptDrafts","parameters":[{"name":"page","required":false,"in":"query","description":"Page","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Limit","schema":{"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort by field","schema":{"example":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"ASC","type":"string"}},{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"invoiceNumber","required":false,"in":"query","schema":{"type":"string"}},{"name":"buyerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"shopId","required":false,"in":"query","description":"Filter by shop ID. For API key authentication this is resolved automatically from the key — only pass this when using Bearer token with company-level access to scope results to a specific shop.","schema":{"type":"number"}},{"name":"invoiceType","required":false,"in":"query","schema":{"type":"string","enum":["normal","training","advance","proforma","copy"]}},{"name":"orderNumber","required":false,"in":"query","schema":{"type":"string"}},{"name":"orderNumbers","required":false,"in":"query","description":"Filter by multiple exact order numbers.","schema":{"example":["MP-1001","MP-1002"],"type":"array","items":{"type":"string"}}},{"name":"orderNumberExact","required":false,"in":"query","description":"When true, orderNumber is matched exactly (=) instead of partially (ILIKE).","schema":{"type":"boolean"}},{"name":"transactionType","required":false,"in":"query","schema":{"type":"string","enum":["sale","refund","finalize"]}},{"name":"paymentType","required":false,"in":"query","description":"Payment type. Accepts both original enum values (Cash, WireTransfer, Card, Check, Voucher, MobileMoney, Virman, Mobile, Factoring, Account, Other) and lowercase alternatives (cash, card, wire_transfer, wiretransfer, check, voucher, mobile_money, mobilemoney, virman, mobile, factoring, account, other)","schema":{"$ref":"#/components/schemas/Object"}},{"name":"cashier","required":false,"in":"query","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","schema":{"type":"number"}},{"name":"metaFields","required":false,"in":"query","description":"Filter by meta field key-value pairs (JSONB containment, exact match)","schema":{"$ref":"#/components/schemas/Object"}},{"name":"metaFieldsSearch","required":false,"in":"query","description":"Filter by meta field key-value pairs (partial ILIKE match per key)","schema":{"$ref":"#/components/schemas/Object"}},{"name":"sendToEmail","required":false,"in":"query","description":"Filter by email address the receipt was sent to (settings.sendToEmail, partial match)","schema":{"example":"john@example.com","type":"string"}},{"name":"include","required":false,"in":"query","description":"Relations to include (e.g., company, shop, items, payments). Can be passed as comma-separated string or array.","schema":{"example":["company","shop"],"type":"array","items":{"type":"string"}}},{"name":"draftName","required":false,"in":"query","schema":{"example":"draftName","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayGetReceiptDraftsResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"List receipt drafts","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/receipt/drafts \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/receipt/drafts/{id}":{"put":{"description":"Updates an existing receipt draft identified by `id`. Only drafts owned by the authenticated shop can be modified. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_updateReceiptDraft","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReceiptDraftRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayReceiptDraftResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Update a receipt draft","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT https://api.fiscomm.rs/receipt/drafts/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"draftName\": \"Renamed draft\" }'"}]},"get":{"description":"Retrieves a single receipt draft by its numeric `id`. Returns full draft details including items, amounts, and status. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_getReceiptDraftById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayReceiptDraftResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Get a receipt draft by ID","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/receipt/drafts/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"delete":{"description":"Permanently deletes a receipt draft by its numeric `id`. This action is irreversible — the draft cannot be recovered after deletion. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_deleteReceiptDraft","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayDeleteReceiptDraftResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Delete a receipt draft","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.fiscomm.rs/receipt/drafts/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/receipt/tax-rates":{"get":{"description":"Returns the VAT tax rate groups configured for the authenticated shop. Use the `currentTaxRates` field for the active group when populating receipt line items. For API key authentication the shop is resolved automatically — `shopId` is not required. When using Bearer token pass `shopId` to scope the result to a specific shop.","operationId":"ReceiptController_getTaxRates","parameters":[{"name":"shopId","required":false,"in":"query","description":"Shop ID. Not required for API key authentication — resolved from the key automatically.","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaxRatesResponseDto"},"example":{"currentTaxRates":{"validFrom":"2021-11-01T01:00:00Z","groupId":1,"taxCategories":[{"name":"VAT","categoryType":0,"taxRates":[{"rate":20,"label":"A"}],"orderId":1},{"name":"VAT","categoryType":0,"taxRates":[{"rate":10,"label":"Е"}],"orderId":2}]},"allTaxRates":[]}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Get applicable tax rates","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/receipt/tax-rates \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""},{"lang":"TypeScript","label":"fiscomm-sdk-ts","source":"const rates = await client.receipts.taxRates();\n// use rates.currentTaxRates for new receipts"},{"lang":"PHP","label":"fiscomm-sdk-php","source":"$rates = $client->receipts()->taxRates();"}]}},"/receipt/{invoiceType}/{transactionType}/bulk":{"post":{"description":"Submits multiple fiscal receipts in a single request. Only one bulk request is processed at a time per shop — concurrent requests are rejected with 429. Body wraps the array: { receipts: [ ... ] } (a bare array is rejected); max 30. Response: { receipts, failedReceipts, totalProcessed, successful, failed } (no top-level correlationId). Ideal for batch integrations or end-of-day processing. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_createBulkReceipt","parameters":[{"name":"invoiceType","required":true,"in":"path","schema":{"enum":["normal","training","advance","proforma","copy"],"type":"string"}},{"name":"transactionType","required":true,"in":"path","schema":{"enum":["sale","refund","finalize"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBulkReceiptRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBulkReceiptResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"429":{"description":"Another bulk request for this shop is already in progress — only one runs at a time. Retry after it finishes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":429,"message":"A bulk request for this shop is already in progress. Retry after it finishes.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Create fiscal receipts in bulk","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/normal/sale/bulk \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"receipts\": [\n      { \"orderNumber\": \"BULK-1\", \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"A\"] }], \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }], \"metaFields\": {} }\n    ]\n  }'"}]}},"/receipt/send-email":{"post":{"description":"Sends a previously issued fiscal receipt to the specified customer email address. The receipt is attached as a PDF. Body: `{ invoiceNumber, email, cc?, bcc? }` → `{ success, correlationId }`. Requires shop-level access via Bearer token or API key.","operationId":"ReceiptController_sendReceiptEmail","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReceiptEmailRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponseDto"},"example":{"success":true,"correlationId":"5143aa4e-470d-4517-bd0f-07b1bb4201c8"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Send receipt via email","tags":["receipt"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/receipt/send-email \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"invoiceNumber\": \"AZM5ZCCR-Dt1Ov2o0-507308\", \"email\": \"buyer@example.com\" }'"}]}},"/cashiers":{"post":{"operationId":"CashiersController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashierRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashierResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/cashiers"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/cashiers \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"get":{"operationId":"CashiersController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Limit","schema":{"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search","schema":{"example":"","type":"string"}},{"name":"sortBy","required":false,"in":"query","description":"Sort by field","schema":{"example":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"ASC","type":"string"}},{"name":"shopId","required":false,"in":"query","description":"Shop ID to filter cashiers by","schema":{"example":1,"type":"number"}},{"name":"name","required":false,"in":"query","description":"Cashier name to search for (fuzzy search)","schema":{"example":"John","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterCashiersResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/cashiers"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/cashiers \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/cashiers/{id}":{"get":{"operationId":"CashiersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashierResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/cashiers"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/cashiers/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"put":{"operationId":"CashiersController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCashierRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashierResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/cashiers"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT https://api.fiscomm.rs/cashiers/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"delete":{"operationId":"CashiersController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseRemoveEntityResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/cashiers"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.fiscomm.rs/cashiers/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/shops/{id}/meta-fields":{"get":{"operationId":"ShopsController_getMetaFields","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shops"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/shops/123/meta-fields \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/shop-products":{"post":{"operationId":"ShopProductsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopProductRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopProductResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/shop-products \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"get":{"operationId":"ShopProductsController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Limit","schema":{"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search","schema":{"example":"","type":"string"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"example":"productName","type":"string","enum":["productName","code","price","createdAt","updatedAt"]}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"ASC","type":"string","enum":["ASC","DESC"]}},{"name":"shopId","required":false,"in":"query","description":"Shop ID to filter products by","schema":{"example":1,"type":"number"}},{"name":"productName","required":false,"in":"query","description":"Product name to search for (fuzzy search)","schema":{"example":"Coca Cola","type":"string"}},{"name":"code","required":false,"in":"query","description":"Product code to search for (fuzzy search)","schema":{"example":"CC-500ML","type":"string"}},{"name":"query","required":false,"in":"query","description":"General search query (searches across name, code, description)","schema":{"example":"coffee","type":"string"}},{"name":"isActive","required":false,"in":"query","description":"Whether to include only active products","schema":{"example":true,"type":"boolean"}},{"name":"minPrice","required":false,"in":"query","description":"Minimum price filter","schema":{"example":10.5,"type":"number"}},{"name":"maxPrice","required":false,"in":"query","description":"Maximum price filter","schema":{"example":100,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterShopProductsResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/shop-products \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/shop-products/upsert":{"post":{"operationId":"ShopProductsController_upsert","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopProductRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopProductResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/shop-products/upsert \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/shop-products/{id}":{"get":{"operationId":"ShopProductsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopProductResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/shop-products/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"put":{"operationId":"ShopProductsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShopProductRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopProductResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT https://api.fiscomm.rs/shop-products/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]},"delete":{"operationId":"ShopProductsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseRemoveEntityResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.fiscomm.rs/shop-products/123 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/shop-products/import/{shopId}":{"post":{"operationId":"ShopProductsController_importProducts","parameters":[{"name":"shopId","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"description":"CSV file containing shop products data","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"CSV file with format: productName,code,description,price,taxLabel,taxRate,gtin,isActive"}},"$ref":"#/components/schemas/"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportShopProductsResultDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"security":[{"api-key":[]}],"tags":["company/shop-products"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/shop-products/import/{shopId} \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/archive/receipts":{"get":{"description":"Returns a paginated list of issued fiscal receipts for the authenticated shop or company. Supports filtering by date range, invoice number, invoice type, transaction type, payment type, cashier, and custom meta fields. When using API key authentication, the shop is resolved automatically from the key — no `shopId` is required. When using Bearer token with company-level access, pass `shopId` in the query to scope results to a specific shop; omit it for a company-wide list.","operationId":"ArchiveController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Limit","schema":{"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort by field","schema":{"example":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"ASC","type":"string"}},{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"invoiceNumber","required":false,"in":"query","schema":{"type":"string"}},{"name":"buyerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"shopId","required":false,"in":"query","description":"Filter by shop ID. For API key authentication this is resolved automatically from the key — only pass this when using Bearer token with company-level access to scope results to a specific shop.","schema":{"type":"number"}},{"name":"invoiceType","required":false,"in":"query","schema":{"type":"string","enum":["normal","training","advance","proforma","copy"]}},{"name":"orderNumber","required":false,"in":"query","schema":{"type":"string"}},{"name":"orderNumbers","required":false,"in":"query","description":"Filter by multiple exact order numbers.","schema":{"example":["MP-1001","MP-1002"],"type":"array","items":{"type":"string"}}},{"name":"orderNumberExact","required":false,"in":"query","description":"When true, orderNumber is matched exactly (=) instead of partially (ILIKE).","schema":{"type":"boolean"}},{"name":"transactionType","required":false,"in":"query","schema":{"type":"string","enum":["sale","refund","finalize"]}},{"name":"paymentType","required":false,"in":"query","description":"Payment type. Accepts both original enum values (Cash, WireTransfer, Card, Check, Voucher, MobileMoney, Virman, Mobile, Factoring, Account, Other) and lowercase alternatives (cash, card, wire_transfer, wiretransfer, check, voucher, mobile_money, mobilemoney, virman, mobile, factoring, account, other)","schema":{"$ref":"#/components/schemas/Object"}},{"name":"cashier","required":false,"in":"query","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","schema":{"type":"number"}},{"name":"metaFields","required":false,"in":"query","description":"Filter by meta field key-value pairs (JSONB containment, exact match)","schema":{"$ref":"#/components/schemas/Object"}},{"name":"metaFieldsSearch","required":false,"in":"query","description":"Filter by meta field key-value pairs (partial ILIKE match per key)","schema":{"$ref":"#/components/schemas/Object"}},{"name":"sendToEmail","required":false,"in":"query","description":"Filter by email address the receipt was sent to (settings.sendToEmail, partial match)","schema":{"example":"john@example.com","type":"string"}},{"name":"include","required":false,"in":"query","description":"Relations to include (e.g., company, shop, items, payments). Can be passed as comma-separated string or array.","schema":{"example":["company","shop"],"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReceiptsResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"List archived receipts","tags":["archive/receipts"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/archive/receipts \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/archive/receipts/fiscalization-lookup":{"post":{"description":"Find latest receipt per order number for a shop/company and return fiscalization status in one request.","operationId":"ArchiveController_fiscalizationLookup","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptFiscalizationLookupRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"example":{"records":[{"orderNumber":"ORDER-1001","fiscalized":true,"invoiceNumber":"AZM5ZCCR-Dt1Ov2o0-507308","receiptId":"1895160","transactionType":"sale","sdcDateTime":"2026-09-15T16:48:18.972Z"},{"orderNumber":"UNKNOWN-9","fiscalized":false,"invoiceNumber":null,"receiptId":null,"transactionType":null,"sdcDateTime":null}]}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Bulk fiscalization lookup by order numbers","tags":["archive/receipts"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/archive/receipts/fiscalization-lookup \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"orderNumbers\": [\"ORDER-1001\"] }'"},{"lang":"TypeScript","label":"fiscomm-sdk-ts","source":"const { records } = await client.archive.fiscalizationLookup(['ORDER-1001']);\n// records[i].fiscalized === true|false"},{"lang":"PHP","label":"fiscomm-sdk-php","source":"$res = $client->archive()->fiscalizationLookup(['ORDER-1001']);"}]}},"/archive/receipts/{invoiceNumber}":{"get":{"description":"Retrieves a single fiscal receipt by its `invoiceNumber`. Returns the receipt metadata, line items, taxes, fiscal verification data, and chain information (linked advance/refund receipts if any). Pass `include` as a comma-separated list of relations to expand (e.g. `company,shop,items,payments`). An unknown `invoiceNumber` returns 404 — to check several receipts at once use `POST /archive/receipts/fiscalization-lookup`. Requires shop-level access via Bearer token or API key.","operationId":"ArchiveController_findOne","parameters":[{"name":"invoiceNumber","required":true,"in":"path","description":"The fiscal invoice number (e.g. AAAAA-BBBBB-12345)","schema":{"type":"string"}},{"name":"include","required":false,"in":"query","description":"Comma-separated list of relations to include (e.g. company,shop,items,payments)","schema":{"example":"items,payments","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptWithChainResponseDto"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Get a receipt by invoice number","tags":["archive/receipts"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/archive/receipts/AZM5ZCCR-Dt1Ov2o0-507308 \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/auth/verify-api-token":{"post":{"description":"Returns whether the Bearer API key is valid and which shop/company it resolves to. Runtime status is 201 (POST with no @HttpCode override).","operationId":"AuthController_verifyApiToken","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyTokenResponseDto"},"example":{"type":"api","authable":{"shopId":123,"id":45,"companyId":67},"apiKey":{"id":45,"version":"V2","name":"WordPress key"},"user":null}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Verify an API key","tags":["auth"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.fiscomm.rs/auth/verify-api-token \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}},"/auth/api-key/me":{"get":{"operationId":"AuthController_getApiKeyInfo","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApiKeyInfoResponseDto"},"example":{"apiKeyId":45,"apiKeyName":"WordPress key","companyId":67,"companyName":"Company d.o.o.","shopId":123,"shopName":"Main shop"}}}},"400":{"description":"Validation or business-rule error. Branch on `code`: `ERR_00202` (input validation), `ERR_00701` (items total ≠ payments total), `ERR_01010` (rejected by the Tax Administration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":400,"code":"ERR_00202","message":"Validation failed","details":{"validationErrors":[{"field":"orderNumber","message":"should not be empty"}]},"path":"/receipt/normal/sale","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":401,"code":"ERR_00101","message":"Failed to validate API token","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"403":{"description":"The API key is valid but has no access to this shop or resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":403,"message":"Forbidden — API key has no access to this shop","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":404,"code":"NOT_FOUND","message":"Resource not found","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}},"500":{"description":"Internal error. Safe to retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"},"example":{"status":500,"code":"ERR_00002","userMessage":"Server error. Please try again later.","correlationId":"5cbf3d9f-bd38-4375-89ab-34ed6be68d97"}}}}},"security":[{"api-key":[]}],"summary":"Get company and shop info for the authenticated API key","tags":["auth"],"x-allow-api-key":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET https://api.fiscomm.rs/auth/api-key/me \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\""}]}}},"info":{"title":"Fiscomm Public API","description":"Fiscomm REST API for fiscalization in Serbia (Tax Administration, PURS/SUF). Send order data → get a fiscal receipt (PFR number, QR, PDF, verification link). No device, no manual entry.\n\n## Quick start\n1. Get an API key (bound to a single shop) from your Fiscomm account.\n2. Send `Authorization: Bearer <API_KEY>`. You never send a `shopId` — the server resolves shop, company and certificate from the key.\n3. Build against a demo account (test certificate) or use `invoiceType=training` for non-fiscal receipts. Issue real receipts with `invoiceType=normal` on a production account.\n\nIssue your first (training) receipt:\n\n```bash\ncurl -X POST https://api.fiscomm.rs/receipt/training/sale \\\n  -H \"Authorization: Bearer $FISCOMM_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"orderNumber\": \"ORDER-1001\",\n    \"items\": [{ \"name\": \"Item\", \"quantity\": 1, \"unitPrice\": 6000, \"totalAmount\": 6000, \"labels\": [\"Ђ\"] }],\n    \"payments\": [{ \"type\": \"cash\", \"amount\": 6000 }],\n    \"metaFields\": {}\n  }'\n```\n\n```typescript\n// npm install github:Fiscomm/fiscomm-sdk-ts\nimport { FiscommClient } from 'fiscomm-sdk';\n\nconst client = new FiscommClient({ apiKey: process.env.FISCOMM_API_KEY });\nconst { receipt } = await client.receipts.sale('training', {\n  orderNumber: 'ORDER-1001',\n  items: [{ name: 'Item', quantity: 1, unitPrice: 6000, totalAmount: 6000, labels: ['Ђ'] }],\n  payments: [{ type: 'cash', amount: 6000 }],\n  metaFields: {},\n});\nconsole.log(receipt.invoiceNumber, receipt.verificationUrl);\n```\n\n```php\n// composer require fiscomm/sdk:dev-main\nuse Fiscomm\\Sdk\\FiscommClient;\n\n$client = new FiscommClient(getenv('FISCOMM_API_KEY'));\n$res = $client->receipts()->sale('training', [\n  'orderNumber' => 'ORDER-1001',\n  'items' => [['name' => 'Item', 'quantity' => 1, 'unitPrice' => 6000, 'totalAmount' => 6000, 'labels' => ['Ђ']]],\n  'payments' => [['type' => 'cash', 'amount' => 6000]],\n  'metaFields' => (object) [],\n]);\necho $res->receipt->invoiceNumber;\n```\n\n## Environments — the account decides, not the host\nThe host and API are identical for testing and production: `https://api.fiscomm.rs`. What differs is the account you authenticate as, via the certificate (security element) on its shop:\n- **Demo account** — test certificate → routed to the Tax Administration sandbox, receipts are NOT legal documents, and a test set of tax labels is returned.\n- **Production account** — your real certificate (from the ePorezi portal) → legal fiscal documents and the real tax labels.\nThe certificate alone determines the Tax Administration environment, whether receipts are real, and which tax labels apply. Request shape and host never change between environments.\n\n## Training receipts\nSeparately from the account, `invoiceType=training` issues a non-fiscal training receipt (marked \"ОВО НИЈЕ ФИСКАЛНИ РАЧУН\") on any account. Only the path changes: `POST /receipt/training/sale` for a test receipt, `POST /receipt/normal/sale` for a real one.\n\n## Tax labels — do not hardcode\nPull them from `GET /receipt/tax-rates`. They depend on the account's tax group and differ between a demo account and a production account. Production: Ђ=20%, Е=10%, Г=0%, А=0%. Use `currentTaxRates` for new receipts.\n\n## Idempotency (important for retries)\n`orderNumber` is unique per shop + company + invoiceType + transactionType (~14 days). On a lost response, resend the SAME request with `settings.returnIfOrderNumberExists=true` → the existing receipt is returned. Confirm what went through with `POST /archive/receipts/fiscalization-lookup`.\n\n## What the response returns\n`POST .../sale|refund` → `{ correlationId, receipt }`. `correlationId` is per request (absent in bulk). The QR image (`qrCodeFileUrl`) is NOT in this response — get it from `GET /archive/receipts/{invoiceNumber}`. Any `metaFields` you send is echoed back on `receipt.metaFields` exactly as sent.\n\n## Errors\nEvery error is `{ status, code, message, userMessage?, details?, correlationId }`. `code` is stable (ERR_*). Always include `correlationId` when contacting support.\n\n| HTTP | code | Meaning | What to do |\n|---|---|---|---|\n| 400 | ERR_00202 | Input validation (`details.validationErrors[]`) | Fix the fields and retry |\n| 400 | ERR_00603 | `orderNumber` already used | Use `settings.returnIfOrderNumberExists` to fetch the existing receipt |\n| 400 | ERR_00701 | Items total ≠ payments total | Align items/payments (or `settings.skipAmountValidation`) |\n| 400 | ERR_00201 | Referenced document missing | Provide `referentDocumentNumber` (e.g. on `advance/finalize`) |\n| 409 | ERR_00302 | Advance-item tax label rule | On a demo account use label `A`, `E` or `F` for advance items |\n| 400 | ERR_01010 | Rejected by the Tax Administration (`details.pursRawResponse`) | Read the reason in pursRawResponse (e.g. invalid gtin) |\n| 401 | ERR_00101 | Missing/invalid key | Check the Bearer token |\n| 403 | — | Valid key without access to the shop | Key is not for that shop |\n| 404 | — | Not found | Check the path / invoice number |\n| 429 | — | Concurrent bulk for the same shop | Serialize bulk calls |\n| 500 | ERR_00002 | Internal error | Retry later; report the correlationId |\n\n## Advance chain (two calls)\n`advance/finalize` is not self-contained. First `POST /receipt/advance/sale` (items + payments; `payments[].advanceAmount` is added on top of `amount`), then `POST /receipt/advance/finalize` with `referentDocumentNumber` = the advance's `invoiceNumber`. Finalize returns `{ correlationId, refundReceipt, finalReceipt }`. On a demo account, advance items must use tax label `A`, `E` or `F`.\n\n## Bulk / async / webhook\nNo general rate limit. **Bulk** (`/receipt/{type}/{tx}/bulk`, up to 30, one per shop at a time → 429) takes a wrapped body `{ \"receipts\": [ … ] }` and returns `{ receipts, failedReceipts, totalProcessed, successful, failed }` (no top-level `correlationId`). The **async** flow delivers the raw fiscalReceipt to a webhook — but the async endpoints may be unavailable and can return `500` on some accounts, so prefer the synchronous endpoints unless async is confirmed enabled. For LLM agents: `/llms.txt` (index) and `/llms-full.txt` (full guide).\n","version":"2.0","contact":{"name":"Fiscomm Support","url":"","email":"podrska@fiscomm.rs"}},"tags":[{"name":"receipt","description":"Fiscal receipt creation and management"},{"name":"archive/receipts","description":"Query and retrieve previously issued receipts"},{"name":"auth","description":"API key verification and shop context"}],"servers":[{"url":"https://api.fiscomm.rs","description":"Production"}],"components":{"securitySchemes":{"api-key":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Pass your API key here. API keys use the same Bearer token format as user JWTs:\n`Authorization: Bearer <your-api-key>`"}},"schemas":{"ApiErrorResponseDto":{"type":"object","properties":{"status":{"type":"number","description":"HTTP status code.","example":400},"code":{"type":"string","description":"Machine-readable Fiscomm error code. Examples: `ERR_00202` (validation), `ERR_00701` (item total does not match payment total), `ERR_00002` (internal error).","example":"ERR_00202"},"message":{"type":"string","description":"Technical message describing the error.","example":"Validation failed"},"userMessage":{"type":"string","description":"Human-friendly message safe to surface to an end user.","example":"Payment amount does not match the total. Please check the calculation."},"details":{"type":"object","description":"Additional structured detail. For validation errors this includes `validationErrors: [{ field, message }]`.","additionalProperties":true},"path":{"type":"string","description":"Request path.","example":"/receipt/normal/sale"},"correlationId":{"type":"string","description":"Correlation id of the request, for support/log lookups."}},"required":["status","code","message"]},"ItemDto":{"type":"object","properties":{"name":{"type":"string","example":"Producto 1"},"gtin":{"type":"string","example":"1234567890"},"quantity":{"type":"number","example":1},"unitPrice":{"type":"number","example":100},"totalAmount":{"type":"number","example":100},"labels":{"example":["F"],"type":"array","items":{"type":"string"}}},"required":["name","quantity","unitPrice","totalAmount","labels"]},"AdvancePaymentDto":{"type":"object","properties":{"type":{"type":"object","description":"Payment type. Accepts both original enum values (Cash, WireTransfer, Card, Check, Voucher, MobileMoney, Virman, Mobile, Factoring, Account, Other) and lowercase alternatives (cash, card, wire_transfer, wiretransfer, check, voucher, mobile_money, mobilemoney, virman, mobile, factoring, account, other)","example":"cash"},"amount":{"type":"number","example":100},"advanceAmount":{"type":"number","example":100,"description":"Amount paid in advance"}},"required":["type","amount"]},"CreateReceiptSettingsDto":{"type":"object","properties":{"skipOrderNumberValidation":{"type":"boolean","description":"Skip order number validation. Useful for systems that cannot enforce order number uniqueness. Default: false.","default":false},"skipInvoiceNumberValidation":{"type":"boolean","description":"Skip invoice number validation. Useful for special scenarios where fiscal system needs manual invoice number handling. Default: false.","default":false},"skipAmountValidation":{"type":"boolean","description":"Skip items totalAmount and payment amount validation. Allows for rounding differences or manual calculation handling. Default: false.","default":false},"skipAdvanceChainDerivation":{"type":"boolean","description":"Advance finalize only: issue the Avans-Refundacija and the final receipt EXACTLY as provided in the payload, without deriving or adjusting amounts from the advance chain. This also bypasses the chain snapshot (\"No advance items ... in the chain\" guard), so finalization can proceed on historically over-refunded advance chains (Σrefund ≥ Σsale). The caller is fully responsible for the issued amounts. Default: false.","default":false},"sendToEmail":{"type":"string","description":"Email address to send the receipt PDF. If provided, receipt will be automatically emailed to this address.","example":"customer@example.com"},"orderNumberUnderReceipt":{"type":"boolean","description":"Display order number as a barcode block under the receipt. Overrides the shop-level setting for this receipt only. If not provided, falls back to shop receiptSettings.","default":false},"textHeader":{"type":"string","description":"Optional per-receipt header text rendered in PDF. Overrides shop default header for this receipt.","default":""},"textFooter":{"type":"string","description":"Optional per-receipt footer text rendered in PDF. Overrides shop default footer for this receipt.","default":""},"skipBuyerIdValidation":{"type":"boolean","description":"Skip buyer ID validation for refunds. Use this flag only if you cannot provide buyerId for refund transactions (rarely recommended, may violate local regulations). Default: false.","default":false},"isFinal":{"type":"boolean","description":"Marks a NORMAL/SALE receipt as finalization of an advance-payment chain. When true, referent document must be an ADVANCE/REFUND receipt.","default":false},"returnIfOrderNumberExists":{"type":"boolean","description":"When true and a receipt with the same orderNumber already exists, the existing receipt is returned (idempotent) instead of throwing ReceiptOrderExistsException. Useful for integrations that retry after a lost response. Default: false.","default":false}}},"AdvanceFinalizeRequestDto":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/AdvancePaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]},"invoiceType":{"type":"string","enum":["normal","training","advance","proforma","copy"],"example":"advance"},"transactionType":{"type":"string","enum":["sale","refund","finalize"],"example":"finalize"}},"required":["orderNumber","buyerId","items"]},"PaymentDto":{"type":"object","properties":{"type":{"type":"object","description":"Payment type. Accepts both original enum values (Cash, WireTransfer, Card, Check, Voucher, MobileMoney, Virman, Mobile, Factoring, Account, Other) and lowercase alternatives (cash, card, wire_transfer, wiretransfer, check, voucher, mobile_money, mobilemoney, virman, mobile, factoring, account, other)","example":"cash"},"amount":{"type":"number","example":100},"advanceAmount":{"type":"number","example":100,"description":"Amount paid in advance (optional, mainly for finalize advance flows)"}},"required":["type","amount"]},"TaxItemDto":{"type":"object","properties":{"categoryType":{"type":"number","readOnly":true,"description":"PURS tax category type code (0 standard, 1/2 special)."},"label":{"type":"string","readOnly":true,"description":"Tax label as printed on the receipt (e.g. \"Ђ\", \"Е\", \"F\"). Pull valid labels from GET /receipt/tax-rates."},"amount":{"type":"number","readOnly":true,"description":"Tax amount for this label."},"rate":{"type":"number","readOnly":true,"description":"Tax rate in percent (e.g. 20 for Ђ, 10 for Е)."},"categoryName":{"type":"string","readOnly":true,"description":"Tax category name (e.g. \"VAT\", \"ECAL\")."}},"required":["categoryType","label","amount","rate","categoryName"]},"ReceiptDetailsDto":{"type":"object","properties":{"id":{"type":"number","readOnly":true},"invoiceNumber":{"type":"string","readOnly":true},"invoiceCounter":{"type":"string","readOnly":true},"buyerId":{"type":"string","nullable":true,"readOnly":true},"invoiceNumberPos":{"type":"string","nullable":true,"readOnly":true},"referentDocumentNumber":{"type":"string","nullable":true,"readOnly":true},"referentDocumentDt":{"format":"date-time","type":"string","nullable":true,"readOnly":true},"invoiceCounterExtension":{"type":"string","nullable":true,"readOnly":true},"address":{"type":"string","readOnly":true},"buyerCostCenterId":{"type":"string","nullable":true,"readOnly":true},"businessName":{"type":"string","readOnly":true},"locationName":{"type":"string","readOnly":true},"sdcDateTime":{"format":"date-time","type":"string","readOnly":true},"qrCodeFileUrl":{"type":"string","readOnly":true},"invoicePdfUrl":{"type":"string","readOnly":true},"verificationUrl":{"type":"string","readOnly":true},"totalAmount":{"type":"number","readOnly":true},"invoiceType":{"type":"string","readOnly":true},"transactionType":{"type":"string","readOnly":true},"orderNumber":{"type":"string","nullable":true,"readOnly":true},"cashier":{"type":"string","nullable":true,"readOnly":true},"items":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","readOnly":true},"payments":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"taxItems":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/TaxItemDto"}},"additional":{"type":"object","readOnly":true}},"required":["id","invoiceNumber","invoiceCounter","address","businessName","locationName","sdcDateTime","qrCodeFileUrl","invoicePdfUrl","verificationUrl","totalAmount","invoiceType","transactionType","items","metaFields","payments","taxItems","additional"]},"GatewayAdvanceFinalizeResponseDto":{"type":"object","properties":{"correlationId":{"type":"string","readOnly":true},"refundReceipt":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ReceiptDetailsDto"}]},"finalReceipt":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ReceiptDetailsDto"}]}},"required":["correlationId","refundReceipt","finalReceipt"]},"SaleGatewayRequestDto":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID (OPTIONAL for sale receipts; Required for refunds unless skipBuyerIdValidation is true). Format: \"type:identifier\" (e.g., \"10:123456789\")","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number (optional for sale receipts; required for refunds)","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]}},"required":["orderNumber","items"]},"GatewayCreateReceiptResponseDto":{"type":"object","properties":{"correlationId":{"type":"string","readOnly":true},"receipt":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ReceiptDetailsDto"}]}},"required":["correlationId","receipt"]},"RefundGatewayRequestDto":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID (REQUIRED for refunds unless skipBuyerIdValidation is true)","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number (REQUIRED for refunds)","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]}},"required":["orderNumber","buyerId","items"]},"WebhookConfigDto":{"type":"object","properties":{"url":{"type":"string","description":"Webhook URL to send data to","example":"https://api.example.com/webhooks/receipts"},"headers":{"type":"object","description":"Additional headers to include in webhook request","example":{"Custom-Header":"Value"}},"successStatusCodes":{"description":"HTTP status kodovi koji se smatraju uspehom. Ako je prazno/izostavljeno, prihvata se svaki 2xx.","example":[200,201,202],"type":"array","items":{"type":"number"}}},"required":["url"]},"CreateReceiptAsyncRequestDto":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]},"webhook":{"$ref":"#/components/schemas/WebhookConfigDto"}},"required":["orderNumber","buyerId","items"]},"CreateReceiptDraftRequestDto":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]},"draftName":{"type":"string","example":"My Draft Receipt"},"invoiceType":{"type":"string","enum":["normal","training","advance","proforma","copy"]},"transactionType":{"type":"string","enum":["sale","refund","finalize"]},"invoiceNumber":{"type":"string","example":"1234567890"},"invoiceCounter":{"type":"string","example":"1234567890"},"invoiceCounterExtension":{"type":"string","example":"1234567890"},"address":{"type":"string","example":"address"},"businessName":{"type":"string","example":"businessName"},"locationName":{"type":"string","example":"locationName"},"sdcDateTime":{"format":"date-time","type":"string","example":"2021-01-01"},"qrCodeFileUrl":{"type":"string","example":"qrCodeFileUrl"},"invoicePdfUrl":{"type":"string","example":"invoicePdfUrl"},"verificationUrl":{"type":"string","example":"verificationUrl"},"totalAmount":{"type":"number","example":100},"advanceItems":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"creationType":{"type":"string","enum":["api","user","swagger","migration"],"example":"api"},"storagePath":{"type":"string","example":"storagePath"},"filename":{"type":"string","example":"filename"},"correlationId":{"type":"string","example":"correlationId"}},"required":["orderNumber","buyerId","items","draftName"]},"GatewayCreateReceiptDraftResponseDto":{"type":"object","properties":{"id":{"type":"number","readOnly":true},"draftName":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true}},"required":["id","draftName","message"]},"UpdateReceiptDraftRequestDto":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]},"draftName":{"type":"string","example":"My Draft Receipt"},"invoiceType":{"type":"string","enum":["normal","training","advance","proforma","copy"]},"transactionType":{"type":"string","enum":["sale","refund","finalize"]},"invoiceNumber":{"type":"string","example":"1234567890"},"invoiceCounter":{"type":"string","example":"1234567890"},"invoiceCounterExtension":{"type":"string","example":"1234567890"},"address":{"type":"string","example":"address"},"businessName":{"type":"string","example":"businessName"},"locationName":{"type":"string","example":"locationName"},"sdcDateTime":{"format":"date-time","type":"string","example":"2021-01-01"},"qrCodeFileUrl":{"type":"string","example":"qrCodeFileUrl"},"invoicePdfUrl":{"type":"string","example":"invoicePdfUrl"},"verificationUrl":{"type":"string","example":"verificationUrl"},"totalAmount":{"type":"number","example":100},"advanceItems":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"creationType":{"type":"string","enum":["api","user","swagger","migration"],"example":"api"},"storagePath":{"type":"string","example":"storagePath"},"filename":{"type":"string","example":"filename"},"correlationId":{"type":"string","example":"correlationId"}},"required":["orderNumber","buyerId","items","draftName"]},"GatewayReceiptDraftResponseDto":{"type":"object","properties":{"id":{"type":"number","readOnly":true},"draftName":{"type":"string","readOnly":true},"orderNumber":{"type":"string","readOnly":true},"buyerId":{"type":"string","readOnly":true},"referentDocumentNumber":{"type":"string","readOnly":true},"referentDocumentDt":{"format":"date-time","type":"string","readOnly":true},"buyerCostCenterId":{"type":"string","readOnly":true},"cashier":{"type":"string","readOnly":true},"dateTimeOfIssue":{"format":"date-time","type":"string","readOnly":true},"invoiceType":{"type":"object","readOnly":true},"transactionType":{"type":"object","readOnly":true},"invoiceNumber":{"type":"string","readOnly":true},"invoiceCounter":{"type":"string","readOnly":true},"invoiceCounterExtension":{"type":"string","readOnly":true},"address":{"type":"string","readOnly":true},"businessName":{"type":"string","readOnly":true},"locationName":{"type":"string","readOnly":true},"sdcDateTime":{"format":"date-time","type":"string","readOnly":true},"qrCodeFileUrl":{"type":"string","readOnly":true},"invoicePdfUrl":{"type":"string","readOnly":true},"verificationUrl":{"type":"string","readOnly":true},"totalAmount":{"type":"number","readOnly":true},"advanceItems":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"creationType":{"type":"object","readOnly":true},"storagePath":{"type":"string","readOnly":true},"filename":{"type":"string","readOnly":true},"correlationId":{"type":"string","readOnly":true},"items":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","readOnly":true},"payments":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]},"companyId":{"type":"number","readOnly":true},"shopId":{"type":"number","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["id","draftName","orderNumber","buyerId","referentDocumentNumber","referentDocumentDt","buyerCostCenterId","cashier","dateTimeOfIssue","invoiceType","transactionType","invoiceNumber","invoiceCounter","invoiceCounterExtension","address","businessName","locationName","sdcDateTime","qrCodeFileUrl","invoicePdfUrl","verificationUrl","totalAmount","advanceItems","creationType","storagePath","filename","correlationId","items","metaFields","payments","settings","companyId","shopId","createdAt","updatedAt"]},"Object":{"type":"object","properties":{}},"GatewayGetReceiptDraftsResponseDto":{"type":"object","properties":{"page":{"type":"number","readOnly":true},"limit":{"type":"number","readOnly":true},"total":{"type":"number","readOnly":true},"totalPages":{"type":"number","readOnly":true},"isTotalCapped":{"type":"boolean","readOnly":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/GatewayReceiptDraftResponseDto"}}},"required":["page","limit","total","totalPages","isTotalCapped","data"]},"GatewayDeleteReceiptDraftResponseDto":{"type":"object","properties":{"success":{"type":"boolean","readOnly":true},"message":{"type":"string","readOnly":true}},"required":["success","message"]},"TaxRateDto":{"type":"object","properties":{"rate":{"type":"number","description":"Tax rate percentage","example":20},"label":{"type":"string","description":"Tax rate label (e.g. A, E, G)","example":"A"}},"required":["rate","label"]},"TaxCategoryDto":{"type":"object","properties":{"name":{"type":"string","description":"Tax category name","example":"Standard rate"},"categoryType":{"type":"number","description":"Tax category type identifier","example":1},"orderId":{"type":"number","description":"Display order","example":0},"taxRates":{"description":"List of tax rates in this category","type":"array","items":{"$ref":"#/components/schemas/TaxRateDto"}}},"required":["name","categoryType","orderId","taxRates"]},"TaxGroupDto":{"type":"object","properties":{"validFrom":{"format":"date-time","type":"string","description":"Date from which this tax group is valid","example":"2023-01-01T00:00:00.000Z"},"groupId":{"type":"number","description":"Tax group identifier","example":1},"taxCategories":{"description":"List of tax categories in this group","type":"array","items":{"$ref":"#/components/schemas/TaxCategoryDto"}}},"required":["validFrom","groupId","taxCategories"]},"GetTaxRatesResponseDto":{"type":"object","properties":{"currentTaxRates":{"description":"The currently active tax rate group","allOf":[{"$ref":"#/components/schemas/TaxGroupDto"}]},"allTaxRates":{"description":"All tax rate groups including historical ones","type":"array","items":{"$ref":"#/components/schemas/TaxGroupDto"}}},"required":["currentTaxRates","allTaxRates"]},"OmitTypeClass":{"type":"object","properties":{"orderNumber":{"type":"string","description":"Order number (REQUIRED, cannot be empty). Unique identifier for the transaction within your system. Maps to your internal POS transaction IDs.","example":"1234567890"},"buyerId":{"type":"string","description":"Buyer ID","example":"10:1234567890"},"referentDocumentNumber":{"type":"string","description":"Referent document number","example":"AAAAA-BBBBB-123","nullable":true},"referentDocumentDt":{"format":"date-time","type":"string","description":"Referent document date","example":"2026-10-04T22:08:37.163Z","nullable":true},"buyerCostCenterId":{"type":"string","description":"Buyer cost center ID","example":"10:123456789","nullable":true},"cashier":{"type":"string","description":"Cashier name","example":"cashier","nullable":true},"dateTimeOfIssue":{"format":"date-time","type":"string","description":"Date time of issue","example":"2026-10-04T22:08:37.164Z","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","description":"Optional. Your own key/values echoed onto the archived receipt (not required).","example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"settings":{"description":"Settings for the receipt","allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]}},"required":["orderNumber","buyerId","items"]},"CreateBulkReceiptRequestDto":{"type":"object","properties":{"receipts":{"description":"Array of receipts to create in bulk (max 30)","type":"array","items":{"$ref":"#/components/schemas/OmitTypeClass"}}},"required":["receipts"]},"ReceiptCreateAdditionalResponseDto":{"type":"object","properties":{"mrc":{"type":"string","description":"SDC MRC identifier (fiscal device code), e.g. \"99-3414-Dt1Ov2o0\"."},"signedBy":{"type":"string","description":"Security element identifier that signed the receipt."},"signature":{"type":"string","description":"Digital signature returned by the Tax Administration (PURS)."},"tin":{"type":"string","description":"Taxpayer TIN, e.g. \"RS112410326\"."},"requestedBy":{"type":"string","description":"Security element identifier that requested fiscalization."},"taxGroupRevision":{"type":"number","description":"Revision of the tax-rate group applied to this receipt."},"messages":{"type":"string","description":"PURS status message, e.g. \"Success\"."},"encryptedInternalData":{"type":"string","description":"Encrypted internal data block from the SDC (opaque)."},"journal":{"type":"string","description":"Plain-text receipt journal (for printing). In training mode it contains the \"ОВО НИЈЕ ФИСКАЛНИ РАЧУН\" marker."}},"required":["mrc","signedBy","signature","tin","requestedBy","taxGroupRevision","messages","encryptedInternalData","journal"]},"ReceiptCreateReceiptResponseDto":{"type":"object","properties":{"invoiceNumber":{"type":"string","description":"Fiscal receipt number (PFR), unique per shop, e.g. \"AZM5ZCCR-Dt1Ov2o0-507302\"."},"invoiceCounter":{"type":"string","description":"Receipt counter, e.g. \"468497/507302ОП\"."},"invoiceCounterExtension":{"type":"string","description":"Counter suffix indicating the receipt kind (e.g. \"ОП\" sale, \"ОР\" refund)."},"businessName":{"type":"string","description":"Seller / business name as registered."},"locationName":{"type":"string","description":"Point-of-sale (shop) name."},"sdcDateTime":{"type":"string","description":"Fiscalization timestamp from PURS (ISO 8601 UTC, \"Z\")."},"invoicePdfUrl":{"type":"string","description":"URL of the receipt PDF (hosted by Fiscomm)."},"verificationUrl":{"type":"string","description":"Tax Administration (PURS) verification URL for the customer."},"totalAmount":{"type":"number","description":"Receipt total amount."},"invoiceType":{"type":"string","description":"Invoice type (e.g. normal, training, advance, proforma, copy)."},"transactionType":{"type":"string","description":"Transaction type (sale or refund)."},"taxItems":{"description":"Tax breakdown, one entry per tax label.","type":"array","items":{"$ref":"#/components/schemas/TaxItemDto"}},"orderNumber":{"type":"string","description":"Your order number, echoed back from the request."},"metaFields":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom key/value pairs echoed back exactly as sent on the request."},"journal":{"type":"string","description":"Plain-text receipt journal (for printing). In training mode it contains the \"ОВО НИЈЕ ФИСКАЛНИ РАЧУН\" marker."},"additional":{"description":"Additional PURS data (signature, MRC, TIN, journal, …).","allOf":[{"$ref":"#/components/schemas/ReceiptCreateAdditionalResponseDto"}]}},"required":["invoiceNumber","invoiceCounter","invoiceCounterExtension","businessName","locationName","sdcDateTime","invoicePdfUrl","verificationUrl","totalAmount","invoiceType","transactionType","taxItems","orderNumber","journal","additional"]},"CreateBulkReceiptResponseDto":{"type":"object","properties":{"receipts":{"type":"array","items":{"$ref":"#/components/schemas/ReceiptCreateReceiptResponseDto"}},"failedReceipts":{"type":"array","items":{"type":"string"}},"totalProcessed":{"type":"number"},"successful":{"type":"number"},"failed":{"type":"number"}},"required":["receipts","failedReceipts","totalProcessed","successful","failed"]},"SendReceiptEmailRequestDto":{"type":"object","properties":{"invoiceNumber":{"type":"string","description":"Invoice number of the receipt to send"},"email":{"type":"string","description":"Primary email address to send the receipt to"},"cc":{"description":"CC (Carbon Copy) email addresses","example":["cc1@example.com","cc2@example.com"],"type":"array","items":{"type":"string"}},"bcc":{"description":"BCC (Blind Carbon Copy) email addresses","example":["bcc1@example.com","bcc2@example.com"],"type":"array","items":{"type":"string"}}},"required":["invoiceNumber","email"]},"SendEmailResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the email was accepted for delivery.","example":true},"messageId":{"type":"string","description":"Provider message id, when the email was accepted."},"error":{"type":"string","description":"Error detail, present only when `success` is false."},"correlationId":{"type":"string","description":"Correlation id of the request, for support/log lookups."}},"required":["success"]},"BaseRemoveEntityResponseDto":{"type":"object","properties":{"success":{"type":"boolean","readOnly":true,"example":true}},"required":["success"]},"CreateCashierRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cashier","example":"John Doe"},"shopId":{"type":"number","description":"Shop ID this cashier belongs to","example":1}},"required":["name","shopId"]},"CreateCashierResponseDto":{"type":"object","properties":{"id":{"type":"number","readOnly":true,"example":1},"name":{"type":"string","readOnly":true,"example":"John Doe"},"shopId":{"type":"number","readOnly":true,"example":1},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2023-01-01T00:00:00.000Z"}},"required":["id","name","shopId","createdAt","updatedAt"]},"FindOneCashierResponseDto":{"type":"object","properties":{"id":{"type":"number","readOnly":true,"example":1},"name":{"type":"string","readOnly":true,"example":"John Doe"},"shopId":{"type":"number","readOnly":true,"example":1},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2023-01-01T00:00:00.000Z"}},"required":["id","name","shopId","createdAt","updatedAt"]},"FilterCashiersResponseDto":{"type":"object","properties":{"page":{"type":"number","readOnly":true},"limit":{"type":"number","readOnly":true},"total":{"type":"number","readOnly":true},"totalPages":{"type":"number","readOnly":true},"isTotalCapped":{"type":"boolean","readOnly":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/FindOneCashierResponseDto"}}},"required":["page","limit","total","totalPages","isTotalCapped","data"]},"UpdateCashierRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cashier","example":"John Doe"},"shopId":{"type":"number","description":"Shop ID this cashier belongs to","example":1}}},"TaxLabelDto":{"type":"object","properties":{"rate":{"type":"number","description":"Tax rate (percentage)","example":20},"label":{"type":"string","description":"Tax label","example":"PDV"}},"required":["rate","label"]},"CreateShopProductRequestDto":{"type":"object","properties":{"productName":{"type":"string","description":"Product name","example":"Coca Cola 0.5L"},"taxLabel":{"description":"Tax label information","example":{"rate":20,"label":"PDV"},"allOf":[{"$ref":"#/components/schemas/TaxLabelDto"}]},"description":{"type":"string","description":"Product description","example":"Refreshing cola drink"},"gtin":{"type":"string","description":"Global Trade Item Number","example":"1234567890123"},"code":{"type":"string","description":"Product code","example":"CC-500ML"},"currencies":{"type":"object","description":"Currency prices mapping","example":{"USD":1.5,"EUR":1.3,"RSD":150}},"price":{"type":"number","description":"Product price","example":150,"default":0},"isActive":{"type":"boolean","description":"Whether the product is active","example":true,"default":true},"shopId":{"type":"number","description":"Shop ID this product belongs to","example":1}},"required":["productName","code","price","isActive","shopId"]},"CreateShopProductResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Shop product ID","example":1},"productName":{"type":"string","description":"Product name","example":"Coca Cola 0.5L"},"taxLabel":{"description":"Tax label information","example":{"rate":20,"label":"PDV"},"allOf":[{"$ref":"#/components/schemas/TaxLabelDto"}]},"description":{"type":"string","description":"Product description","example":"Refreshing cola drink"},"gtin":{"type":"string","description":"Global Trade Item Number","example":"1234567890123"},"code":{"type":"string","description":"Product code","example":"CC-500ML"},"currencies":{"type":"object","description":"Currency prices mapping","example":{"USD":1.5,"EUR":1.3,"RSD":150}},"price":{"type":"number","description":"Product price","example":150},"isActive":{"type":"boolean","description":"Whether the product is active","example":true},"shopId":{"type":"number","description":"Shop ID this product belongs to","example":1},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp","example":"2023-01-01T00:00:00.000Z"}},"required":["id","productName","code","price","isActive","shopId","createdAt","updatedAt"]},"FindOneShopProductResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Shop product ID","example":1},"productName":{"type":"string","description":"Product name","example":"Coca Cola 0.5L"},"taxLabel":{"description":"Tax label information","example":{"rate":20,"label":"PDV"},"allOf":[{"$ref":"#/components/schemas/TaxLabelDto"}]},"description":{"type":"string","description":"Product description","example":"Refreshing cola drink"},"gtin":{"type":"string","description":"Global Trade Item Number","example":"1234567890123"},"code":{"type":"string","description":"Product code","example":"CC-500ML"},"currencies":{"type":"object","description":"Currency prices mapping","example":{"USD":1.5,"EUR":1.3,"RSD":150}},"price":{"type":"number","description":"Product price","example":150},"isActive":{"type":"boolean","description":"Whether the product is active","example":true},"shopId":{"type":"number","description":"Shop ID this product belongs to","example":1},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp","example":"2023-01-01T00:00:00.000Z"}},"required":["id","productName","code","price","isActive","shopId","createdAt","updatedAt"]},"FilterShopProductsResponseDto":{"type":"object","properties":{"page":{"type":"number","readOnly":true},"limit":{"type":"number","readOnly":true},"total":{"type":"number","readOnly":true},"totalPages":{"type":"number","readOnly":true},"isTotalCapped":{"type":"boolean","readOnly":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/FindOneShopProductResponseDto"}}},"required":["page","limit","total","totalPages","isTotalCapped","data"]},"UpdateShopProductRequestDto":{"type":"object","properties":{"productName":{"type":"string","description":"Product name","example":"Coca Cola 0.5L"},"taxLabel":{"description":"Tax label information","example":{"rate":20,"label":"PDV"},"allOf":[{"$ref":"#/components/schemas/TaxLabelDto"}]},"description":{"type":"string","description":"Product description","example":"Refreshing cola drink"},"gtin":{"type":"string","description":"Global Trade Item Number","example":"1234567890123"},"code":{"type":"string","description":"Product code","example":"CC-500ML"},"currencies":{"type":"object","description":"Currency prices mapping","example":{"USD":1.5,"EUR":1.3,"RSD":150}},"price":{"type":"number","description":"Product price","example":150,"default":0},"isActive":{"type":"boolean","description":"Whether the product is active","example":true,"default":true},"shopId":{"type":"number","description":"Shop ID this product belongs to","example":1}}},"ImportShopProductsResultDto":{"type":"object","properties":{"imported":{"type":"number","description":"Number of products successfully imported","example":150},"failed":{"type":"number","description":"Number of products that failed to import","example":5},"total":{"type":"number","description":"Total number of products in the CSV file","example":155},"errors":{"description":"Array of errors for failed imports","example":[{"row":2,"errors":["Product code already exists","Invalid price format"]},{"row":5,"errors":["Product name is required"]}],"type":"array","items":{"type":"string"}},"importedIds":{"description":"Array of successfully imported product IDs","example":[1,2,3,4,5],"type":"array","items":{"type":"string"}}},"required":["imported","failed","total","errors","importedIds"]},"ReceiptAdditionalDto":{"type":"object","properties":{"encryptedInternalData":{"type":"string","readOnly":true},"journal":{"type":"string","readOnly":true},"signedBy":{"type":"string","readOnly":true},"mrc":{"type":"string","readOnly":true},"tin":{"type":"string","readOnly":true},"requestedBy":{"type":"string","readOnly":true},"taxGroupRevision":{"type":"string","readOnly":true},"signature":{"type":"string","readOnly":true},"messages":{"type":"string","readOnly":true}},"required":["encryptedInternalData","journal","signedBy","mrc","tin","requestedBy","taxGroupRevision","signature","messages"]},"ReceiptDto":{"type":"object","properties":{"id":{"type":"number","readOnly":true},"invoiceNumber":{"type":"string","readOnly":true},"invoiceCounter":{"type":"string","readOnly":true},"invoiceCounterExtension":{"type":"string","readOnly":true},"buyerId":{"type":"string","readOnly":true},"orderNumber":{"type":"string","readOnly":true},"referentDocumentNumber":{"type":"string","readOnly":true},"referentDocumentDt":{"format":"date-time","type":"string","readOnly":true},"address":{"type":"string","readOnly":true},"buyerCostCenterId":{"type":"string","readOnly":true},"businessName":{"type":"string","readOnly":true},"locationName":{"type":"string","readOnly":true},"sdcDateTime":{"format":"date-time","type":"string","readOnly":true},"dateTimeOfIssue":{"format":"date-time","type":"string","readOnly":true},"qrCodeFileUrl":{"type":"string","readOnly":true},"invoicePdfUrl":{"type":"string","readOnly":true},"storagePath":{"type":"string","readOnly":true},"filename":{"type":"string","readOnly":true},"cashier":{"type":"string","readOnly":true},"items":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"metaFields":{"type":"object","readOnly":true,"example":{"customer_name":"John Doe","order_id":"12345"}},"payments":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}},"taxItems":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/TaxItemDto"}},"additional":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ReceiptAdditionalDto"}]},"verificationUrl":{"type":"string","readOnly":true},"invoiceType":{"type":"string","readOnly":true},"transactionType":{"type":"string","readOnly":true},"companyId":{"type":"string","readOnly":true},"shopId":{"type":"string","readOnly":true},"totalAmount":{"type":"number","readOnly":true},"settings":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/CreateReceiptSettingsDto"}]},"pdfGeneratedAt":{"format":"date-time","type":"string","readOnly":true},"advanceItems":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ItemDto"}},"company":{"type":"object","readOnly":true},"shop":{"type":"object","readOnly":true},"apiKey":{"type":"object","readOnly":true},"user":{"type":"object","readOnly":true},"chain":{"readOnly":true,"type":"array","items":{"type":"object"}}},"required":["id","invoiceNumber","invoiceCounter","invoiceCounterExtension","buyerId","orderNumber","referentDocumentNumber","referentDocumentDt","address","buyerCostCenterId","businessName","locationName","sdcDateTime","dateTimeOfIssue","qrCodeFileUrl","invoicePdfUrl","storagePath","filename","cashier","items","metaFields","payments","taxItems","additional","verificationUrl","invoiceType","transactionType","companyId","shopId","totalAmount","settings","pdfGeneratedAt","advanceItems","company","shop","apiKey","user","chain"]},"GetReceiptsResponseDto":{"type":"object","properties":{"page":{"type":"number","readOnly":true},"limit":{"type":"number","readOnly":true},"total":{"type":"number","readOnly":true},"totalPages":{"type":"number","readOnly":true},"isTotalCapped":{"type":"boolean","readOnly":true},"data":{"description":"List of receipts, each receipt is an object of type ReceiptDto","type":"array","items":{"$ref":"#/components/schemas/ReceiptDto"}}},"required":["page","limit","total","totalPages","isTotalCapped","data"]},"ReceiptFiscalizationLookupRequestDto":{"type":"object","properties":{"orderNumbers":{"description":"Merchant Pro order numbers for fiscalization lookup","example":["1001","1002"],"type":"array","items":{"type":"string"}},"startDate":{"type":"string","description":"Lower bound for sdcDateTime filter (inclusive)","example":"2026-06-01T00:00:00.000Z"}},"required":["orderNumbers"]},"ChainReceiptSummaryDto":{"type":"object","properties":{"id":{"type":"number","description":"Receipt ID"},"invoiceNumber":{"type":"string","description":"Invoice number"},"chainType":{"type":"string","description":"Chain type","enum":["prepayment","advance_sale","finalization"]},"chainPosition":{"type":"number","description":"Position in chain"},"totalAmount":{"type":"number","description":"Total amount"},"sdcDateTime":{"format":"date-time","type":"string","description":"SDC date and time"},"pendingReference":{"type":"boolean","description":"Whether this receipt has a pending reference"},"businessName":{"type":"string","description":"Business name"},"transactionType":{"type":"string","description":"Transaction type"},"invoiceType":{"type":"string","description":"Invoice type"},"paymentType":{"type":"string","description":"Payment type associated with receipt"},"orderNumber":{"type":"string","description":"Order number associated with receipt"},"payments":{"type":"array","description":"Payments for this receipt","items":{"type":"object"}},"items":{"type":"array","description":"Items for this receipt","items":{"type":"object"}}},"required":["id","invoiceNumber","chainType","chainPosition","totalAmount","sdcDateTime","pendingReference","businessName","transactionType","invoiceType","paymentType","orderNumber","payments","items"]},"ChainMetadataDto":{"type":"object","properties":{"familyId":{"type":"number","description":"Family ID that groups chain receipts"},"totalChainReceipts":{"type":"number","description":"Total number of receipts in this chain"},"hasPendingReferences":{"type":"boolean","description":"Whether the chain has any pending references"},"chainCreatedAt":{"format":"date-time","type":"string","description":"Chain creation timestamp"},"chainUpdatedAt":{"format":"date-time","type":"string","description":"Last chain update timestamp"}},"required":["familyId","totalChainReceipts","hasPendingReferences","chainCreatedAt","chainUpdatedAt"]},"ReceiptWithChainResponseDto":{"type":"object","properties":{"receipt":{"description":"The main receipt data","allOf":[{"$ref":"#/components/schemas/ReceiptDto"}]},"chain":{"description":"Chain receipts (excluding current receipt)","type":"array","items":{"$ref":"#/components/schemas/ChainReceiptSummaryDto"}},"chainMetadata":{"description":"Chain metadata","allOf":[{"$ref":"#/components/schemas/ChainMetadataDto"}]}},"required":["receipt","chain","chainMetadata"]},"VerifyTokenResponseDto":{"type":"object","properties":{"isValid":{"type":"boolean","readOnly":true,"example":true},"companyAccessBlocked":{"type":"boolean","readOnly":true,"example":false},"companyDeleted":{"type":"boolean","readOnly":true,"example":false},"companyClosureDate":{"type":"object","readOnly":true,"example":null}},"required":["isValid","companyAccessBlocked","companyDeleted","companyClosureDate"]},"GetApiKeyInfoResponseDto":{"type":"object","properties":{"apiKeyId":{"type":"number","readOnly":true,"example":4},"apiKeyName":{"type":"string","readOnly":true,"example":"WordPress plugin key"},"companyId":{"type":"number","readOnly":true,"example":12},"companyName":{"type":"string","readOnly":true,"example":"Firma d.o.o."},"shopId":{"type":"number","readOnly":true,"example":7},"shopName":{"type":"string","readOnly":true,"example":"Glavni shop"}},"required":["apiKeyId","apiKeyName","companyId","companyName","shopId","shopName"]}}},"externalDocs":{"description":"LLM agent guide (llms.txt)","url":"https://api.fiscomm.rs/llms.txt"},"x-logo":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH5wkaCicEJR6nugAABMRJREFUWMPtlk9sFFUcxz+z292dmf3bLS1iq6xQUQPaQ0uDETQhEg56MNFo/EeMRD1I4KCJiTGYmHgzwcjBBEOMB6MxGA6GREHQSMCUGk1qlVICBdKKFFpIt93ZmffPw86W0m7pQrzBL3l58172/T7f3/e9mX1wO271sG50wdmRiepjAxALc4iwsbQ18/8LCKER4C6gG1gNLAfy4XwROAv8DvwKnASEiccpNNs3L2AG+CHgFeAJoBBWXys0MGqMOQR8DhwG/MbWDFmrNiq6ADwLvAV8DGyYUXHNMMZYQAp4EHgqEokUJkulgbZ8auxSQ57en76fs6ZmJTP2eRuw/XpCTYV8zThiWRSnpjJ/HB/Y3NPXt/z46aGnk449Xmv9fFYCPAC8Oh+8FhhjsCyLE0Nn2HvwIGdGRrATiTVLmhc9rLTeVyvPHDtnVP8ksLQW2BgzDa+OjTFgWfx58iS79uxhaHiYdDJJPpO1c+n0+pJX5p2PdtXtgA2sn7W/1BpPO2FZXLg0xrf7D1Au++SzOVKuQ8p1cR2n886WlqTSeqpeAS3AitngmbYbA4aKE9X5nr4+rhSL5LNZUq5D0nVDAfbddjzeZAwLCwiBzVRO/DXgWn1VYLFU4vTwMLl0mnQyScp1KwIch6TjZOOxWKOBc/U6kAYS1wNW9706vjIxgdKaxkxmGp50HFKOg+s48XgslgxLqcuBOZVPA2fBq78XUk44icRpJ5HQKdd1Uq6bS7luY9J17KTtWLFYg2Xm8ucVUDTgA841sBlwrXWlNwajDU3Z3JHmfOMmIaW0E4m4nUjk7ESi4NpOd9J1umINsYm6HNAVAaPAuDEmN7taPS3AoI2+2hvtPNbVNWVhed0d9wCM9g+eHyw05fcP/jvqWFblz6peBy4aY04YY5bp2XCt0aEDWld6pTVa6zZtdB4YqeZatWJJ9dGb56zN/RBprRFSlpXWB1WYXCmFVAopJUIphJRhEwRh80XQ6gfBqkAIDh7tp96Y48B9y5rpHzwPsM8Ys0VrU6hYXak4rDbsFUprpFIopZ2pUunZbdvfP9LV2TlJoYPXXn4JLIhGomit2fXB2ws7AKC0ZuW9dwwIpb4QSppqxYEUlaqFIBABFAo+wG+H+AHPpNe6cVCe/ueQ729rxfa29f29v+15uL45Y3RaDTbEK39xtec7bi/lWN9Q1iW9alS6hGl9OMqrFYpjdLq6rYohZQKqSTRSDSxrrNz4+WJiQ2+CLxcJm015XJfti1e/POVYrGmgHkvJId/G0QbTcSyVkmldkululXF6hAsQ3DlTMjpcyG5MDbG6Pg4adc9ls9mXwiEOPXm88+wuDlV3xYArOtaQRAETJZK/ULITUEg9pb9QHh+Ga9cxiv7lMplSp5HyfOY9DwmSyWKU1PEGhpYsmjR0XQy+Ybn+6cc264Jv64D18R0p38kLKbv9IFgbCLHSF6JFCCEDKf+RUnZKpfaLKf+ORCTyk3e3LJj3hq/lAFs/3EnfiQEeXd3doLW2hRBm5PvltoZmdaCnhx9377iZtLfjFo3/Aa/lM5mOf74fAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA5LTI2VDEwOjM5OjA0KzAwOjAwYL0n4gAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wOS0yNlQxMDozOTowNCswMDowMBHgn14AAABXelRYdFJhdyBwcm9maWxlIHR5cGUgaXB0YwAAeJzj8gwIcVYoKMpPy8xJ5VIAAyMLLmMLEyMTS5MUAxMgRIA0w2QDI7NUIMvY1MjEzMQcxAfLgEigSi4A6hcRdPJCNZUAAAAASUVORK5CYII="}}