Skip to content

Reference

Fiscal documents

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

8 operations

Issue a Normal Sale receipt

post/v1/fiscal-documents

Scope fiscal: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 and may be retried with the same Idempotency-Key. 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 body application/json

createFiscalDocument: Request body
FieldTypeDescription
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstringCaller-owned order, invoice, or transaction reference.
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

cashierrequiredCashier
idrequiredstring
displayNameoptionalstring
buyeroptionalBuyer
idoptionalstringOfficial prefix and value, for example 10:123456789.
optionalFieldoptionalstringOfficial buyer-cost-center prefix and value where applicable.
referenceoptionalReferenceTarget

One of: BokaDocumentReference | ExternalFiscalReference

BokaDocumentReference
sourcerequiredconst "BOKA"
fiscalDocumentIdrequireduuid
ExternalFiscalReference
sourcerequiredconst "EXTERNAL"
pfrNumberrequiredstring
pfrTimerequireddate-time
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

transactionOccurredAtoptionaldate-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.
itemsrequiredarray<LineItem>

min 1 items

catalogProductIdoptionaluuidOptional; arbitrary inline items are permitted.
namerequiredstring

min 1max 2048

unitOfMeasureoptionalstringRequired 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

quantityrequirednumberV-PFR Decimal(14,3).

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

unitPriceBeforeDiscountoptionalnumberOptional 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

gtinoptionalstring

min 8max 14

taxLabelsrequiredarray<string>

min 1 itemsunique

paymentsrequiredarray<Payment>

min 1 items

typerequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

amountrequirednumberAt 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

commercialFooteroptionalstringNon-fiscal text rendered only in the permitted area outside the fiscal boundary.
metadataoptionalobjectNon-fiscal caller metadata; never sent as a substitute for a mandated field.

Example

POST /v1/fiscal-documents
curl -X POST "https://api.bokapos.rs/v1/fiscal-documents" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-4127-sale-1" \
  -H "Content-Type: application/json" \
  -d '{
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "clientReference": "ORDER-4127",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashier": {
    "id": "web-shop",
    "displayName": "Web shop"
  },
  "items": [
    {
      "name": "Bluetooth slušalice",
      "unitOfMeasure": "kom",
      "quantity": 1,
      "unitPrice": 8990,
      "gtin": "8606012345678",
      "taxLabels": [
        "F"
      ]
    }
  ],
  "payments": [
    {
      "type": "CARD",
      "amount": 8990
    }
  ],
  "metadata": {
    "orderId": "4127",
    "channel": "web"
  }
}'

Responses

createFiscalDocument: Responses
200 OKIdempotent replay of the already fiscalized document under the same Idempotency-Key; no new receipt was issuedFiscalDocument
201 CreatedFiscalized documentFiscalDocument
409 ConflictThe key was already used with different canonical contentIdempotencyConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503 Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument
201 Created
{
  "id": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-4127-sale-1",
  "clientReference": "ORDER-4127",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": null,
  "buyerDetails": null,
  "status": "FISCALIZED",
  "fiscalized": true,
  "failureCode": null,
  "retryable": false,
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1042",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "transactionTypeCounter": 897,
    "totalCounter": 1042,
    "invoiceCounterExtension": "ПП",
    "totalAmount": 8990,
    "totalTax": 890.9009,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "journal": "============ ФИСКАЛНИ РАЧУН ============\n115711881\nBOKA GROUP DOO\nBokaPOS sandbox\nРоза Луксембург 16\nБеоград-Раковица\nКасир:                          web-shop\nЕСИР број:                    1656/1.0.0\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======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
  },
  "receipt": {
    "textUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/official-text",
    "jsonUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/canonical-json",
    "pdfA4Url": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-a4",
    "pdf80mmUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-80mm",
    "pdf58mmUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-58mm",
    "previewImageUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/preview-png",
    "qrImageUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/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"
}
409 Conflict
{
  "code": "IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_REQUEST",
  "operationId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761"
}
422 Unprocessable Content · application/problem+json
{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.21",
  "title": "One or more validation errors occurred.",
  "status": 422,
  "errors": {
    "totals": [
      "The item and payment totals must match after the mandated two-decimal currency rounding."
    ]
  }
}
503 Service Unavailable
{
  "id": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-4127-sale-1",
  "clientReference": "ORDER-4127",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": null,
  "buyerDetails": null,
  "status": "NOT_FISCALIZED",
  "fiscalized": false,
  "failureCode": "PFR_SUBMISSION_FAULT",
  "retryable": true,
  "pfr": null,
  "receipt": null,
  "createdAt": "2026-09-01T08:15:31.902Z",
  "updatedAt": "2026-09-01T08:15:32.611Z"
}

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"
}'
201 Created
{
  "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
FieldTypeDescription
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
idempotencyKeyrequiredstring
clientReferencerequiredstring
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

cashierIdrequiredstring
buyerIdoptionalstring| null (nullable)
buyerDetailsoptionalFiscalBuyerDetails| 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.
legalNamerequiredstring

max 350

taxIdentifierrequiredstring

pattern ^[0-9]{9}$

registrationNumberoptionalstring| null (nullable)

pattern ^[0-9]{8}$

addressoptionalstring| null (nullable)

max 300

cityoptionalstring| null (nullable)

max 100

sourcerequiredstring

nbs-jrrValues

resolvedAtrequireddate-time
statusrequiredFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGValues

fiscalizedrequiredboolean
failureCodeoptionalstring| null (nullable)
pfrRejectionoptionalobject| 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.
itemsrequiredarray<object>

max 10 items

propertyrequiredstring

max 120

codesrequiredarray<string>

max 5 items

retryablerequiredboolean
pfroptionalPfrResult| null (nullable)
invoiceNumberrequiredstring
sdcTimerequireddate-time
requestedByrequiredstring
signedByrequiredstring
transactionTypeCounteroptionalinteger| 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.
totalCounteroptionalinteger| 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.
invoiceCounterExtensionoptionalstring| null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequirednumber
totalTaxoptionalnumber| 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.
verificationUrlrequireduri
journalrequiredstring
receiptoptionalReceiptRepresentations| null (nullable)
textUrlrequireduri-reference
jsonUrlrequireduri-reference
pdfA4Urlrequireduri-reference
pdf80mmUrlrequireduri-reference
pdf58mmUrlrequireduri-reference
previewImageUrlrequireduri-reference
qrImageUrlrequireduri-reference
verificationUrlrequireduri
preferredPaperFormatrequiredstringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Values

referenceoptionalResolvedReference
fiscalDocumentIdoptionaluuid
pfrNumberrequiredstring
pfrTimerequireddate-time
createdAtrequireddate-time
updatedAtrequireddate-time

Search the journal

get/v1/fiscal-documents

Scope fiscal: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
FieldInTypeDescription
taxpayerIdoptionalqueryuuid
businessPremiseIdoptionalqueryuuid
fiscalDocumentIdoptionalqueryuuid
statusoptionalqueryFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGValues

invoiceTypeoptionalqueryInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTypeoptionalqueryTransactionType

SALEREFUNDValues

createdFromoptionalquerydate-timeInclusive lower bound for durable operation creation time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
createdTooptionalquerydate-timeExclusive upper bound for durable operation creation time. Any RFC 3339 offset is accepted and compared as an instant.
pfrFromoptionalquerydate-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.
pfrTooptionalquerydate-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.
idempotencyKeyoptionalquerystring

max 200

clientReferenceoptionalquerystring

max 200

pfrNumberoptionalquerystring

max 500

cashierIdoptionalquerystring

max 500

buyerIdoptionalquerystring

max 500

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

max 200

cursoroptionalquerystringOpaque keyset cursor returned by the preceding journal page.

max 200

pageSizeoptionalqueryinteger

>= 1<= 200default 50

Example

GET /v1/fiscal-documents
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents?businessPremiseId=b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22&status=FISCALIZED&createdFrom=2026-09-01T00%3A00%3A00Z&pageSize=50" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Responses

listFiscalDocuments: Responses
200 OKPage of fiscal documentsFiscalDocumentPage
400 Bad RequestThe command violates a Boka or fiscal ruleErrorCode
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "items": [
    {
      "id": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
      "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
      "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
      "idempotencyKey": "order-4127-sale-1",
      "clientReference": "ORDER-4127",
      "invoiceType": "NORMAL",
      "transactionType": "SALE",
      "cashierId": "web-shop",
      "buyerId": null,
      "buyerDetails": null,
      "status": "FISCALIZED",
      "fiscalized": true,
      "failureCode": null,
      "retryable": false,
      "pfr": {
        "invoiceNumber": "JWX4K9PL-JWX4K9PL-1042",
        "sdcTime": "2026-09-01T10:15:32.483+02:00",
        "requestedBy": "JWX4K9PL",
        "signedBy": "JWX4K9PL",
        "transactionTypeCounter": 897,
        "totalCounter": 1042,
        "invoiceCounterExtension": "ПП",
        "totalAmount": 8990,
        "totalTax": 890.9009,
        "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
        "journal": "============ ФИСКАЛНИ РАЧУН ============\n115711881\nBOKA GROUP DOO\nBokaPOS sandbox\nРоза Луксембург 16\nБеоград-Раковица\nКасир:                          web-shop\nЕСИР број:                    1656/1.0.0\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======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
      },
      "receipt": {
        "textUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/official-text",
        "jsonUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/canonical-json",
        "pdfA4Url": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-a4",
        "pdf80mmUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-80mm",
        "pdf58mmUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-58mm",
        "previewImageUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/preview-png",
        "qrImageUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/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"
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTA5LTAxVDA4OjE1OjMyLjQ4M1oiLCJpZCI6IjlmOGU3ZDZjIn0"
}

Send `nextCursor` as `cursor` for the next page; `null` means the end.

Response: FiscalDocumentPage

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

listFiscalDocuments: Response
FieldTypeDescription
itemsrequiredarray<FiscalDocument>
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
idempotencyKeyrequiredstring
clientReferencerequiredstring
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

cashierIdrequiredstring
buyerIdoptionalstring| null (nullable)
buyerDetailsoptionalFiscalBuyerDetails| 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.
legalNamerequiredstring

max 350

taxIdentifierrequiredstring

pattern ^[0-9]{9}$

registrationNumberoptionalstring| null (nullable)

pattern ^[0-9]{8}$

addressoptionalstring| null (nullable)

max 300

cityoptionalstring| null (nullable)

max 100

sourcerequiredstring

nbs-jrrValues

resolvedAtrequireddate-time
statusrequiredFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGValues

fiscalizedrequiredboolean
failureCodeoptionalstring| null (nullable)
pfrRejectionoptionalobject| 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.
itemsrequiredarray<object>

max 10 items

propertyrequiredstring

max 120

codesrequiredarray<string>

max 5 items

retryablerequiredboolean
pfroptionalPfrResult| null (nullable)
invoiceNumberrequiredstring
sdcTimerequireddate-time
requestedByrequiredstring
signedByrequiredstring
transactionTypeCounteroptionalinteger| 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.
totalCounteroptionalinteger| 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.
invoiceCounterExtensionoptionalstring| null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequirednumber
totalTaxoptionalnumber| 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.
verificationUrlrequireduri
journalrequiredstring
receiptoptionalReceiptRepresentations| null (nullable)
textUrlrequireduri-reference
jsonUrlrequireduri-reference
pdfA4Urlrequireduri-reference
pdf80mmUrlrequireduri-reference
pdf58mmUrlrequireduri-reference
previewImageUrlrequireduri-reference
qrImageUrlrequireduri-reference
verificationUrlrequireduri
preferredPaperFormatrequiredstringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Values

referenceoptionalResolvedReference
fiscalDocumentIdoptionaluuid
pfrNumberrequiredstring
pfrTimerequireddate-time
createdAtrequireddate-time
updatedAtrequireddate-time
nextCursorrequiredstring| null (nullable)

Export the journal (CSV)

get/v1/fiscal-documents/export

Scope fiscal: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
FieldInTypeDescription
taxpayerIdoptionalqueryuuid
businessPremiseIdoptionalqueryuuid
fiscalDocumentIdoptionalqueryuuid
statusoptionalqueryFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGValues

invoiceTypeoptionalqueryInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTypeoptionalqueryTransactionType

SALEREFUNDValues

createdFromoptionalquerydate-timeInclusive lower bound for durable operation creation time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
createdTooptionalquerydate-timeExclusive upper bound for durable operation creation time. Any RFC 3339 offset is accepted and compared as an instant.
pfrFromoptionalquerydate-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.
pfrTooptionalquerydate-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.
idempotencyKeyoptionalquerystring

max 200

clientReferenceoptionalquerystring

max 200

pfrNumberoptionalquerystring

max 500

cashierIdoptionalquerystring

max 500

buyerIdoptionalquerystring

max 500

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

max 200

Example

GET /v1/fiscal-documents/export
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/export?businessPremiseId=b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22&createdFrom=2026-09-01T00%3A00%3A00Z&createdTo=2026-10-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  --output dnevnik-2026-09.csv

Responses

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

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

422 Unprocessable ContentInvalid filters or more than 10,000 matching rowsErrorCode
200 OK · text/csv
schemaVersion,fiscalDocumentId,taxpayerId,businessPremiseId,idempotencyKey,clientReference,invoiceType,transactionType,cashierId,buyerId,status,fiscalized,failureCode,pfrInvoiceNumber,pfrTime,createdAt,updatedAt,retryable,esirNumber,issuingSoftwareVersion,issuingReceiptRepresentationVersion,issuingBuildCommit
boka-fiscal-journal-csv-v2,9f8e7d6c-5b4a-4321-8765-0fedcba98761,3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11,b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22,order-4127-sale-1,ORDER-4127,NORMAL,SALE,web-shop,,FISCALIZED,true,,JWX4K9PL-JWX4K9PL-1042,2026-09-01T08:15:32.483Z,2026-09-01T08:15:31.902Z,2026-09-01T08:15:32.611Z,false,,1.0.0,boka-receipt-representation-v21,1f0d454e8b2c9a7d6f5e4c3b2a1908f7e6d5c4b3

The `Boka-Export-Schema-Version: boka-fiscal-journal-csv-v2` header names the format version.

Response: ErrorCode

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

exportFiscalDocuments: Response
FieldTypeDescription
coderequiredstring
messageoptionalstring

Issue a copy

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

Scope fiscal: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
FieldInTypeDescription
fiscalDocumentIdrequiredpathuuid

Request body application/json

createFiscalDocumentCopy: Request body
FieldTypeDescription
cashierrequiredCashier
idrequiredstring
displayNameoptionalstring
clientReferenceoptionalstring| null (nullable)Defaults to COPY- followed by the original's client reference.

max 200

Example

POST /v1/fiscal-documents/{fiscalDocumentId}/copies
curl -X POST "https://api.bokapos.rs/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/copies" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-4127-copy-1" \
  -H "Content-Type: application/json" \
  -d '{
  "cashier": {
    "id": "web-shop"
  }
}'

Responses

createFiscalDocumentCopy: Responses
200 OKIdempotent replay of the already fiscalized copy under the same Idempotency-Key; no new document was issuedFiscalDocument
201 CreatedFiscalized copyFiscalDocument
404 Not FoundThe original does not exist in this organization (code FISCAL_DOCUMENT_NOT_FOUND)
409 ConflictThe key was already used with different canonical contentIdempotencyConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503 Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument
201 Created
{
  "id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-4127-copy-1",
  "clientReference": "COPY-ORDER-4127",
  "invoiceType": "COPY",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": null,
  "buyerDetails": null,
  "status": "FISCALIZED",
  "fiscalized": true,
  "failureCode": null,
  "retryable": false,
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1044",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "transactionTypeCounter": 899,
    "totalCounter": 1044,
    "invoiceCounterExtension": "КП",
    "totalAmount": 8990,
    "totalTax": 890.9009,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1044\nБројач рачуна:                899/1044КП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
  },
  "receipt": {
    "textUrl": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/official-text",
    "jsonUrl": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/canonical-json",
    "pdfA4Url": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/pdf-a4",
    "pdf80mmUrl": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/pdf-80mm",
    "pdf58mmUrl": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/pdf-58mm",
    "previewImageUrl": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/preview-png",
    "qrImageUrl": "/v1/fiscal-documents/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/representations/qr-svg",
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "preferredPaperFormat": "a4"
  },
  "reference": {
    "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
    "pfrNumber": "JWX4K9PL-JWX4K9PL-1042",
    "pfrTime": "2026-09-01T10:15:32.483+02:00"
  },
  "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.

createFiscalDocumentCopy: Response
FieldTypeDescription
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
idempotencyKeyrequiredstring
clientReferencerequiredstring
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

cashierIdrequiredstring
buyerIdoptionalstring| null (nullable)
buyerDetailsoptionalFiscalBuyerDetails| 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.
legalNamerequiredstring

max 350

taxIdentifierrequiredstring

pattern ^[0-9]{9}$

registrationNumberoptionalstring| null (nullable)

pattern ^[0-9]{8}$

addressoptionalstring| null (nullable)

max 300

cityoptionalstring| null (nullable)

max 100

sourcerequiredstring

nbs-jrrValues

resolvedAtrequireddate-time
statusrequiredFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGValues

fiscalizedrequiredboolean
failureCodeoptionalstring| null (nullable)
pfrRejectionoptionalobject| 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.
itemsrequiredarray<object>

max 10 items

propertyrequiredstring

max 120

codesrequiredarray<string>

max 5 items

retryablerequiredboolean
pfroptionalPfrResult| null (nullable)
invoiceNumberrequiredstring
sdcTimerequireddate-time
requestedByrequiredstring
signedByrequiredstring
transactionTypeCounteroptionalinteger| 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.
totalCounteroptionalinteger| 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.
invoiceCounterExtensionoptionalstring| null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequirednumber
totalTaxoptionalnumber| 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.
verificationUrlrequireduri
journalrequiredstring
receiptoptionalReceiptRepresentations| null (nullable)
textUrlrequireduri-reference
jsonUrlrequireduri-reference
pdfA4Urlrequireduri-reference
pdf80mmUrlrequireduri-reference
pdf58mmUrlrequireduri-reference
previewImageUrlrequireduri-reference
qrImageUrlrequireduri-reference
verificationUrlrequireduri
preferredPaperFormatrequiredstringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Values

referenceoptionalResolvedReference
fiscalDocumentIdoptionaluuid
pfrNumberrequiredstring
pfrTimerequireddate-time
createdAtrequireddate-time
updatedAtrequireddate-time

Read a document

get/v1/fiscal-documents/{fiscalDocumentId}

Scope fiscal: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
FieldInTypeDescription
fiscalDocumentIdrequiredpathuuid

Example

GET /v1/fiscal-documents/{fiscalDocumentId}
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Responses

getFiscalDocument: Responses
200 OKFiscal documentFiscalDocument
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
200 OK
{
  "id": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-4127-sale-1",
  "clientReference": "ORDER-4127",
  "invoiceType": "NORMAL",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": null,
  "buyerDetails": null,
  "status": "FISCALIZED",
  "fiscalized": true,
  "failureCode": null,
  "retryable": false,
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1042",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "transactionTypeCounter": 897,
    "totalCounter": 1042,
    "invoiceCounterExtension": "ПП",
    "totalAmount": 8990,
    "totalTax": 890.9009,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "journal": "============ ФИСКАЛНИ РАЧУН ============\n115711881\nBOKA GROUP DOO\nBokaPOS sandbox\nРоза Луксембург 16\nБеоград-Раковица\nКасир:                          web-shop\nЕСИР број:                    1656/1.0.0\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======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
  },
  "receipt": {
    "textUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/official-text",
    "jsonUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/canonical-json",
    "pdfA4Url": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-a4",
    "pdf80mmUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-80mm",
    "pdf58mmUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-58mm",
    "previewImageUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/preview-png",
    "qrImageUrl": "/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/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"
}

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"
200 OK
{
  "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
FieldTypeDescription
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
idempotencyKeyrequiredstring
clientReferencerequiredstring
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

cashierIdrequiredstring
buyerIdoptionalstring| null (nullable)
buyerDetailsoptionalFiscalBuyerDetails| 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.
legalNamerequiredstring

max 350

taxIdentifierrequiredstring

pattern ^[0-9]{9}$

registrationNumberoptionalstring| null (nullable)

pattern ^[0-9]{8}$

addressoptionalstring| null (nullable)

max 300

cityoptionalstring| null (nullable)

max 100

sourcerequiredstring

nbs-jrrValues

resolvedAtrequireddate-time
statusrequiredFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGValues

fiscalizedrequiredboolean
failureCodeoptionalstring| null (nullable)
pfrRejectionoptionalobject| 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.
itemsrequiredarray<object>

max 10 items

propertyrequiredstring

max 120

codesrequiredarray<string>

max 5 items

retryablerequiredboolean
pfroptionalPfrResult| null (nullable)
invoiceNumberrequiredstring
sdcTimerequireddate-time
requestedByrequiredstring
signedByrequiredstring
transactionTypeCounteroptionalinteger| 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.
totalCounteroptionalinteger| 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.
invoiceCounterExtensionoptionalstring| null (nullable)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountrequirednumber
totalTaxoptionalnumber| 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.
verificationUrlrequireduri
journalrequiredstring
receiptoptionalReceiptRepresentations| null (nullable)
textUrlrequireduri-reference
jsonUrlrequireduri-reference
pdfA4Urlrequireduri-reference
pdf80mmUrlrequireduri-reference
pdf58mmUrlrequireduri-reference
previewImageUrlrequireduri-reference
qrImageUrlrequireduri-reference
verificationUrlrequireduri
preferredPaperFormatrequiredstringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Values

referenceoptionalResolvedReference
fiscalDocumentIdoptionaluuid
pfrNumberrequiredstring
pfrTimerequireddate-time
createdAtrequireddate-time
updatedAtrequireddate-time

Turnover report

get/v1/fiscal-documents/turnover-report

Scope fiscal: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
FieldInTypeDescription
taxpayerIdrequiredqueryuuid
businessPremiseIdrequiredqueryuuid
pfrFromrequiredquerydate-timeInclusive lower bound for authoritative PFR signing time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
pfrTorequiredquerydate-timeExclusive upper bound for authoritative PFR signing time. Any RFC 3339 offset is accepted and compared as an instant.

Example

GET /v1/fiscal-documents/turnover-report
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/turnover-report?taxpayerId=3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11&businessPremiseId=b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22&pfrFrom=2026-09-01T00%3A00%3A00%2B02%3A00&pfrTo=2026-09-02T00%3A00%3A00%2B02%3A00" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Responses

getTurnoverReport: Responses
200 OKImmutable local turnover reportTurnoverReport
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409 ConflictA selected receipt failed source-integrity validation or totals exceeded the supported decimal rangeErrorCode
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "source": "BOKA_LOCAL_IMMUTABLE_PFR",
  "periodBasis": "PFR_SDC_TIME",
  "amountConvention": "SALE_REFUND_SEPARATE",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "pfrFrom": "2026-08-31T22:00:00Z",
  "pfrTo": "2026-09-01T22:00:00Z",
  "documentCount": 2,
  "firstDocument": {
    "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
    "pfrInvoiceNumber": "JWX4K9PL-JWX4K9PL-1042",
    "pfrTime": "2026-09-01T10:15:32.483+02:00"
  },
  "lastDocument": {
    "fiscalDocumentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "pfrInvoiceNumber": "JWX4K9PL-JWX4K9PL-1045",
    "pfrTime": "2026-09-01T16:40:05.120+02:00"
  },
  "paymentTotals": [
    {
      "securityElementJid": "JWX4K9PL",
      "paymentType": "CARD",
      "saleAmount": 8990,
      "refundAmount": 8990
    }
  ],
  "taxTotals": [
    {
      "invoiceType": "NORMAL",
      "categoryType": 0,
      "label": "F",
      "rate": 11,
      "categoryName": "ECAL",
      "saleTaxableAmount": 8099.0991,
      "saleTaxAmount": 890.9009,
      "saleTotalAmount": 8990,
      "refundTaxableAmount": 8099.0991,
      "refundTaxAmount": 890.9009,
      "refundTotalAmount": 8990
    }
  ]
}
Response: TurnoverReport

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

getTurnoverReport: Response
FieldTypeDescription
sourcerequiredconst "BOKA_LOCAL_IMMUTABLE_PFR"
periodBasisrequiredconst "PFR_SDC_TIME"
amountConventionrequiredconst "SALE_REFUND_SEPARATE"
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
pfrFromrequireddate-timeInclusive authoritative PFR signing-time bound.
pfrTorequireddate-timeExclusive authoritative PFR signing-time bound.
documentCountrequiredinteger

>= 0

firstDocumentrequiredTurnoverBoundary| null (nullable)
fiscalDocumentIdrequireduuid
pfrInvoiceNumberrequiredstring
pfrTimerequireddate-time
lastDocumentrequiredTurnoverBoundary| null (nullable)
fiscalDocumentIdrequireduuid
pfrInvoiceNumberrequiredstring
pfrTimerequireddate-time
paymentTotalsrequiredarray<TurnoverPaymentTotal>
securityElementJidrequiredstring
paymentTyperequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

saleAmountrequirednumber

>= 0

refundAmountrequirednumber

>= 0

taxTotalsrequiredarray<TurnoverTaxTotal>
invoiceTyperequiredstring

NORMALADVANCEValues

categoryTyperequiredinteger

>= 0<= 2

labelrequiredstring
raterequirednumber

>= 0

categoryNamerequiredstring
saleTaxableAmountrequirednumberSum 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

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

>= 0

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

>= 0

refundTaxableAmountrequirednumberAs saleTaxableAmount

>= 0

refundTaxAmountrequirednumberAs saleTaxAmount

>= 0

refundTotalAmountrequirednumberAs saleTotalAmount

>= 0

Export the turnover report (CSV)

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

Scope fiscal: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
FieldInTypeDescription
taxpayerIdrequiredqueryuuid
businessPremiseIdrequiredqueryuuid
pfrFromrequiredquerydate-timeInclusive lower bound for authoritative PFR signing time. Any RFC 3339 offset is accepted (Z, +00:00, +02:00) and compared as an instant.
pfrTorequiredquerydate-timeExclusive upper bound for authoritative PFR signing time. Any RFC 3339 offset is accepted and compared as an instant.

Example

GET /v1/fiscal-documents/turnover-report/export
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/turnover-report/export?taxpayerId=3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11&businessPremiseId=b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22&pfrFrom=2026-09-01T00%3A00%3A00%2B02%3A00&pfrTo=2026-09-02T00%3A00%3A00%2B02%3A00" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  --output promet-2026-09-01.csv

Responses

exportTurnoverReport: Responses
200 OKComplete normalized turnover-report CSV

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

404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409 ConflictA selected receipt failed source-integrity validation or totals exceeded the supported decimal rangeErrorCode
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK · text/csv
schemaVersion,recordType,source,periodBasis,amountConvention,taxpayerId,businessPremiseId,pfrFrom,pfrTo,documentCount,fiscalDocumentId,pfrInvoiceNumber,pfrTime,securityElementJid,paymentType,invoiceType,categoryType,taxLabel,taxRate,taxCategoryName,saleAmount,refundAmount,saleTaxableAmount,saleTaxAmount,saleTotalAmount,refundTaxableAmount,refundTaxAmount,refundTotalAmount
boka-turnover-report-csv-v1,SUMMARY,BOKA_LOCAL_IMMUTABLE_PFR,PFR_SDC_TIME,SALE_REFUND_SEPARATE,3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11,b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22,2026-08-31T22:00:00Z,2026-09-01T22:00:00Z,2,,,,,,,,,,,,,,,,,,
boka-turnover-report-csv-v1,FIRST_DOCUMENT,BOKA_LOCAL_IMMUTABLE_PFR,PFR_SDC_TIME,SALE_REFUND_SEPARATE,3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11,b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22,2026-08-31T22:00:00Z,2026-09-01T22:00:00Z,,9f8e7d6c-5b4a-4321-8765-0fedcba98761,JWX4K9PL-JWX4K9PL-1042,2026-09-01T08:15:32.483Z,,,,,,,,,,,,,,,
boka-turnover-report-csv-v1,PAYMENT_TOTAL,BOKA_LOCAL_IMMUTABLE_PFR,PFR_SDC_TIME,SALE_REFUND_SEPARATE,3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11,b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22,2026-08-31T22:00:00Z,2026-09-01T22:00:00Z,,,,,JWX4K9PL,CARD,,,,,,8990.00,8990.00,,,,,,
boka-turnover-report-csv-v1,TAX_TOTAL,BOKA_LOCAL_IMMUTABLE_PFR,PFR_SDC_TIME,SALE_REFUND_SEPARATE,3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11,b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22,2026-08-31T22:00:00Z,2026-09-01T22:00:00Z,,,,,,,NORMAL,0,F,11,ECAL,,,8099.0991,890.9009,8990.0000,8099.0991,890.9009,8990.0000
Response: ErrorCode

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

exportTurnoverReport: Response
FieldTypeDescription
coderequiredstring
messageoptionalstring

Fetch a receipt representation

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

Scope fiscal: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
FieldInTypeDescription
fiscalDocumentIdrequiredpathuuid
representationFormatrequiredpathstring

canonical-jsonofficial-textqr-svgpdf-a4pdf-80mmpdf-58mmpreview-pngValues

Example

GET /v1/fiscal-documents/{fiscalDocumentId}/representations/{representationFormat}
curl -X GET "https://api.bokapos.rs/v1/fiscal-documents/9f8e7d6c-5b4a-4321-8765-0fedcba98761/representations/pdf-a4" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  --output racun-ORDER-4127.pdf

Responses

getFiscalDocumentRepresentation: Responses
200 OKSelected immutable receipt representationReceiptCanonicalPackage

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

404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409 ConflictReceipt unavailable or stored source integrity validation failedErrorCode
200 OK · application/pdf
%PDF-1.7 ... (binarni sadržaj, A4 račun)

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"
200 OK · text/plain
============ ФИСКАЛНИ РАЧУН ============
115711881
BOKA GROUP DOO
BokaPOS sandbox
Роза Луксембург 16
Београд-Раковица
Касир:                          web-shop
ЕСИР број:                    1656/1.0.0
-------------ПРОМЕТ ПРОДАЈА-------------
Артикли
========================================
Назив   Цена         Кол.         Укупно
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"
200 OK
{
  "schemaVersion": "boka-receipt-representation-v21",
  "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ЕСИР број:                    1656/1.0.0\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
FieldTypeDescription
schemaVersionrequiredconst "boka-receipt-representation-v19"
sourceSha256requiredstring

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

canonicalRequestSha256requiredstring

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

originalPfrResponseSha256requiredstring

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

fiscalDocumentIdrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstring
invoiceTyperequiredInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEValues

transactionTyperequiredTransactionType

SALEREFUNDValues

requestrequiredReceiptCanonicalRequest
cashierIdrequiredstring
cashierDisplayNameoptionalstring| null (nullable)
buyeroptionalBuyer| null (nullable)
idoptionalstringOfficial prefix and value, for example 10:123456789.
optionalFieldoptionalstringOfficial buyer-cost-center prefix and value where applicable.
itemsrequiredarray<LineItem>

min 1 items

catalogProductIdoptionaluuidOptional; arbitrary inline items are permitted.
namerequiredstring

min 1max 2048

unitOfMeasureoptionalstringRequired 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

quantityrequirednumberV-PFR Decimal(14,3).

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

unitPriceBeforeDiscountoptionalnumberOptional 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

gtinoptionalstring

min 8max 14

taxLabelsrequiredarray<string>

min 1 itemsunique

paymentsrequiredarray<Payment>

min 1 items

typerequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

amountrequirednumberAt 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

referenceoptionalReceiptCanonicalReference| null (nullable)
sourcerequiredstring

BOKAEXTERNALValues

fiscalDocumentIdoptionaluuid| null (nullable)
pfrNumberoptionalstring| null (nullable)
pfrTimeoptionaldate-time| null (nullable)
transactionOccurredAtoptionaldate-time| null (nullable)
commercialFooteroptionalstring| null (nullable)Non-fiscal text rendered only outside the marked fiscal boundary.

max 2000

buyerDetailsoptionalFiscalBuyerDetails| 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.
legalNamerequiredstring

max 350

taxIdentifierrequiredstring

pattern ^[0-9]{9}$

registrationNumberoptionalstring| null (nullable)

pattern ^[0-9]{8}$

addressoptionalstring| null (nullable)

max 300

cityoptionalstring| null (nullable)

max 100

sourcerequiredstring

nbs-jrrValues

resolvedAtrequireddate-time
pfrrequiredReceiptCanonicalPfr
invoiceNumberrequiredstring
sdcTimerequireddate-time
requestedByrequiredstring
signedByrequiredstring
invoiceCounterrequiredstring
invoiceCounterExtensionrequiredstring
totalCounterrequiredinteger
transactionTypeCounterrequiredinteger
totalAmountrequirednumber
taxGroupRevisionrequiredinteger
taxItemsrequiredarray<ReceiptCanonicalTaxItem>

min 1 items

categoryTyperequiredinteger

>= 0<= 2

labelrequiredstring
amountrequirednumber

>= 0

raterequirednumber

>= 0

categoryNamerequiredstring
taxableAmountPerLabelrequirednumberBoka-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

businessNamerequiredstring
tinrequiredstring
locationNamerequiredstring
addressrequiredstring
districtrequiredstring
mrcoptionalstring| null (nullable)
verificationUrlrequireduri
officialJournalrequiredstring
officialJournalSha256requiredstring

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

opaqueFiscalDataStoredrequiredconst trueConfirms presence in the hashed original response without exposing opaque values.
brandingrequiredReceiptCanonicalBranding| null (nullable)
revisionIdrequireduuid
contentSha256requiredstring

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

businessPremiseIdoptionaluuid| null (nullable)
headerLogoAssetIdoptionaluuid| null (nullable)
headerLogoSha256optionalstring| null (nullable)

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

footerLogoAssetIdoptionaluuid| null (nullable)
footerLogoSha256optionalstring| null (nullable)

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

displayNameoptionalstring| null (nullable)
websiteoptionaluri| null (nullable)
phoneoptionalstring| null (nullable)
emailoptionalemail| null (nullable)
thankYouSroptionalstring| null (nullable)
thankYouEnoptionalstring| null (nullable)
supportSroptionalstring| null (nullable)
supportEnoptionalstring| null (nullable)
preferredPaperFormatrequiredstring

80mm58mma4Values