Skip to content

Reference

Advances

A server-managed advance chain: Advance Sales, cancelling an erroneous advance and closing with the final Sale.

6 operations

List advance cases

get/v1/advance-cases

Scope fiscal:read

Advance chains by last change, with a state filter (OPEN, CLOSED, FAILED) and a search on the reference.

Contract notes (OpenAPI)

Returns tenant-scoped advance chains in most-recently-updated order so an operator can continue a chain without handling an internal identifier. Filters narrow by state, reference text and last change.

Parameters

listAdvanceCases: Parameters
FieldInTypeDescription
taxpayerIdoptionalqueryuuid
businessPremiseIdoptionalqueryuuid
stateoptionalquerystringOPEN is every chain still in progress (including unknown-outcome states the operator must resolve); CLOSED and FAILED are terminal.

OPENCLOSEDFAILEDValues

searchoptionalquerystringCase-insensitive substring of the client reference.

max 200

updatedFromoptionalquerydate-timeOnly chains changed at or after this instant. Any RFC 3339 offset is accepted and compared as an instant.
pageSizeoptionalqueryinteger

>= 1<= 50default 25

Example

GET /v1/advance-cases
curl -X GET "https://api.bokapos.rs/v1/advance-cases?businessPremiseId=b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22&state=OPEN&search=ORDER-5001" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Responses

listAdvanceCases: Responses
200 OKRecent advance chainsAdvanceCasePage
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "items": [
    {
      "id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
      "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
      "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
      "clientReference": "ORDER-5001",
      "externalAdvance": null,
      "state": "OPEN",
      "advanceSales": [],
      "cancellations": [],
      "cancelledAdvanceSaleIds": [],
      "advanceRefund": null,
      "finalSale": null,
      "failureCode": null,
      "createdAt": "2026-09-03T09:00:00.000Z",
      "updatedAt": "2026-09-03T09:01:00.700Z"
    }
  ]
}
Response: AdvanceCasePage

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

listAdvanceCases: Response
FieldTypeDescription
itemsrequiredarray<AdvanceCase>
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstring
externalAdvanceoptionalExternalAdvance| null (nullable)
amountrequirednumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredstringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

lastDocumentNumberrequiredstringNumber of the last pre-fiscal advance document, digits only (1 to 20). It is sent as the `<number>` part of the reference `XXXXXXXX-XXXXXXXX-<number>`; the official examples are `17`, `121` and `159`, and the V-PFR rejects any other form. Anything but digits returns 422 with the `ExternalAdvance.LastDocumentNumber` validation key.

min 1max 20pattern ^[0-9]{1,20}$

lastDocumentTimerequireddate-timeIssue date of that document; must precede the request.
staterequiredstring

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDValues

advanceSalesrequiredarray<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

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
cancellationsrequiredarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
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

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
cancelledAdvanceSaleIdsrequiredarray<uuid>Ids of the Advance Sales in `advanceSales` that a fiscalized cancellation removed from the chain. The remaining fiscalized Advance Sales are the effective chain: they are what the next Advance Sale references, what a closure refunds, and what the next cancellation targets.
advanceRefundoptionalFiscalDocument| null (nullable)
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

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
finalSaleoptionalFiscalDocument| null (nullable)
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

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
failureCodeoptionalstring| null (nullable)
createdAtrequireddate-time
updatedAtrequireddate-time

Open an advance case

post/v1/advance-cases

Scope advance:writeRequires Idempotency-Key

A case ties every Advance Sale of one order on the same taxpayer and premise. It issues no receipt; the next call does. It can also take over advances collected before eFiscalization.

Contract notes (OpenAPI)

Creates a Boka-owned, same-taxpayer/same-premise chain. External and pre-eFiscalization starting references are deliberately outside this bounded workflow.

Request body application/json

createAdvanceCase: Request body
FieldTypeDescription
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstring

min 1max 200

externalAdvanceoptionalExternalAdvance| null (nullable)Advances collected before eFiscalization that this case closes. The first Advance Sale then references the last pre-fiscal document as XXXXXXXX-XXXXXXXX-<number>, or the close starts with the Advance Refund referencing it when no Advance Sale was fiscalized, and the closing Advance Refund sums pre-fiscal and fiscal advances alike.
amountrequirednumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredstringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

lastDocumentNumberrequiredstringNumber of the last pre-fiscal advance document, digits only (1 to 20). It is sent as the `<number>` part of the reference `XXXXXXXX-XXXXXXXX-<number>`; the official examples are `17`, `121` and `159`, and the V-PFR rejects any other form. Anything but digits returns 422 with the `ExternalAdvance.LastDocumentNumber` validation key.

min 1max 20pattern ^[0-9]{1,20}$

lastDocumentTimerequireddate-timeIssue date of that document; must precede the request.

Example

POST /v1/advance-cases
curl -X POST "https://api.bokapos.rs/v1/advance-cases" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-5001-advance-case" \
  -H "Content-Type: application/json" \
  -d '{
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "clientReference": "ORDER-5001"
}'

Responses

createAdvanceCase: Responses
200 OKIdempotent replay of the same case creationAdvanceCase
201 CreatedAdvance caseAdvanceCase
409 ConflictThe key was already used with different canonical contentIdempotencyConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
201 Created
{
  "id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "clientReference": "ORDER-5001",
  "externalAdvance": null,
  "state": "OPEN",
  "advanceSales": [],
  "cancellations": [],
  "cancelledAdvanceSaleIds": [],
  "advanceRefund": null,
  "finalSale": null,
  "failureCode": null,
  "createdAt": "2026-09-03T09:00:00.000Z",
  "updatedAt": "2026-09-03T09:00:00.000Z"
}
Response: AdvanceCase

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

createAdvanceCase: Response
FieldTypeDescription
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstring
externalAdvanceoptionalExternalAdvance| null (nullable)
amountrequirednumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredstringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

lastDocumentNumberrequiredstringNumber of the last pre-fiscal advance document, digits only (1 to 20). It is sent as the `<number>` part of the reference `XXXXXXXX-XXXXXXXX-<number>`; the official examples are `17`, `121` and `159`, and the V-PFR rejects any other form. Anything but digits returns 422 with the `ExternalAdvance.LastDocumentNumber` validation key.

min 1max 20pattern ^[0-9]{1,20}$

lastDocumentTimerequireddate-timeIssue date of that document; must precede the request.
staterequiredstring

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDValues

advanceSalesrequiredarray<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
cancellationsrequiredarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
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
cancelledAdvanceSaleIdsrequiredarray<uuid>Ids of the Advance Sales in `advanceSales` that a fiscalized cancellation removed from the chain. The remaining fiscalized Advance Sales are the effective chain: they are what the next Advance Sale references, what a closure refunds, and what the next cancellation targets.
advanceRefundoptionalFiscalDocument| null (nullable)
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
finalSaleoptionalFiscalDocument| null (nullable)
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
failureCodeoptionalstring| null (nullable)
createdAtrequireddate-time
updatedAtrequireddate-time

Read an advance case

get/v1/advance-cases/{advanceCaseId}

Scope fiscal:read

The whole chain: Advance Sales, cancellations, the closing Advance Refund and the final Sale, plus the state that says what is allowed next.

Parameters

getAdvanceCase: Parameters
FieldInTypeDescription
advanceCaseIdrequiredpathuuid

Example

GET /v1/advance-cases/{advanceCaseId}
curl -X GET "https://api.bokapos.rs/v1/advance-cases/c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Responses

getAdvanceCase: Responses
200 OKAdvance caseAdvanceCase
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
200 OK
{
  "id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "clientReference": "ORDER-5001",
  "externalAdvance": null,
  "state": "OPEN",
  "advanceSales": [
    {
      "id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
      "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
      "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
      "idempotencyKey": "order-5001-advance-1",
      "clientReference": "ORDER-5001",
      "invoiceType": "ADVANCE",
      "transactionType": "SALE",
      "cashierId": "web-shop",
      "buyerId": null,
      "buyerDetails": null,
      "status": "FISCALIZED",
      "fiscalized": true,
      "failureCode": null,
      "retryable": false,
      "pfr": {
        "invoiceNumber": "JWX4K9PL-JWX4K9PL-1049",
        "sdcTime": "2026-09-01T10:15:32.483+02:00",
        "requestedBy": "JWX4K9PL",
        "signedBy": "JWX4K9PL",
        "transactionTypeCounter": 904,
        "totalCounter": 1049,
        "invoiceCounterExtension": "АП",
        "totalAmount": 3000,
        "totalTax": 297.2973,
        "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
        "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1049\nБројач рачуна:                904/1049АП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
      },
      "receipt": {
        "textUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/official-text",
        "jsonUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/canonical-json",
        "pdfA4Url": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-a4",
        "pdf80mmUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-80mm",
        "pdf58mmUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-58mm",
        "previewImageUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/preview-png",
        "qrImageUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/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"
    }
  ],
  "cancellations": [],
  "cancelledAdvanceSaleIds": [],
  "advanceRefund": null,
  "finalSale": null,
  "failureCode": null,
  "createdAt": "2026-09-03T09:00:00.000Z",
  "updatedAt": "2026-09-03T09:01:00.700Z"
}
Response: AdvanceCase

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

getAdvanceCase: Response
FieldTypeDescription
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstring
externalAdvanceoptionalExternalAdvance| null (nullable)
amountrequirednumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredstringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

lastDocumentNumberrequiredstringNumber of the last pre-fiscal advance document, digits only (1 to 20). It is sent as the `<number>` part of the reference `XXXXXXXX-XXXXXXXX-<number>`; the official examples are `17`, `121` and `159`, and the V-PFR rejects any other form. Anything but digits returns 422 with the `ExternalAdvance.LastDocumentNumber` validation key.

min 1max 20pattern ^[0-9]{1,20}$

lastDocumentTimerequireddate-timeIssue date of that document; must precede the request.
staterequiredstring

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDValues

advanceSalesrequiredarray<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
cancellationsrequiredarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
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
cancelledAdvanceSaleIdsrequiredarray<uuid>Ids of the Advance Sales in `advanceSales` that a fiscalized cancellation removed from the chain. The remaining fiscalized Advance Sales are the effective chain: they are what the next Advance Sale references, what a closure refunds, and what the next cancellation targets.
advanceRefundoptionalFiscalDocument| null (nullable)
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
finalSaleoptionalFiscalDocument| null (nullable)
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
failureCodeoptionalstring| null (nullable)
createdAtrequireddate-time
updatedAtrequireddate-time

Fiscalize an advance payment

post/v1/advance-cases/{advanceCaseId}/payments

Scope advance:writeRequires Idempotency-Key

Issues the next Advance Sale in the chain; BokaPOS writes the reference to the previous one itself. Items are the prescribed advance literals (10: Аванс (Ђ) and siblings); the commercial footer is mandatory.

Contract notes (OpenAPI)

Boka references the immediately preceding fiscalized Advance Sale stored in this exact case. Any unresolved prior outcome blocks another payment, and a changed idempotent replay is rejected.

Parameters

fiscalizeAdvancePayment: Parameters
FieldInTypeDescription
advanceCaseIdrequiredpathuuid

Request body application/json

fiscalizeAdvancePayment: Request body
FieldTypeDescription
cashierrequiredCashier
idrequiredstring
displayNameoptionalstring
buyeroptionalBuyer
idoptionalstringOfficial prefix and value, for example 10:123456789.
optionalFieldoptionalstringOfficial buyer-cost-center prefix and value where applicable.
paymentOccurredAtoptionaldate-timeActual earlier payment time for the documented wire-transfer case. When supplied, it must precede the fiscalization attempt and at least one payment must be Wire Transfer.
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

commercialFooterrequiredstringMandatory non-fiscal commercial area for the Advance Sale.

min 1max 2000

Example

POST /v1/advance-cases/{advanceCaseId}/payments
curl -X POST "https://api.bokapos.rs/v1/advance-cases/c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f/payments" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-5001-advance-1" \
  -H "Content-Type: application/json" \
  -d '{
  "cashier": {
    "id": "web-shop"
  },
  "items": [
    {
      "name": "10: Аванс (F)",
      "quantity": 1,
      "unitPrice": 3000,
      "taxLabels": [
        "F"
      ]
    }
  ],
  "payments": [
    {
      "type": "WIRE_TRANSFER",
      "amount": 3000
    }
  ],
  "paymentOccurredAt": "2026-09-02T11:30:00+02:00",
  "commercialFooter": "Avans za porudžbinu ORDER-5001. Isporuka po uplati ostatka."
}'

Responses

fiscalizeAdvancePayment: Responses
200 OKIdempotent replay of the fiscalized Advance SaleFiscalDocument
201 CreatedFiscalized Advance SaleFiscalDocument
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": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-5001-advance-1",
  "clientReference": "ORDER-5001",
  "invoiceType": "ADVANCE",
  "transactionType": "SALE",
  "cashierId": "web-shop",
  "buyerId": null,
  "buyerDetails": null,
  "status": "FISCALIZED",
  "fiscalized": true,
  "failureCode": null,
  "retryable": false,
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1049",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "transactionTypeCounter": 904,
    "totalCounter": 1049,
    "invoiceCounterExtension": "АП",
    "totalAmount": 3000,
    "totalTax": 297.2973,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1049\nБројач рачуна:                904/1049АП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
  },
  "receipt": {
    "textUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/official-text",
    "jsonUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/canonical-json",
    "pdfA4Url": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-a4",
    "pdf80mmUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-80mm",
    "pdf58mmUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-58mm",
    "previewImageUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/preview-png",
    "qrImageUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/qr-svg",
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "preferredPaperFormat": "a4"
  },
  "createdAt": "2026-09-03T09:01:00.000Z",
  "updatedAt": "2026-09-01T08:15:32.611Z"
}

In production the item name is the prescribed `10: Аванс (Ђ)` (or 11/12/13 for Е, Г, А) with the same label. The sandbox lacks those labels, so it accepts `10: Аванс (X)` for any label in the fresh configuration.

Response: FiscalDocument

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

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

Cancel the latest advance

post/v1/advance-cases/{advanceCaseId}/cancellations

Scope advance:writeRequires Idempotency-Key

An Advance Refund that voids the latest Advance Sale in full, with the seller's PIB as the buyer, as the official procedure prescribes. The case stays open.

Contract notes (OpenAPI)

Issues an Advance Refund that repeats the complete latest Advance Sale of the open case, references it, and carries the seller's own PIB as the buyer (10:<PIB>), as the official cancellation procedure prescribes. The case stays open; the next Advance Sale chains to the sale before the cancelled one. Only the latest fiscalized Advance Sale can be cancelled.

Parameters

cancelAdvanceSale: Parameters
FieldInTypeDescription
advanceCaseIdrequiredpathuuid

Request body application/json

cancelAdvanceSale: Request body
FieldTypeDescription
cashierrequiredCashier
idrequiredstring
displayNameoptionalstring
advanceSaleFiscalDocumentIdrequireduuidThe latest fiscalized Advance Sale of the open case; nothing else can be cancelled.

Example

POST /v1/advance-cases/{advanceCaseId}/cancellations
curl -X POST "https://api.bokapos.rs/v1/advance-cases/c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f/cancellations" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-5001-advance-1-cancel" \
  -H "Content-Type: application/json" \
  -d '{
  "cashier": {
    "id": "web-shop"
  },
  "advanceSaleFiscalDocumentId": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80"
}'

Responses

cancelAdvanceSale: Responses
200 OKIdempotent replay of the fiscalized Advance RefundFiscalDocument
201 CreatedFiscalized Advance Refund cancelling the Advance SaleFiscalDocument
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": "a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d",
  "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
  "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
  "idempotencyKey": "order-5001-advance-1-cancel",
  "clientReference": "ORDER-5001",
  "invoiceType": "ADVANCE",
  "transactionType": "REFUND",
  "cashierId": "web-shop",
  "buyerId": "10:115711881",
  "buyerDetails": null,
  "status": "FISCALIZED",
  "fiscalized": true,
  "failureCode": null,
  "retryable": false,
  "pfr": {
    "invoiceNumber": "JWX4K9PL-JWX4K9PL-1050",
    "sdcTime": "2026-09-01T10:15:32.483+02:00",
    "requestedBy": "JWX4K9PL",
    "signedBy": "JWX4K9PL",
    "transactionTypeCounter": 905,
    "totalCounter": 1050,
    "invoiceCounterExtension": "АР",
    "totalAmount": 3000,
    "totalTax": 297.2973,
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1050\nБројач рачуна:                905/1050АР\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
  },
  "receipt": {
    "textUrl": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/official-text",
    "jsonUrl": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/canonical-json",
    "pdfA4Url": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/pdf-a4",
    "pdf80mmUrl": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/pdf-80mm",
    "pdf58mmUrl": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/pdf-58mm",
    "previewImageUrl": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/preview-png",
    "qrImageUrl": "/v1/fiscal-documents/a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d/representations/qr-svg",
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
    "preferredPaperFormat": "a4"
  },
  "reference": {
    "fiscalDocumentId": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
    "pfrNumber": "JWX4K9PL-JWX4K9PL-1049",
    "pfrTime": "2026-09-03T11:01:00.500+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.

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

Close an advance case

post/v1/advance-cases/{advanceCaseId}/close

Scope advance:closeRequires Idempotency-Key

Two documents in one call: the Advance Refund of the whole advance, then the final Normal Sale with the delivered items and the remaining payment. When the second step never reaches the V-PFR, a 202 says so and a replay with the same key retries only that step.

Contract notes (OpenAPI)

This is a recoverable two-document workflow. If the Advance Refund is fiscalized but the final Sale is confirmed not submitted, the response exposes the pending state and an idempotent replay retries only that stored final operation. An unknown outcome blocks instead of retrying. If the V-PFR rejects the Advance Refund, the case is `FAILED` with the rejection code, the refund document is `REJECTED`, and the final Sale reserved with it is never sent: it is closed as `NOT_FISCALIZED` with `ADVANCE_REFUND_NOT_FISCALIZED` and `retryable: false`. Open a new case to try again; a replay of the failed close re-drives nothing. This bounded operation closes the whole Boka-owned chain; partial and legacy/external realization remain unsupported. The Advance Refund is not a customer-delivery document.

Parameters

closeAdvanceCase: Parameters
FieldInTypeDescription
advanceCaseIdrequiredpathuuid

Request body application/json

closeAdvanceCase: Request body
FieldTypeDescription
cashierrequiredCashier
idrequiredstring
displayNameoptionalstring
buyeroptionalBuyer
idoptionalstringOfficial prefix and value, for example 10:123456789.
optionalFieldoptionalstringOfficial buyer-cost-center prefix and value where applicable.
finalItemsrequiredarray<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

remainingPaymentsrequiredarray<Payment>Must equal the final amount less the stored advance amount. Supply one explicit zero-amount element when the remaining balance is zero, because Create Invoice requires at least one payment element.

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

commercialFooteroptionalstring

max 1500

Example

POST /v1/advance-cases/{advanceCaseId}/close
curl -X POST "https://api.bokapos.rs/v1/advance-cases/c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f/close" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-5001-close" \
  -H "Content-Type: application/json" \
  -d '{
  "cashier": {
    "id": "web-shop"
  },
  "finalItems": [
    {
      "name": "Bluetooth slušalice",
      "unitOfMeasure": "kom",
      "quantity": 1,
      "unitPrice": 8990,
      "gtin": "8606012345678",
      "taxLabels": [
        "F"
      ]
    }
  ],
  "remainingPayments": [
    {
      "type": "CARD",
      "amount": 5990
    }
  ],
  "commercialFooter": "Hvala na kupovini."
}'

Responses

closeAdvanceCase: Responses
200 OKIdempotent replay of an already closed caseAdvanceCloseResult
201 CreatedClosed advance caseAdvanceCloseResult
202 AcceptedAdvance Refund is fiscalized; final Sale remains pendingAdvanceCloseResult
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
{
  "case": {
    "id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
    "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
    "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
    "clientReference": "ORDER-5001",
    "externalAdvance": null,
    "state": "CLOSED",
    "advanceSales": [
      {
        "id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
        "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
        "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
        "idempotencyKey": "order-5001-advance-1",
        "clientReference": "ORDER-5001",
        "invoiceType": "ADVANCE",
        "transactionType": "SALE",
        "cashierId": "web-shop",
        "buyerId": null,
        "buyerDetails": null,
        "status": "FISCALIZED",
        "fiscalized": true,
        "failureCode": null,
        "retryable": false,
        "pfr": {
          "invoiceNumber": "JWX4K9PL-JWX4K9PL-1049",
          "sdcTime": "2026-09-01T10:15:32.483+02:00",
          "requestedBy": "JWX4K9PL",
          "signedBy": "JWX4K9PL",
          "transactionTypeCounter": 904,
          "totalCounter": 1049,
          "invoiceCounterExtension": "АП",
          "totalAmount": 3000,
          "totalTax": 297.2973,
          "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
          "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1049\nБројач рачуна:                904/1049АП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
        },
        "receipt": {
          "textUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/official-text",
          "jsonUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/canonical-json",
          "pdfA4Url": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-a4",
          "pdf80mmUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-80mm",
          "pdf58mmUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/pdf-58mm",
          "previewImageUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/representations/preview-png",
          "qrImageUrl": "/v1/fiscal-documents/d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80/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"
      }
    ],
    "cancellations": [],
    "cancelledAdvanceSaleIds": [],
    "advanceRefund": {
      "id": "e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091",
      "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
      "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
      "idempotencyKey": "order-5001-close:refund",
      "clientReference": "ORDER-5001",
      "invoiceType": "ADVANCE",
      "transactionType": "REFUND",
      "cashierId": "web-shop",
      "buyerId": "10:115711881",
      "buyerDetails": null,
      "status": "FISCALIZED",
      "fiscalized": true,
      "failureCode": null,
      "retryable": false,
      "pfr": {
        "invoiceNumber": "JWX4K9PL-JWX4K9PL-1051",
        "sdcTime": "2026-09-01T10:15:32.483+02:00",
        "requestedBy": "JWX4K9PL",
        "signedBy": "JWX4K9PL",
        "transactionTypeCounter": 906,
        "totalCounter": 1051,
        "invoiceCounterExtension": "АР",
        "totalAmount": 3000,
        "totalTax": 297.2973,
        "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
        "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1051\nБројач рачуна:                906/1051АР\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
      },
      "receipt": {
        "textUrl": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/official-text",
        "jsonUrl": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/canonical-json",
        "pdfA4Url": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/pdf-a4",
        "pdf80mmUrl": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/pdf-80mm",
        "pdf58mmUrl": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/pdf-58mm",
        "previewImageUrl": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/preview-png",
        "qrImageUrl": "/v1/fiscal-documents/e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091/representations/qr-svg",
        "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
        "preferredPaperFormat": "a4"
      },
      "reference": {
        "fiscalDocumentId": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
        "pfrNumber": "JWX4K9PL-JWX4K9PL-1049",
        "pfrTime": "2026-09-03T11:01:00.500+02:00"
      },
      "createdAt": "2026-09-01T08:15:31.902Z",
      "updatedAt": "2026-09-01T08:15:32.611Z"
    },
    "finalSale": {
      "id": "f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2",
      "taxpayerId": "3f9c2a8e-6b1d-4e5a-9c47-1d2b8e6f0a11",
      "businessPremiseId": "b7d4e2c1-9a3f-4c8e-8f21-6e5a0c9d3b22",
      "idempotencyKey": "order-5001-close:sale",
      "clientReference": "ORDER-5001",
      "invoiceType": "NORMAL",
      "transactionType": "SALE",
      "cashierId": "web-shop",
      "buyerId": null,
      "buyerDetails": null,
      "status": "FISCALIZED",
      "fiscalized": true,
      "failureCode": null,
      "retryable": false,
      "pfr": {
        "invoiceNumber": "JWX4K9PL-JWX4K9PL-1052",
        "sdcTime": "2026-09-01T10:15:32.483+02:00",
        "requestedBy": "JWX4K9PL",
        "signedBy": "JWX4K9PL",
        "transactionTypeCounter": 907,
        "totalCounter": 1052,
        "invoiceCounterExtension": "ПП",
        "totalAmount": 8990,
        "totalTax": 890.9009,
        "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
        "journal": "============ ФИСКАЛНИ РАЧУН ============\n...\nПФР број рачуна:      JWX4K9PL-JWX4K9PL-1052\nБројач рачуна:                907/1052ПП\n========================================\n======== КРАЈ ФИСКАЛНОГ РАЧУНА ========="
      },
      "receipt": {
        "textUrl": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/official-text",
        "jsonUrl": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/canonical-json",
        "pdfA4Url": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/pdf-a4",
        "pdf80mmUrl": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/pdf-80mm",
        "pdf58mmUrl": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/pdf-58mm",
        "previewImageUrl": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/preview-png",
        "qrImageUrl": "/v1/fiscal-documents/f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8091a2/representations/qr-svg",
        "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=A0pXWDRLOVBMSldYNEs5UEwSBAAAEAQAAKCLPAAAAAAAAAABnAqJa1EAAAA...",
        "preferredPaperFormat": "a4"
      },
      "reference": {
        "fiscalDocumentId": "e6f7a8b9-c0d1-4e2f-9a3b-4c5d6e7f8091",
        "pfrNumber": "JWX4K9PL-JWX4K9PL-1051",
        "pfrTime": "2026-09-05T13:20:44.010+02:00"
      },
      "createdAt": "2026-09-01T08:15:31.902Z",
      "updatedAt": "2026-09-01T08:15:32.611Z"
    },
    "failureCode": null,
    "createdAt": "2026-09-03T09:00:00.000Z",
    "updatedAt": "2026-09-05T11:20:45.300Z"
  }
}

The final Sale carries the whole delivered value (8,990) and references the Advance Refund; `remainingPayments` is only the top-up (5,990).

Response: AdvanceCloseResult

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

closeAdvanceCase: Response
FieldTypeDescription
caserequiredAdvanceCase
idrequireduuid
taxpayerIdrequireduuid
businessPremiseIdrequireduuid
clientReferencerequiredstring
externalAdvanceoptionalExternalAdvance| null (nullable)
amountrequirednumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredstringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTValues

lastDocumentNumberrequiredstringNumber of the last pre-fiscal advance document, digits only (1 to 20). It is sent as the `<number>` part of the reference `XXXXXXXX-XXXXXXXX-<number>`; the official examples are `17`, `121` and `159`, and the V-PFR rejects any other form. Anything but digits returns 422 with the `ExternalAdvance.LastDocumentNumber` validation key.

min 1max 20pattern ^[0-9]{1,20}$

lastDocumentTimerequireddate-timeIssue date of that document; must precede the request.
staterequiredstring

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDValues

advanceSalesrequiredarray<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

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
cancellationsrequiredarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
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

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
cancelledAdvanceSaleIdsrequiredarray<uuid>Ids of the Advance Sales in `advanceSales` that a fiscalized cancellation removed from the chain. The remaining fiscalized Advance Sales are the effective chain: they are what the next Advance Sale references, what a closure refunds, and what the next cancellation targets.
advanceRefundoptionalFiscalDocument| null (nullable)
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

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
finalSaleoptionalFiscalDocument| null (nullable)
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

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
failureCodeoptionalstring| null (nullable)
createdAtrequireddate-time
updatedAtrequireddate-time