Skip to content
Reference

Fiscal documents

Synchronous Normal Sale issuance, copies, receipt representations, the electronic journal and the turnover report.

8 operations

Search the journal

get/v1/fiscal-documents

Scopefiscal:read

The organization's electronic journal: every issuance attempt, including rejected ones and unknown outcomes. Filter by taxpayer, premise, status, type, time, reference, PFR number, cashier and buyer; pages continue through the cursor.

Contract notes (OpenAPI)

Returns durable fiscal-operation state ordered by createdAt and id, both descending. createdFrom and pfrFrom are inclusive; createdTo and pfrTo are exclusive. The opaque cursor continues the same ordering. A journal entry whose fiscalized value is false is not a fiscal receipt. Scoped to the caller's environment: a machine credential never sees documents of the other environment, and fetching one by id is 404.

Parameters

listFiscalDocuments: Parameters
FieldDescription
taxpayerIdoptionalIn: queryType: uuid
businessPremiseIdoptionalIn: queryType: uuid
fiscalDocumentIdoptionalIn: queryType: uuid
statusoptionalIn: queryType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

invoiceTypeoptionalIn: queryType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeoptionalIn: queryType: TransactionType

ValuesSALEREFUND

createdFromoptionalIn: queryType: date-timeInclusive lower bound for durable operation creation time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
createdTooptionalIn: queryType: date-timeExclusive upper bound for durable operation creation time. Any RFC 3339 offset is accepted and compared as an instant.
pfrFromoptionalIn: queryType: date-timeInclusive lower bound for authoritative PFR signing time; excludes entries with no PFR receipt. Any RFC 3339 offset is accepted and compared as an instant.
pfrTooptionalIn: queryType: date-timeExclusive upper bound for authoritative PFR signing time; excludes entries with no PFR receipt. Any RFC 3339 offset is accepted and compared as an instant.
idempotencyKeyoptionalIn: queryType: string

max 200

clientReferenceoptionalIn: queryType: string

max 200

pfrNumberoptionalIn: queryType: string

max 500

cashierIdoptionalIn: queryType: string

max 500

buyerIdoptionalIn: queryType: string

max 500

searchoptionalIn: queryType: stringCase-insensitive contains search across safe identifiers only; raw PFR payload, journal, metadata, and secrets are excluded.

max 200

cursoroptionalIn: queryType: stringOpaque keyset cursor returned by the preceding journal page.

max 200

pageSizeoptionalIn: queryType: integer

>= 1<= 200default 50

Responses

listFiscalDocuments: Responses
200OKPage of fiscal documentsFiscalDocumentPage
400Bad RequestThe command violates a Boka or fiscal ruleErrorCode
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: FiscalDocumentPage

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

listFiscalDocuments: Response
FieldDescription
itemsrequiredType: array<FiscalDocument>
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

cashierIdrequiredType: string
buyerIdoptionalType: string | null (nullable)
buyerDetailsoptionalType: FiscalBuyerDetails | null (nullable)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNamerequiredType: string

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedrequiredType: boolean
failureCodeoptionalType: string | null (nullable)
pfrRejectionoptionalType: object | null (nullable)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsrequiredType: array<object>

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

retryablerequiredType: boolean
pfroptionalType: PfrResult | null (nullable)
invoiceNumberrequiredType: string
sdcTimerequiredType: date-time
requestedByrequiredType: string
signedByrequiredType: string
transactionTypeCounteroptionalType: integer | null (nullable)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteroptionalType: integer | null (nullable)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionoptionalType: string | null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequiredType: number
totalTaxoptionalType: number | null (nullable)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlrequiredType: uri
journalrequiredType: string
receiptoptionalType: ReceiptRepresentations | null (nullable)
textUrlrequiredType: uri-reference
jsonUrlrequiredType: uri-reference
pdfA4UrlrequiredType: uri-reference
pdf80mmUrlrequiredType: uri-reference
pdf58mmUrlrequiredType: uri-reference
previewImageUrlrequiredType: uri-reference
qrImageUrlrequiredType: uri-reference
verificationUrlrequiredType: uri
preferredPaperFormatrequiredType: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
nextCursorrequiredType: string | null (nullable)

Issue a Normal Sale receipt

post/v1/fiscal-documents

Scopefiscal:writeRequires Idempotency-Key

The main call. Send the items, payments, cashier and, when needed, the buyer; BokaPOS signs the request with the premise's security element, submits it to the V-PFR and returns 201 only once the signed response is durably stored. Refunds, advances, proforma and training have their own workflows and are rejected here.

Contract notes (OpenAPI)

Accepts a business-level command and succeeds only after a signed V-PFR result has been durably recorded. A 503 response is not a fiscal receipt. When it carries `retryable: true`, nothing reached the V-PFR, and repeating the identical command under the same Idempotency-Key drives the same reserved operation (and RequestId) again after the same checks as a first attempt; the retry that finally issues the receipt answers 201. A 503 with `retryable: false` (an unknown outcome, or a deployment-side refusal) is answered from storage and is never resubmitted. Refund commands are rejected here and must use a server-managed workflow. Advance, Proforma, and Training chains must use their dedicated workflow APIs. An optional unitPriceBeforeDiscount is a Boka-local immutable display/audit fact; unitPrice is always the final reduced gross price sent to V-PFR. No discount field is invented in the supplier request. Repeating the identical command under the same Idempotency-Key after a 201 answers 200 with the stored document and never fiscalizes a second time; only the first 201 with fiscalized=true is the issuing of a receipt.

Request bodyapplication/json

createFiscalDocument: Request body
FieldDescription
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: stringCaller-owned order, invoice, or transaction reference.
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

cashierrequiredType: Cashier
idrequiredType: string
displayNameoptionalType: string
buyeroptionalType: Buyer
idoptionalType: stringOfficial prefix and value, for example 10:123456789.
optionalFieldoptionalType: stringOfficial buyer-cost-center prefix and value where applicable, printed as Опционо поље купца. Allowed only on a Normal Sale: any other invoice type or transaction type is rejected with 422, because the official manual testing procedure lists the field appearing on a receipt that is not a Промет Продаја as a reason to reject an ESIR. A Copy of a Normal Sale that carried it is issued without it for the same reason, and closing an advance case applies it only to the final Normal Sale, never to the closing Advance Refund.
referenceoptionalType: ReferenceTarget

One of: BokaDocumentReference | ExternalFiscalReference

BokaDocumentReference
sourcerequiredType: const "BOKA"
fiscalDocumentIdrequiredType: uuid
ExternalFiscalReference
sourcerequiredType: const "EXTERNAL"
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

transactionOccurredAtoptionalType: date-timeAccepted only for an Advance Sale containing a wire-transfer payment, where the official earlier-payment ESIR-time rule applies; it never overrides PFR time.
itemsrequiredType: array<LineItem>

min 1 items

catalogProductIdoptionalType: uuidOptional; arbitrary inline items are permitted.
namerequiredType: string

min 1max 2048

unitOfMeasureoptionalType: stringRequired on every item except the codebook advance literals (10: Аванс (Ђ) and siblings), which are prescribed verbatim without a unit. The API refuses any other item without one (422, Items.UnitOfMeasure) and composes it into the signed item name as name/unit.

min 1max 50

quantityrequiredType: numberV-PFR Decimal(14,3).

>= 0.001<= 99999999999.999step 0.001

unitPricerequiredType: numberFinal gross unit price sent to V-PFR as Decimal(28,4). Boka applies the mandated fiscal rounding rules.

>= 0step 0.01

unitPriceBeforeDiscountoptionalType: numberOptional Boka-local immutable gross unit price before discount. When present it must be greater than unitPrice; it is displayed outside the exact PFR journal and is never sent as a supplier field.

>= 0step 0.0001

gtinoptionalType: string

min 8max 14

taxLabelsrequiredType: array<string>

min 1 itemsunique

paymentsrequiredType: array<Payment>

min 1 items

typerequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

amountrequiredType: numberAt most two decimals (the V-PFR rejects more with validation code 2804); the field type on the wire is Decimal(28,4).

>= 0step 0.01

commercialFooteroptionalType: stringNon-fiscal text rendered only in the permitted area outside the fiscal boundary.
metadataoptionalType: objectNon-fiscal caller metadata; never sent as a substitute for a mandated field.

Responses

createFiscalDocument: Responses
200OKIdempotent replay of the already fiscalized document under the same Idempotency-Key; no new receipt was issuedFiscalDocument
201CreatedFiscalized documentFiscalDocument
409ConflictThe key was already used with different canonical contentIdempotencyConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument

Examples

buyer

POST/v1/fiscal-documents
curl -X POST "https://api.bokapos.rs/v1/fiscal-documents" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-4128-sale-1" \
  -H "Content-Type: application/json" \
  -d '{
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "clientReference": "ORDER-4128",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashier": {
    "id": "web-shop"
  },
  "buyer": {
    "id": "10:106952811"
  },
  "items": [
    {
      "name": "Godišnja licenca",
      "unitOfMeasure": "kom",
      "quantity": 2,
      "unitPrice": 12000,
      "taxLabels": [
        "F"
      ]
    },
    {
      "name": "Instalacija",
      "unitOfMeasure": "h",
      "quantity": 1.5,
      "unitPrice": 4000,
      "unitPriceBeforeDiscount": 5000,
      "taxLabels": [
        "F"
      ]
    }
  ],
  "payments": [
    {
      "type": "WIRE_TRANSFER",
      "amount": 20000
    },
    {
      "type": "CARD",
      "amount": 10000
    }
  ],
  "commercialFooter": "Hvala na kupovini. Reklamacije: podrska@primer.rs"
}'
201Created
{
  "id": "8e7d6c5b-4a39-4210-8765-fedcba987650",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-4128-sale-1",
  "clientReference": "ORDER-4128",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": "10:106952811",
  "buyerDetails": {
    "legalName": "PRIMER DOO BEOGRAD",
    "taxIdentifier": "106952811",
    "registrationNumber": "20712345",
    "address": "Bulevar kralja Aleksandra 1",
    "city": "Beograd",
    "source": "nbs-jrr",
    "resolvedAt": "2026-09-01T08:20:11.004Z"
  },
  "status": "FISCALIZED",
  "fiscalized": true,
  "failureCode": null,
  "retryable": false,
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1043",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "transactionTypeCounter": 898,
    "totalCounter": 1043,
    "invoiceCounterExtension": "ПП",
    "totalAmount": 30000,
    "totalTax": 2972.973,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1043\nБројач рачуна:                898/1043ПП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
  },
  "receipt": {
    "textUrl": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/official-text",
    "jsonUrl": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/canonical-json",
    "pdfA4Url": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/pdf-a4",
    "pdf80mmUrl": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/pdf-80mm",
    "pdf58mmUrl": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/pdf-58mm",
    "previewImageUrl": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/preview-png",
    "qrImageUrl": "/v1/fiscal-documents/8e7d6c5b-4a39-4210-8765-fedcba987650/representations/qr-svg",
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "preferredPaperFormat": "a4"
  },
  "createdAt": "2026-09-01T08:15:31.902Z",
  "updatedAt": "2026-09-01T08:15:32.611Z"
}
Response: FiscalDocument

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

createFiscalDocument: Response
FieldDescription
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

cashierIdrequiredType: string
buyerIdoptionalType: string | null (nullable)
buyerDetailsoptionalType: FiscalBuyerDetails | null (nullable)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNamerequiredType: string

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedrequiredType: boolean
failureCodeoptionalType: string | null (nullable)
pfrRejectionoptionalType: object | null (nullable)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsrequiredType: array<object>

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

retryablerequiredType: boolean
pfroptionalType: PfrResult | null (nullable)
invoiceNumberrequiredType: string
sdcTimerequiredType: date-time
requestedByrequiredType: string
signedByrequiredType: string
transactionTypeCounteroptionalType: integer | null (nullable)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteroptionalType: integer | null (nullable)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionoptionalType: string | null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequiredType: number
totalTaxoptionalType: number | null (nullable)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlrequiredType: uri
journalrequiredType: string
receiptoptionalType: ReceiptRepresentations | null (nullable)
textUrlrequiredType: uri-reference
jsonUrlrequiredType: uri-reference
pdfA4UrlrequiredType: uri-reference
pdf80mmUrlrequiredType: uri-reference
pdf58mmUrlrequiredType: uri-reference
previewImageUrlrequiredType: uri-reference
qrImageUrlrequiredType: uri-reference
verificationUrlrequiredType: uri
preferredPaperFormatrequiredType: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Export the journal (CSV)

get/v1/fiscal-documents/export

Scopefiscal:read

The same filters as the search; the result is a deterministic CSV of at most 10,000 rows without raw PFR data. When more rows match the request fails as a whole, so narrow the period.

Contract notes (OpenAPI)

Applies the same tenant-scoped filters and descending createdAt/id ordering as the electronic journal. The export contains at most 10,000 safe projection rows and never includes the raw fiscal command, caller metadata, complete PFR response, official journal text, verification URL, signature data, or secret material. Text cells that could be interpreted as spreadsheet formulas are neutralized. If more than 10,000 rows match, the request fails without returning a partial file.

Parameters

exportFiscalDocuments: Parameters
FieldDescription
taxpayerIdoptionalIn: queryType: uuid
businessPremiseIdoptionalIn: queryType: uuid
fiscalDocumentIdoptionalIn: queryType: uuid
statusoptionalIn: queryType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

invoiceTypeoptionalIn: queryType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeoptionalIn: queryType: TransactionType

ValuesSALEREFUND

createdFromoptionalIn: queryType: date-timeInclusive lower bound for durable operation creation time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
createdTooptionalIn: queryType: date-timeExclusive upper bound for durable operation creation time. Any RFC 3339 offset is accepted and compared as an instant.
pfrFromoptionalIn: queryType: date-timeInclusive lower bound for authoritative PFR signing time; excludes entries with no PFR receipt. Any RFC 3339 offset is accepted and compared as an instant.
pfrTooptionalIn: queryType: date-timeExclusive upper bound for authoritative PFR signing time; excludes entries with no PFR receipt. Any RFC 3339 offset is accepted and compared as an instant.
idempotencyKeyoptionalIn: queryType: string

max 200

clientReferenceoptionalIn: queryType: string

max 200

pfrNumberoptionalIn: queryType: string

max 500

cashierIdoptionalIn: queryType: string

max 500

buyerIdoptionalIn: queryType: string

max 500

searchoptionalIn: queryType: stringCase-insensitive contains search across safe identifiers only; raw PFR payload, journal, metadata, and secrets are excluded.

max 200

Responses

exportFiscalDocuments: Responses
200OKComplete filtered journal CSV in stable descending order

Response headers: Boka-Export-Schema-Version=boka-fiscal-journal-csv-v2, Content-Disposition

422Unprocessable ContentInvalid filters or more than 10,000 matching rowsErrorCode
Response: ErrorCode

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

exportFiscalDocuments: Response
FieldDescription
coderequiredType: string
messageoptionalType: string

Turnover report

get/v1/fiscal-documents/turnover-report

Scopefiscal:read

A local immutable sum of fiscalized Normal and Advance receipts by PFR time, with Sale and Refund as separate positive amounts, per payment type and per tax label. Not a substitute for the SUF portal reports.

Contract notes (OpenAPI)

Aggregates only tenant-scoped FISCALIZED Normal (Promet) and Advance (Avans) receipts whose authoritative PFR signing time is within the inclusive pfrFrom and exclusive pfrTo bounds. Sale and Refund amounts remain separate positive totals; the API does not infer a net value. Payment data comes from the hash-verified canonical request and tax bases/tax amounts come from the hash-verified complete PFR response. This is a Boka-local immutable report, not the SUF portal daily report; it does not claim SUF-only knowledge about missing or scanned receipts.

Parameters

getTurnoverReport: Parameters
FieldDescription
taxpayerIdrequiredIn: queryType: uuid
businessPremiseIdrequiredIn: queryType: uuid
pfrFromrequiredIn: queryType: date-timeInclusive lower bound for authoritative PFR signing time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
pfrTorequiredIn: queryType: date-timeExclusive upper bound for authoritative PFR signing time. Any RFC 3339 offset is accepted and compared as an instant.

Responses

getTurnoverReport: Responses
200OKImmutable local turnover reportTurnoverReport
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409ConflictA selected receipt failed source-integrity validation or totals exceeded the supported decimal rangeErrorCode
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: TurnoverReport

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

getTurnoverReport: Response
FieldDescription
sourcerequiredType: const "BOKA_LOCAL_IMMUTABLE_PFR"
periodBasisrequiredType: const "PFR_SDC_TIME"
amountConventionrequiredType: const "SALE_REFUND_SEPARATE"
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
pfrFromrequiredType: date-timeInclusive authoritative PFR signing-time bound.
pfrTorequiredType: date-timeExclusive authoritative PFR signing-time bound.
documentCountrequiredType: integer

>= 0

firstDocumentrequiredType: TurnoverBoundary | null (nullable)
fiscalDocumentIdrequiredType: uuid
pfrInvoiceNumberrequiredType: string
pfrTimerequiredType: date-time
lastDocumentrequiredType: TurnoverBoundary | null (nullable)
fiscalDocumentIdrequiredType: uuid
pfrInvoiceNumberrequiredType: string
pfrTimerequiredType: date-time
paymentTotalsrequiredType: array<TurnoverPaymentTotal>
securityElementJidrequiredType: string
paymentTyperequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

saleAmountrequiredType: number

>= 0

refundAmountrequiredType: number

>= 0

taxTotalsrequiredType: array<TurnoverTaxTotal>
invoiceTyperequiredType: string

ValuesNORMALADVANCE

categoryTyperequiredType: integer

>= 0<= 2

labelrequiredType: string
raterequiredType: number

>= 0

categoryNamerequiredType: string
saleTaxableAmountrequiredType: numberSum of the Boka-derived taxable base per label (see ReceiptCanonicalTaxItem.taxableAmountPerLabel) over the Sale documents in the period; four decimals, as the V-PFR tax amounts it is reconciled with.

>= 0

saleTaxAmountrequiredType: numberSum of the V-PFR signed tax amounts for the label over the Sale documents in the period.

>= 0

saleTotalAmountrequiredType: numberGross of the receipt lines carrying the label over the Sale documents in the period (taxable base plus tax).

>= 0

refundTaxableAmountrequiredType: numberAs saleTaxableAmount

>= 0

refundTaxAmountrequiredType: numberAs saleTaxAmount

>= 0

refundTotalAmountrequiredType: numberAs saleTotalAmount

>= 0

Export the turnover report (CSV)

get/v1/fiscal-documents/turnover-report/export

Scopefiscal:read

The same report as the JSON version, as a normalized CSV with SUMMARY, FIRST_DOCUMENT, LAST_DOCUMENT, PAYMENT_TOTAL and TAX_TOTAL rows.

Contract notes (OpenAPI)

Reuses the exact same hash-reverified BOKA_LOCAL_IMMUTABLE_PFR report result as the JSON operation. The normalized CSV contains SUMMARY, FIRST_DOCUMENT, LAST_DOCUMENT, PAYMENT_TOTAL, and TAX_TOTAL record types. Sale and Refund remain separate positive amounts. This is not a SUF portal report and contains no official receipt journal or raw PFR payload.

Parameters

exportTurnoverReport: Parameters
FieldDescription
taxpayerIdrequiredIn: queryType: uuid
businessPremiseIdrequiredIn: queryType: uuid
pfrFromrequiredIn: queryType: date-timeInclusive lower bound for authoritative PFR signing time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
pfrTorequiredIn: queryType: date-timeExclusive upper bound for authoritative PFR signing time. Any RFC 3339 offset is accepted and compared as an instant.

Responses

exportTurnoverReport: Responses
200OKComplete normalized turnover-report CSV

Response headers: Boka-Export-Schema-Version=boka-turnover-report-csv-v1, Content-Disposition

404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409ConflictA selected receipt failed source-integrity validation or totals exceeded the supported decimal rangeErrorCode
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: ErrorCode

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

exportTurnoverReport: Response
FieldDescription
coderequiredType: string
messageoptionalType: string

Read a document

get/v1/fiscal-documents/{fiscalDocumentId}

Scopefiscal:read

The state of one document with PFR data and representation links. A rejected document also carries pfrRejection here, with the property path and the V-PFR code, which the list never returns.

Parameters

getFiscalDocument: Parameters
FieldDescription
fiscalDocumentIdrequiredIn: pathType: uuid

Responses

getFiscalDocument: Responses
200OKFiscal documentFiscalDocument
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode

Examples

rejected

GET/v1/fiscal-documents/{fiscalDocumentId}
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"
200OK
{
  "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-4129-sale-1",
  "clientReference": "ORDER-4129",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": null,
  "buyerDetails": null,
  "status": "REJECTED",
  "fiscalized": false,
  "failureCode": "PFR_VALIDATION_REJECTED",
  "retryable": false,
  "pfr": null,
  "receipt": null,
  "createdAt": "2026-09-01T08:15:31.902Z",
  "updatedAt": "2026-09-01T08:15:32.611Z",
  "pfrRejection": {
    "items": [
      {
        "property": "items[0].unitPrice",
        "codes": [
          "2804"
        ]
      }
    ]
  }
}

Code 2804 (format) is what the sandbox returns for a price with more than two decimals. A rejected document is not a receipt; correct the request and send it with a new key.

Response: FiscalDocument

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

getFiscalDocument: Response
FieldDescription
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

cashierIdrequiredType: string
buyerIdoptionalType: string | null (nullable)
buyerDetailsoptionalType: FiscalBuyerDetails | null (nullable)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNamerequiredType: string

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedrequiredType: boolean
failureCodeoptionalType: string | null (nullable)
pfrRejectionoptionalType: object | null (nullable)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsrequiredType: array<object>

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

retryablerequiredType: boolean
pfroptionalType: PfrResult | null (nullable)
invoiceNumberrequiredType: string
sdcTimerequiredType: date-time
requestedByrequiredType: string
signedByrequiredType: string
transactionTypeCounteroptionalType: integer | null (nullable)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteroptionalType: integer | null (nullable)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionoptionalType: string | null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequiredType: number
totalTaxoptionalType: number | null (nullable)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlrequiredType: uri
journalrequiredType: string
receiptoptionalType: ReceiptRepresentations | null (nullable)
textUrlrequiredType: uri-reference
jsonUrlrequiredType: uri-reference
pdfA4UrlrequiredType: uri-reference
pdf80mmUrlrequiredType: uri-reference
pdf58mmUrlrequiredType: uri-reference
previewImageUrlrequiredType: uri-reference
qrImageUrlrequiredType: uri-reference
verificationUrlrequiredType: uri
preferredPaperFormatrequiredType: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Issue a copy

post/v1/fiscal-documents/{fiscalDocumentId}/copies

Scopefiscal:writeRequires Idempotency-Key

An official copy of a Normal or Advance document, built on the server from the stored original and signed as a new document. A refund copy carries the customer-signature line. Proforma, Training and Copy documents cannot be copied.

Contract notes (OpenAPI)

Issues a Copy (Копија Продаја or Копија Рефундација) of a fiscalized Normal or Advance document. The copy is built on the server from the stored original: the same items, payments, buyer identification and stored buyer lines, referenced to the original's PFR number and time, with the cashier given here. It is signed by the V-PFR as a new document and prints ОВО НИЈЕ ФИСКАЛНИ РАЧУН; a Копија Рефундација prints the customer signature line. Copy, Proforma and Training documents cannot be copied (422 COPY_SOURCE_NOT_COPYABLE), nor can a document that is not fiscalized (422 COPY_SOURCE_NOT_FISCALIZED). Same idempotency and outcome rules as createFiscalDocument.

Parameters

createFiscalDocumentCopy: Parameters
FieldDescription
fiscalDocumentIdrequiredIn: pathType: uuid

Request bodyapplication/json

createFiscalDocumentCopy: Request body
FieldDescription
cashierrequiredType: Cashier
idrequiredType: string
displayNameoptionalType: string
clientReferenceoptionalType: string | null (nullable)Defaults to COPY- followed by the original's client reference.

max 200

Responses

createFiscalDocumentCopy: Responses
200OKIdempotent replay of the already fiscalized copy under the same Idempotency-Key; no new document was issuedFiscalDocument
201CreatedFiscalized copyFiscalDocument
404Not FoundThe original does not exist in this organization (code FISCAL_DOCUMENT_NOT_FOUND)
409ConflictThe key was already used with different canonical contentIdempotencyConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument
Response: FiscalDocument

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

createFiscalDocumentCopy: Response
FieldDescription
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

cashierIdrequiredType: string
buyerIdoptionalType: string | null (nullable)
buyerDetailsoptionalType: FiscalBuyerDetails | null (nullable)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNamerequiredType: string

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedrequiredType: boolean
failureCodeoptionalType: string | null (nullable)
pfrRejectionoptionalType: object | null (nullable)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsrequiredType: array<object>

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

retryablerequiredType: boolean
pfroptionalType: PfrResult | null (nullable)
invoiceNumberrequiredType: string
sdcTimerequiredType: date-time
requestedByrequiredType: string
signedByrequiredType: string
transactionTypeCounteroptionalType: integer | null (nullable)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteroptionalType: integer | null (nullable)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionoptionalType: string | null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequiredType: number
totalTaxoptionalType: number | null (nullable)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlrequiredType: uri
journalrequiredType: string
receiptoptionalType: ReceiptRepresentations | null (nullable)
textUrlrequiredType: uri-reference
jsonUrlrequiredType: uri-reference
pdfA4UrlrequiredType: uri-reference
pdf80mmUrlrequiredType: uri-reference
pdf58mmUrlrequiredType: uri-reference
previewImageUrlrequiredType: uri-reference
qrImageUrlrequiredType: uri-reference
verificationUrlrequiredType: uri
preferredPaperFormatrequiredType: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Fetch a receipt representation

get/v1/fiscal-documents/{fiscalDocumentId}/representations/{representationFormat}

Scopefiscal:read

Seven representations of the same fiscalized receipt: the official journal text, canonical JSON, the QR code (SVG), PDF in A4, 80 mm and 58 mm, and a PNG preview. Each is generated from the immutable package and carries an ETag.

Contract notes (OpenAPI)

Generates the selected representation only from a tenant-scoped FISCALIZED operation after rechecking the canonical request and complete original PFR response hashes. official-text is the exact stored supplier journal. canonical-json omits caller metadata and opaque encrypted/signature values. The direct PDF and PNG preview layouts keep the verification QR at 45 mm. Fixed media use only bundled local rendering resources and include no network-loaded content. No representation is generated for an unresolved, rejected, unavailable, corrupt, or non-fiscalized operation.

Parameters

getFiscalDocumentRepresentation: Parameters
FieldDescription
fiscalDocumentIdrequiredIn: pathType: uuid
representationFormatrequiredIn: pathType: string

Valuescanonical-jsonofficial-textqr-svgpdf-a4pdf-80mmpdf-58mmpreview-png

Responses

getFiscalDocumentRepresentation: Responses
200OKSelected immutable receipt representationReceiptCanonicalPackage

Response headers: ETag, Boka-Receipt-Representation-Version=boka-receipt-representation-v27, Boka-Receipt-Source-Sha256, Boka-Receipt-Branding-Sha256

404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409ConflictReceipt unavailable or stored source integrity validation failedErrorCode

Examples

text

GET/v1/fiscal-documents/{fiscalDocumentId}/representations/{representationFormat}
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/official-text" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"
200OKtext/plain
============ ФИСКАЛНИ РАЧУН ============
115711881
BOKA GROUP DOO
BokaPOS sandbox
Роза Луксембург 16
Београд-Раковица
Касир:                          web-shop
ЕСИР број:                    1774/1.0.1
-------------ПРОМЕТ ПРОДАЈА-------------
Артикли
========================================
Назив   Цена         Кол.         Укупно
Bluetooth slušalice/kom (F)
       8.990,00          1       8.990,00
----------------------------------------
Укупан износ:                   8.990,00
Платна картица:                 8.990,00
========================================
Ознака       Име      Стопа        Порез
F           ECAL   11,00%         890,90
----------------------------------------
Укупан износ пореза:              890,90
========================================
ПФР време:          01.09.2026. 10:15:32
ПФР број рачуна:      JWX4K9PL-JWX4K9PL-1042
Бројач рачуна:                 897/1042ПП
========================================
======== КРАЈ ФИСКАЛНОГ РАЧУНА =========

json

GET/v1/fiscal-documents/{fiscalDocumentId}/representations/{representationFormat}
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/canonical-json" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"
200OK
{
  "schemaVersion": "boka-receipt-representation-v24",
  "sourceSha256": "5d41402abc4b2a76b9719d911017c592e99f0d3b4a7c1e6f8b2d9a0c3e5f7a1b",
  "canonicalRequestSha256": "9b74c9897bac770ffc029102a200c5de3a4b1c6d7e8f9a0b1c2d3e4f5a6b7c8d",
  "originalPfrResponseSha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
  "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "clientReference": "ORDER-4127",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "request": {
    "cashierId": "web-shop",
    "cashierDisplayName": "Web shop",
    "buyer": null,
    "items": [
      {
        "name": "Bluetooth slušalice",
        "unitOfMeasure": "kom",
        "quantity": 1,
        "unitPrice": 8990,
        "gtin": "8606012345678",
        "taxLabels": [
          "F"
        ]
      }
    ],
    "payments": [
      {
        "type": "CARD",
        "amount": 8990
      }
    ],
    "reference": null,
    "transactionOccurredAt": null,
    "commercialFooter": null
  },
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1042",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "invoiceCounter": "897/1042ПП",
    "invoiceCounterExtension": "ПП",
    "totalCounter": 1042,
    "transactionTypeCounter": 897,
    "totalAmount": 8990,
    "taxGroupRevision": 8,
    "taxItems": [
      {
        "categoryType": 0,
        "label": "F",
        "amount": 890.9009,
        "rate": 11,
        "categoryName": "ECAL",
        "taxableAmountPerLabel": 8099.0991
      }
    ],
    "businessName": "BOKA GROUP DOO",
    "tin": "115711881",
    "locationName": "BokaPOS sandbox",
    "address": "Роза Луксембург 16",
    "district": "Београд-Раковица",
    "mrc": null,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "officialJournal": "============ ФИСКАЛНИ РАЧУН ============\n115711881\nBOKA GROUP DOO\nBokaPOS sandbox\nРоза Луксембург 16\nБеоград-Раковица\nКасир:                          web-shop\nЕСИР број:                    1774/1.0.1\n-------------ПРОМЕТ ПРОДАЈА-------------\nАртикли\n========================================\nНазив   Цена         Кол.         Укупно\nBluetooth slušalice/kom (F)\n       8.990,00          1       8.990,00\n----------------------------------------\nУкупан износ:                   8.990,00\nПлатна картица:                 8.990,00\n========================================\nОзнака       Име      Стопа        Порез\nF           ECAL   11,00%         890,90\n----------------------------------------\nУкупан износ пореза:              890,90\n========================================\nПФР време:          01.09.2026. 10:15:32\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1042\nБројач рачуна:                 897/1042ПП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========",
    "officialJournalSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "opaqueFiscalDataStored": true
  },
  "branding": null
}
Response: ReceiptCanonicalPackage

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

getFiscalDocumentRepresentation: Response
FieldDescription
schemaVersionrequiredType: const "boka-receipt-representation-v27"
sourceSha256requiredType: string

pattern ^[0-9a-f]{64}$

canonicalRequestSha256requiredType: string

pattern ^[0-9a-f]{64}$

originalPfrResponseSha256requiredType: string

pattern ^[0-9a-f]{64}$

fiscalDocumentIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

requestrequiredType: ReceiptCanonicalRequest
cashierIdrequiredType: string
cashierDisplayNameoptionalType: string | null (nullable)
buyeroptionalType: Buyer | null (nullable)
idoptionalType: stringOfficial prefix and value, for example 10:123456789.
optionalFieldoptionalType: stringOfficial buyer-cost-center prefix and value where applicable, printed as Опционо поље купца. Allowed only on a Normal Sale: any other invoice type or transaction type is rejected with 422, because the official manual testing procedure lists the field appearing on a receipt that is not a Промет Продаја as a reason to reject an ESIR. A Copy of a Normal Sale that carried it is issued without it for the same reason, and closing an advance case applies it only to the final Normal Sale, never to the closing Advance Refund.
itemsrequiredType: array<LineItem>

min 1 items

catalogProductIdoptionalType: uuidOptional; arbitrary inline items are permitted.
namerequiredType: string

min 1max 2048

unitOfMeasureoptionalType: stringRequired on every item except the codebook advance literals (10: Аванс (Ђ) and siblings), which are prescribed verbatim without a unit. The API refuses any other item without one (422, Items.UnitOfMeasure) and composes it into the signed item name as name/unit.

min 1max 50

quantityrequiredType: numberV-PFR Decimal(14,3).

>= 0.001<= 99999999999.999step 0.001

unitPricerequiredType: numberFinal gross unit price sent to V-PFR as Decimal(28,4). Boka applies the mandated fiscal rounding rules.

>= 0step 0.01

unitPriceBeforeDiscountoptionalType: numberOptional Boka-local immutable gross unit price before discount. When present it must be greater than unitPrice; it is displayed outside the exact PFR journal and is never sent as a supplier field.

>= 0step 0.0001

gtinoptionalType: string

min 8max 14

taxLabelsrequiredType: array<string>

min 1 itemsunique

paymentsrequiredType: array<Payment>

min 1 items

typerequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

amountrequiredType: numberAt most two decimals (the V-PFR rejects more with validation code 2804); the field type on the wire is Decimal(28,4).

>= 0step 0.01

referenceoptionalType: ReceiptCanonicalReference | null (nullable)
sourcerequiredType: string

ValuesBOKAEXTERNAL

fiscalDocumentIdoptionalType: uuid | null (nullable)
pfrNumberoptionalType: string | null (nullable)
pfrTimeoptionalType: date-time | null (nullable)
transactionOccurredAtoptionalType: date-time | null (nullable)
commercialFooteroptionalType: string | null (nullable)Non-fiscal text rendered only outside the marked fiscal boundary.

max 2000

buyerDetailsoptionalType: FiscalBuyerDetails | null (nullable)The buyer's company-registry facts stored with the operation; printed under the buyer identification in every representation. Absent or null when none were resolved.
legalNamerequiredType: string

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
pfrrequiredType: ReceiptCanonicalPfr
invoiceNumberrequiredType: string
sdcTimerequiredType: date-time
requestedByrequiredType: string
signedByrequiredType: string
invoiceCounterrequiredType: string
invoiceCounterExtensionrequiredType: string
totalCounterrequiredType: integer
transactionTypeCounterrequiredType: integer
totalAmountrequiredType: number
taxGroupRevisionrequiredType: integer
taxItemsrequiredType: array<ReceiptCanonicalTaxItem>

min 1 items

categoryTyperequiredType: integer

>= 0<= 2

labelrequiredType: string
amountrequiredType: number

>= 0

raterequiredType: number

>= 0

categoryNamerequiredType: string
taxableAmountPerLabelrequiredType: numberBoka-derived, not signed by the V-PFR. The v3 Create Invoice response carries only label, categoryName, categoryType, rate and amount per tax item; the v4 protocol (deployed only in Eswatini) defines this field as the sum of the POS-supplied per-item taxable amounts. BokaPOS computes it the same way from the stored receipt lines: the gross of every line carrying the label, minus that label's V-PFR tax amount. For a single-label line this is exactly the official value; a line with several labels contributes its full gross to each of them.

>= 0

businessNamerequiredType: string
tinrequiredType: string
locationNamerequiredType: string
addressrequiredType: string
districtrequiredType: string
mrcoptionalType: string | null (nullable)
verificationUrlrequiredType: uri
officialJournalrequiredType: string
officialJournalSha256requiredType: string

pattern ^[0-9a-f]{64}$

opaqueFiscalDataStoredrequiredType: const trueConfirms presence in the hashed original response without exposing opaque values.
brandingrequiredType: ReceiptCanonicalBranding | null (nullable)
revisionIdrequiredType: uuid
contentSha256requiredType: string

pattern ^[0-9a-f]{64}$

businessPremiseIdoptionalType: uuid | null (nullable)
headerLogoAssetIdoptionalType: uuid | null (nullable)
headerLogoSha256optionalType: string | null (nullable)

pattern ^[0-9a-f]{64}$

footerLogoAssetIdoptionalType: uuid | null (nullable)
footerLogoSha256optionalType: string | null (nullable)

pattern ^[0-9a-f]{64}$

displayNameoptionalType: string | null (nullable)
websiteoptionalType: uri | null (nullable)
phoneoptionalType: string | null (nullable)
emailoptionalType: email | null (nullable)
thankYouSroptionalType: string | null (nullable)
thankYouEnoptionalType: string | null (nullable)
supportSroptionalType: string | null (nullable)
supportEnoptionalType: string | null (nullable)
preferredPaperFormatrequiredType: string

Values80mm58mma4