Pređi na sadržaj
Referenca

Fiskalni dokumenti

Sinhrono izdavanje računa za promet, kopije, prikazi računa, elektronski dnevnik i izveštaj o prometu.

8 operacija

Pretraži dnevnik

get/v1/fiscal-documents

Scopefiscal:read

Elektronski dnevnik organizacije: svaki pokušaj izdavanja, uključujući odbijene i one sa nepoznatim ishodom. Filtrira se po obvezniku, prodajnom mestu, statusu, vrsti, vremenu, referenci, PFR broju, kasiru i kupcu; stranice se nižu preko cursor-a.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

listFiscalDocuments: Parametri
PoljeOpis
taxpayerIdopcionoGde: queryTip: uuid
businessPremiseIdopcionoGde: queryTip: uuid
fiscalDocumentIdopcionoGde: queryTip: uuid
statusopcionoGde: queryTip: FiscalDocumentStatus

VrednostiRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

invoiceTypeopcionoGde: queryTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeopcionoGde: queryTip: TransactionType

VrednostiSALEREFUND

createdFromopcionoGde: queryTip: 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.
createdToopcionoGde: queryTip: date-timeExclusive upper bound for durable operation creation time. Any RFC 3339 offset is accepted and compared as an instant.
pfrFromopcionoGde: queryTip: 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.
pfrToopcionoGde: queryTip: 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.
idempotencyKeyopcionoGde: queryTip: string

max 200

clientReferenceopcionoGde: queryTip: string

max 200

pfrNumberopcionoGde: queryTip: string

max 500

cashierIdopcionoGde: queryTip: string

max 500

buyerIdopcionoGde: queryTip: string

max 500

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

max 200

cursoropcionoGde: queryTip: stringOpaque keyset cursor returned by the preceding journal page.

max 200

pageSizeopcionoGde: queryTip: integer

>= 1<= 200default 50

Odgovori

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

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

listFiscalDocuments: Odgovor
PoljeOpis
itemsobaveznoTip: array<FiscalDocument>
idobaveznoTip: uuid
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
idempotencyKeyobaveznoTip: string
clientReferenceobaveznoTip: string
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

cashierIdobaveznoTip: string
buyerIdopcionoTip: string | null (može biti null)
buyerDetailsopcionoTip: FiscalBuyerDetails | null (može biti null)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.
legalNameobaveznoTip: string

max 350

taxIdentifierobaveznoTip: string

pattern ^[0-9]{9}$

registrationNumberopcionoTip: string | null (može biti null)

pattern ^[0-9]{8}$

addressopcionoTip: string | null (može biti null)

max 300

cityopcionoTip: string | null (može biti null)

max 100

sourceobaveznoTip: string

Vrednostinbs-jrr

resolvedAtobaveznoTip: date-time
statusobaveznoTip: FiscalDocumentStatus

VrednostiRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedobaveznoTip: boolean
failureCodeopcionoTip: string | null (može biti null)
pfrRejectionopcionoTip: object | null (može biti null)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.
itemsobaveznoTip: array<object>

max 10 items

propertyobaveznoTip: string

max 120

codesobaveznoTip: array<string>

max 5 items

retryableobaveznoTip: boolean
pfropcionoTip: PfrResult | null (može biti null)
invoiceNumberobaveznoTip: string
sdcTimeobaveznoTip: date-time
requestedByobaveznoTip: string
signedByobaveznoTip: string
transactionTypeCounteropcionoTip: integer | null (može biti null)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.
totalCounteropcionoTip: integer | null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionoTip: string | null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznoTip: number
totalTaxopcionoTip: number | null (može biti null)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.
verificationUrlobaveznoTip: uri
journalobaveznoTip: string
receiptopcionoTip: ReceiptRepresentations | null (može biti null)
textUrlobaveznoTip: uri-reference
jsonUrlobaveznoTip: uri-reference
pdfA4UrlobaveznoTip: uri-reference
pdf80mmUrlobaveznoTip: uri-reference
pdf58mmUrlobaveznoTip: uri-reference
previewImageUrlobaveznoTip: uri-reference
qrImageUrlobaveznoTip: uri-reference
verificationUrlobaveznoTip: uri
preferredPaperFormatobaveznoTip: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Vrednosti80mm58mma4

referenceopcionoTip: ResolvedReference
fiscalDocumentIdopcionoTip: uuid
pfrNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
createdAtobaveznoTip: date-time
updatedAtobaveznoTip: date-time
nextCursorobaveznoTip: string | null (može biti null)

Izdaj račun za promet

post/v1/fiscal-documents

Scopefiscal:writeZahteva Idempotency-Key

Glavni poziv. Šaljete stavke, plaćanja, kasira i po potrebi kupca; BokaPOS potpiše zahtev bezbednosnim elementom prodajnog mesta, pošalje ga V-PFR-u i vraća 201 tek kada je potpisani odgovor trajno sačuvan. Refundacije, avansi, predračun i obuka imaju svoje tokove i ovde se odbijaju.

Beleške iz ugovora (OpenAPI, engleski)

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.

Telo zahtevaapplication/json

createFiscalDocument: Telo zahteva
PoljeOpis
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
clientReferenceobaveznoTip: stringCaller-owned order, invoice, or transaction reference.
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

cashierobaveznoTip: Cashier
idobaveznoTip: string
displayNameopcionoTip: string
buyeropcionoTip: Buyer
idopcionoTip: stringOfficial prefix and value, for example 10:123456789.
optionalFieldopcionoTip: 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.
referenceopcionoTip: ReferenceTarget

Jedna od varijanti: BokaDocumentReference | ExternalFiscalReference

BokaDocumentReference
sourceobaveznoTip: const "BOKA"
fiscalDocumentIdobaveznoTip: uuid
ExternalFiscalReference
sourceobaveznoTip: const "EXTERNAL"
pfrNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

transactionOccurredAtopcionoTip: 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.
itemsobaveznoTip: array<LineItem>

min 1 items

catalogProductIdopcionoTip: uuidOptional; arbitrary inline items are permitted.
nameobaveznoTip: string

min 1max 2048

unitOfMeasureopcionoTip: 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

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

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

unitPriceBeforeDiscountopcionoTip: 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

gtinopcionoTip: string

min 8max 14

taxLabelsobaveznoTip: array<string>

min 1 itemsunique

paymentsobaveznoTip: array<Payment>

min 1 items

typeobaveznoTip: PaymentType

VrednostiOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

amountobaveznoTip: 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

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

Odgovori

createFiscalDocument: Odgovori
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

Primeri

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"
}
Odgovor: FiscalDocument

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

createFiscalDocument: Odgovor
PoljeOpis
idobaveznoTip: uuid
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
idempotencyKeyobaveznoTip: string
clientReferenceobaveznoTip: string
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

cashierIdobaveznoTip: string
buyerIdopcionoTip: string | null (može biti null)
buyerDetailsopcionoTip: FiscalBuyerDetails | null (može biti null)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.
legalNameobaveznoTip: string

max 350

taxIdentifierobaveznoTip: string

pattern ^[0-9]{9}$

registrationNumberopcionoTip: string | null (može biti null)

pattern ^[0-9]{8}$

addressopcionoTip: string | null (može biti null)

max 300

cityopcionoTip: string | null (može biti null)

max 100

sourceobaveznoTip: string

Vrednostinbs-jrr

resolvedAtobaveznoTip: date-time
statusobaveznoTip: FiscalDocumentStatus

VrednostiRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedobaveznoTip: boolean
failureCodeopcionoTip: string | null (može biti null)
pfrRejectionopcionoTip: object | null (može biti null)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.
itemsobaveznoTip: array<object>

max 10 items

propertyobaveznoTip: string

max 120

codesobaveznoTip: array<string>

max 5 items

retryableobaveznoTip: boolean
pfropcionoTip: PfrResult | null (može biti null)
invoiceNumberobaveznoTip: string
sdcTimeobaveznoTip: date-time
requestedByobaveznoTip: string
signedByobaveznoTip: string
transactionTypeCounteropcionoTip: integer | null (može biti null)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.
totalCounteropcionoTip: integer | null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionoTip: string | null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznoTip: number
totalTaxopcionoTip: number | null (može biti null)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.
verificationUrlobaveznoTip: uri
journalobaveznoTip: string
receiptopcionoTip: ReceiptRepresentations | null (može biti null)
textUrlobaveznoTip: uri-reference
jsonUrlobaveznoTip: uri-reference
pdfA4UrlobaveznoTip: uri-reference
pdf80mmUrlobaveznoTip: uri-reference
pdf58mmUrlobaveznoTip: uri-reference
previewImageUrlobaveznoTip: uri-reference
qrImageUrlobaveznoTip: uri-reference
verificationUrlobaveznoTip: uri
preferredPaperFormatobaveznoTip: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Vrednosti80mm58mma4

referenceopcionoTip: ResolvedReference
fiscalDocumentIdopcionoTip: uuid
pfrNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
createdAtobaveznoTip: date-time
updatedAtobaveznoTip: date-time

Izvezi dnevnik (CSV)

get/v1/fiscal-documents/export

Scopefiscal:read

Isti filteri kao pretraga, rezultat je deterministički CSV do 10.000 redova bez sirovih PFR podataka. Ako se poklopi više redova, zahtev pada u celini, pa suzite period.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

exportFiscalDocuments: Parametri
PoljeOpis
taxpayerIdopcionoGde: queryTip: uuid
businessPremiseIdopcionoGde: queryTip: uuid
fiscalDocumentIdopcionoGde: queryTip: uuid
statusopcionoGde: queryTip: FiscalDocumentStatus

VrednostiRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

invoiceTypeopcionoGde: queryTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeopcionoGde: queryTip: TransactionType

VrednostiSALEREFUND

createdFromopcionoGde: queryTip: 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.
createdToopcionoGde: queryTip: date-timeExclusive upper bound for durable operation creation time. Any RFC 3339 offset is accepted and compared as an instant.
pfrFromopcionoGde: queryTip: 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.
pfrToopcionoGde: queryTip: 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.
idempotencyKeyopcionoGde: queryTip: string

max 200

clientReferenceopcionoGde: queryTip: string

max 200

pfrNumberopcionoGde: queryTip: string

max 500

cashierIdopcionoGde: queryTip: string

max 500

buyerIdopcionoGde: queryTip: string

max 500

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

max 200

Odgovori

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

Zaglavlja odgovora: Boka-Export-Schema-Version=boka-fiscal-journal-csv-v2, Content-Disposition

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

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

exportFiscalDocuments: Odgovor
PoljeOpis
codeobaveznoTip: string
messageopcionoTip: string

Izveštaj o prometu

get/v1/fiscal-documents/turnover-report

Scopefiscal:read

Lokalni nepromenljivi zbir fiskalizovanih računa za promet i avans po PFR vremenu, sa prodajom i refundacijom kao odvojenim pozitivnim iznosima, po načinu plaćanja i po poreskoj oznaci. Nije zamena za izveštaje na SUF portalu.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

getTurnoverReport: Parametri
PoljeOpis
taxpayerIdobaveznoGde: queryTip: uuid
businessPremiseIdobaveznoGde: queryTip: uuid
pfrFromobaveznoGde: queryTip: 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.
pfrToobaveznoGde: queryTip: date-timeExclusive upper bound for authoritative PFR signing time. Any RFC 3339 offset is accepted and compared as an instant.

Odgovori

getTurnoverReport: Odgovori
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
Odgovor: TurnoverReport

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

getTurnoverReport: Odgovor
PoljeOpis
sourceobaveznoTip: const "BOKA_LOCAL_IMMUTABLE_PFR"
periodBasisobaveznoTip: const "PFR_SDC_TIME"
amountConventionobaveznoTip: const "SALE_REFUND_SEPARATE"
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
pfrFromobaveznoTip: date-timeInclusive authoritative PFR signing-time bound.
pfrToobaveznoTip: date-timeExclusive authoritative PFR signing-time bound.
documentCountobaveznoTip: integer

>= 0

firstDocumentobaveznoTip: TurnoverBoundary | null (može biti null)
fiscalDocumentIdobaveznoTip: uuid
pfrInvoiceNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
lastDocumentobaveznoTip: TurnoverBoundary | null (može biti null)
fiscalDocumentIdobaveznoTip: uuid
pfrInvoiceNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
paymentTotalsobaveznoTip: array<TurnoverPaymentTotal>
securityElementJidobaveznoTip: string
paymentTypeobaveznoTip: PaymentType

VrednostiOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

saleAmountobaveznoTip: number

>= 0

refundAmountobaveznoTip: number

>= 0

taxTotalsobaveznoTip: array<TurnoverTaxTotal>
invoiceTypeobaveznoTip: string

VrednostiNORMALADVANCE

categoryTypeobaveznoTip: integer

>= 0<= 2

labelobaveznoTip: string
rateobaveznoTip: number

>= 0

categoryNameobaveznoTip: string
saleTaxableAmountobaveznoTip: 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

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

>= 0

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

>= 0

refundTaxableAmountobaveznoTip: numberAs saleTaxableAmount

>= 0

refundTaxAmountobaveznoTip: numberAs saleTaxAmount

>= 0

refundTotalAmountobaveznoTip: numberAs saleTotalAmount

>= 0

Izvezi izveštaj o prometu (CSV)

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

Scopefiscal:read

Isti izveštaj kao JSON verzija, u normalizovanom CSV-u sa redovima SUMMARY, FIRST_DOCUMENT, LAST_DOCUMENT, PAYMENT_TOTAL i TAX_TOTAL.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

exportTurnoverReport: Parametri
PoljeOpis
taxpayerIdobaveznoGde: queryTip: uuid
businessPremiseIdobaveznoGde: queryTip: uuid
pfrFromobaveznoGde: queryTip: 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.
pfrToobaveznoGde: queryTip: date-timeExclusive upper bound for authoritative PFR signing time. Any RFC 3339 offset is accepted and compared as an instant.

Odgovori

exportTurnoverReport: Odgovori
200OKComplete normalized turnover-report CSV

Zaglavlja odgovora: 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
Odgovor: ErrorCode

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

exportTurnoverReport: Odgovor
PoljeOpis
codeobaveznoTip: string
messageopcionoTip: string

Pročitaj dokument

get/v1/fiscal-documents/{fiscalDocumentId}

Scopefiscal:read

Stanje jednog dokumenta sa PFR podacima i linkovima ka prikazima. Odbijen dokument ovde nosi i pfrRejection sa putanjom polja i šifrom V-PFR-a, što lista nikad ne vraća.

Parametri

getFiscalDocument: Parametri
PoljeOpis
fiscalDocumentIdobaveznoGde: pathTip: uuid

Odgovori

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

Primeri

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"
        ]
      }
    ]
  }
}

Šifra 2804 (format) je ono što sandbox vraća za cenu sa više od dve decimale. Odbijen dokument nije račun; ispravite zahtev i pošaljite ga sa novim ključem.

Odgovor: FiscalDocument

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

getFiscalDocument: Odgovor
PoljeOpis
idobaveznoTip: uuid
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
idempotencyKeyobaveznoTip: string
clientReferenceobaveznoTip: string
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

cashierIdobaveznoTip: string
buyerIdopcionoTip: string | null (može biti null)
buyerDetailsopcionoTip: FiscalBuyerDetails | null (može biti null)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.
legalNameobaveznoTip: string

max 350

taxIdentifierobaveznoTip: string

pattern ^[0-9]{9}$

registrationNumberopcionoTip: string | null (može biti null)

pattern ^[0-9]{8}$

addressopcionoTip: string | null (može biti null)

max 300

cityopcionoTip: string | null (može biti null)

max 100

sourceobaveznoTip: string

Vrednostinbs-jrr

resolvedAtobaveznoTip: date-time
statusobaveznoTip: FiscalDocumentStatus

VrednostiRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedobaveznoTip: boolean
failureCodeopcionoTip: string | null (može biti null)
pfrRejectionopcionoTip: object | null (može biti null)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.
itemsobaveznoTip: array<object>

max 10 items

propertyobaveznoTip: string

max 120

codesobaveznoTip: array<string>

max 5 items

retryableobaveznoTip: boolean
pfropcionoTip: PfrResult | null (može biti null)
invoiceNumberobaveznoTip: string
sdcTimeobaveznoTip: date-time
requestedByobaveznoTip: string
signedByobaveznoTip: string
transactionTypeCounteropcionoTip: integer | null (može biti null)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.
totalCounteropcionoTip: integer | null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionoTip: string | null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznoTip: number
totalTaxopcionoTip: number | null (može biti null)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.
verificationUrlobaveznoTip: uri
journalobaveznoTip: string
receiptopcionoTip: ReceiptRepresentations | null (može biti null)
textUrlobaveznoTip: uri-reference
jsonUrlobaveznoTip: uri-reference
pdfA4UrlobaveznoTip: uri-reference
pdf80mmUrlobaveznoTip: uri-reference
pdf58mmUrlobaveznoTip: uri-reference
previewImageUrlobaveznoTip: uri-reference
qrImageUrlobaveznoTip: uri-reference
verificationUrlobaveznoTip: uri
preferredPaperFormatobaveznoTip: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Vrednosti80mm58mma4

referenceopcionoTip: ResolvedReference
fiscalDocumentIdopcionoTip: uuid
pfrNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
createdAtobaveznoTip: date-time
updatedAtobaveznoTip: date-time

Izdaj kopiju

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

Scopefiscal:writeZahteva Idempotency-Key

Zvanična Копија računa za promet ili avans, izgrađena na serveru iz sačuvanog originala i potpisana kao novi dokument. Kopija refundacije nosi liniju za potpis kupca. Predračun, obuka i kopija se ne mogu kopirati.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

createFiscalDocumentCopy: Parametri
PoljeOpis
fiscalDocumentIdobaveznoGde: pathTip: uuid

Telo zahtevaapplication/json

createFiscalDocumentCopy: Telo zahteva
PoljeOpis
cashierobaveznoTip: Cashier
idobaveznoTip: string
displayNameopcionoTip: string
clientReferenceopcionoTip: string | null (može biti null)Defaults to COPY- followed by the original's client reference.

max 200

Odgovori

createFiscalDocumentCopy: Odgovori
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
Odgovor: FiscalDocument

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

createFiscalDocumentCopy: Odgovor
PoljeOpis
idobaveznoTip: uuid
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
idempotencyKeyobaveznoTip: string
clientReferenceobaveznoTip: string
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

cashierIdobaveznoTip: string
buyerIdopcionoTip: string | null (može biti null)
buyerDetailsopcionoTip: FiscalBuyerDetails | null (može biti null)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.
legalNameobaveznoTip: string

max 350

taxIdentifierobaveznoTip: string

pattern ^[0-9]{9}$

registrationNumberopcionoTip: string | null (može biti null)

pattern ^[0-9]{8}$

addressopcionoTip: string | null (može biti null)

max 300

cityopcionoTip: string | null (može biti null)

max 100

sourceobaveznoTip: string

Vrednostinbs-jrr

resolvedAtobaveznoTip: date-time
statusobaveznoTip: FiscalDocumentStatus

VrednostiRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

fiscalizedobaveznoTip: boolean
failureCodeopcionoTip: string | null (može biti null)
pfrRejectionopcionoTip: object | null (može biti null)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.
itemsobaveznoTip: array<object>

max 10 items

propertyobaveznoTip: string

max 120

codesobaveznoTip: array<string>

max 5 items

retryableobaveznoTip: boolean
pfropcionoTip: PfrResult | null (može biti null)
invoiceNumberobaveznoTip: string
sdcTimeobaveznoTip: date-time
requestedByobaveznoTip: string
signedByobaveznoTip: string
transactionTypeCounteropcionoTip: integer | null (može biti null)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.
totalCounteropcionoTip: integer | null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionoTip: string | null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznoTip: number
totalTaxopcionoTip: number | null (može biti null)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.
verificationUrlobaveznoTip: uri
journalobaveznoTip: string
receiptopcionoTip: ReceiptRepresentations | null (može biti null)
textUrlobaveznoTip: uri-reference
jsonUrlobaveznoTip: uri-reference
pdfA4UrlobaveznoTip: uri-reference
pdf80mmUrlobaveznoTip: uri-reference
pdf58mmUrlobaveznoTip: uri-reference
previewImageUrlobaveznoTip: uri-reference
qrImageUrlobaveznoTip: uri-reference
verificationUrlobaveznoTip: uri
preferredPaperFormatobaveznoTip: stringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

Vrednosti80mm58mma4

referenceopcionoTip: ResolvedReference
fiscalDocumentIdopcionoTip: uuid
pfrNumberobaveznoTip: string
pfrTimeobaveznoTip: date-time
createdAtobaveznoTip: date-time
updatedAtobaveznoTip: date-time

Preuzmi prikaz računa

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

Scopefiscal:read

Sedam prikaza istog fiskalizovanog računa: zvanični tekst žurnala, kanonski JSON, QR kod (SVG), PDF u A4, 80 mm i 58 mm, i PNG pregled. Svaki se generiše iz nepromenljivog paketa i nosi ETag.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

getFiscalDocumentRepresentation: Parametri
PoljeOpis
fiscalDocumentIdobaveznoGde: pathTip: uuid
representationFormatobaveznoGde: pathTip: string

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

Odgovori

getFiscalDocumentRepresentation: Odgovori
200OKSelected immutable receipt representationReceiptCanonicalPackage

Zaglavlja odgovora: 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

Primeri

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
}
Odgovor: ReceiptCanonicalPackage

Opisi polja su preuzeti iz OpenAPI ugovora i na engleskom su; nazivi polja i vrednosti su isti u oba jezika.

getFiscalDocumentRepresentation: Odgovor
PoljeOpis
schemaVersionobaveznoTip: const "boka-receipt-representation-v27"
sourceSha256obaveznoTip: string

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

canonicalRequestSha256obaveznoTip: string

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

originalPfrResponseSha256obaveznoTip: string

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

fiscalDocumentIdobaveznoTip: uuid
taxpayerIdobaveznoTip: uuid
businessPremiseIdobaveznoTip: uuid
clientReferenceobaveznoTip: string
invoiceTypeobaveznoTip: InvoiceType

VrednostiNORMALPROFORMACOPYTRAININGADVANCE

transactionTypeobaveznoTip: TransactionType

VrednostiSALEREFUND

requestobaveznoTip: ReceiptCanonicalRequest
cashierIdobaveznoTip: string
cashierDisplayNameopcionoTip: string | null (može biti null)
buyeropcionoTip: Buyer | null (može biti null)
idopcionoTip: stringOfficial prefix and value, for example 10:123456789.
optionalFieldopcionoTip: 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.
itemsobaveznoTip: array<LineItem>

min 1 items

catalogProductIdopcionoTip: uuidOptional; arbitrary inline items are permitted.
nameobaveznoTip: string

min 1max 2048

unitOfMeasureopcionoTip: 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

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

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

unitPriceBeforeDiscountopcionoTip: 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

gtinopcionoTip: string

min 8max 14

taxLabelsobaveznoTip: array<string>

min 1 itemsunique

paymentsobaveznoTip: array<Payment>

min 1 items

typeobaveznoTip: PaymentType

VrednostiOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

amountobaveznoTip: 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

referenceopcionoTip: ReceiptCanonicalReference | null (može biti null)
sourceobaveznoTip: string

VrednostiBOKAEXTERNAL

fiscalDocumentIdopcionoTip: uuid | null (može biti null)
pfrNumberopcionoTip: string | null (može biti null)
pfrTimeopcionoTip: date-time | null (može biti null)
transactionOccurredAtopcionoTip: date-time | null (može biti null)
commercialFooteropcionoTip: string | null (može biti null)Non-fiscal text rendered only outside the marked fiscal boundary.

max 2000

buyerDetailsopcionoTip: FiscalBuyerDetails | null (može biti null)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.
legalNameobaveznoTip: string

max 350

taxIdentifierobaveznoTip: string

pattern ^[0-9]{9}$

registrationNumberopcionoTip: string | null (može biti null)

pattern ^[0-9]{8}$

addressopcionoTip: string | null (može biti null)

max 300

cityopcionoTip: string | null (može biti null)

max 100

sourceobaveznoTip: string

Vrednostinbs-jrr

resolvedAtobaveznoTip: date-time
pfrobaveznoTip: ReceiptCanonicalPfr
invoiceNumberobaveznoTip: string
sdcTimeobaveznoTip: date-time
requestedByobaveznoTip: string
signedByobaveznoTip: string
invoiceCounterobaveznoTip: string
invoiceCounterExtensionobaveznoTip: string
totalCounterobaveznoTip: integer
transactionTypeCounterobaveznoTip: integer
totalAmountobaveznoTip: number
taxGroupRevisionobaveznoTip: integer
taxItemsobaveznoTip: array<ReceiptCanonicalTaxItem>

min 1 items

categoryTypeobaveznoTip: integer

>= 0<= 2

labelobaveznoTip: string
amountobaveznoTip: number

>= 0

rateobaveznoTip: number

>= 0

categoryNameobaveznoTip: string
taxableAmountPerLabelobaveznoTip: 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

businessNameobaveznoTip: string
tinobaveznoTip: string
locationNameobaveznoTip: string
addressobaveznoTip: string
districtobaveznoTip: string
mrcopcionoTip: string | null (može biti null)
verificationUrlobaveznoTip: uri
officialJournalobaveznoTip: string
officialJournalSha256obaveznoTip: string

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

opaqueFiscalDataStoredobaveznoTip: const trueConfirms presence in the hashed original response without exposing opaque values.
brandingobaveznoTip: ReceiptCanonicalBranding | null (može biti null)
revisionIdobaveznoTip: uuid
contentSha256obaveznoTip: string

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

businessPremiseIdopcionoTip: uuid | null (može biti null)
headerLogoAssetIdopcionoTip: uuid | null (može biti null)
headerLogoSha256opcionoTip: string | null (može biti null)

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

footerLogoAssetIdopcionoTip: uuid | null (može biti null)
footerLogoSha256opcionoTip: string | null (može biti null)

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

displayNameopcionoTip: string | null (može biti null)
websiteopcionoTip: uri | null (može biti null)
phoneopcionoTip: string | null (može biti null)
emailopcionoTip: email | null (može biti null)
thankYouSropcionoTip: string | null (može biti null)
thankYouEnopcionoTip: string | null (može biti null)
supportSropcionoTip: string | null (može biti null)
supportEnopcionoTip: string | null (može biti null)
preferredPaperFormatobaveznoTip: string

Vrednosti80mm58mma4