Pređi na sadržaj

Referenca

Avansi

Serverski vođen lanac avansa: avansne prodaje, storniranje pogrešnog avansa i zatvaranje konačnim računom.

6 operacija

Lista avansnih slučajeva

get/v1/advance-cases

Scope fiscal:read

Lanci avansa po vremenu poslednje promene, sa filterom stanja (OPEN, CLOSED, FAILED) i pretragom po referenci.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

listAdvanceCases: Parametri
PoljeGdeTipOpis
taxpayerIdopcionoqueryuuid
businessPremiseIdopcionoqueryuuid
stateopcionoquerystringOPEN is every chain still in progress (including unknown-outcome states the operator must resolve); CLOSED and FAILED are terminal.

OPENCLOSEDFAILEDVrednosti

searchopcionoquerystringCase-insensitive substring of the client reference.

max 200

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

>= 1<= 50default 25

Primer

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"

Odgovori

listAdvanceCases: Odgovori
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"
    }
  ]
}
Odgovor: AdvanceCasePage

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

listAdvanceCases: Odgovor
PoljeTipOpis
itemsobaveznoarray<AdvanceCase>
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
clientReferenceobaveznostring
externalAdvanceopcionoExternalAdvance| null (može biti null)
amountobaveznonumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelobaveznostringTax label of the future supply; must be a prescribed advance label.
paymentTypeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

lastDocumentNumberobaveznostringNumber 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}$

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

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDVrednosti

advanceSalesobaveznoarray<FiscalDocument>
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancellationsobaveznoarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancelledAdvanceSaleIdsobaveznoarray<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.
advanceRefundopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
finalSaleopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
failureCodeopcionostring| null (može biti null)
createdAtobaveznodate-time
updatedAtobaveznodate-time

Otvori avansni slučaj

post/v1/advance-cases

Scope advance:writeZahteva Idempotency-Key

Slučaj vezuje sve avansne prodaje jedne narudžbine na istom obvezniku i prodajnom mestu. Ne izdaje račun; to radi sledeći poziv. Može da preuzme i avanse naplaćene pre eFiskalizacije.

Beleške iz ugovora (OpenAPI, engleski)

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

Telo zahteva application/json

createAdvanceCase: Telo zahteva
PoljeTipOpis
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
clientReferenceobaveznostring

min 1max 200

externalAdvanceopcionoExternalAdvance| null (može biti null)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.
amountobaveznonumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelobaveznostringTax label of the future supply; must be a prescribed advance label.
paymentTypeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

lastDocumentNumberobaveznostringNumber 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}$

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

Primer

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

Odgovori

createAdvanceCase: Odgovori
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"
}
Odgovor: AdvanceCase

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

createAdvanceCase: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
clientReferenceobaveznostring
externalAdvanceopcionoExternalAdvance| null (može biti null)
amountobaveznonumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelobaveznostringTax label of the future supply; must be a prescribed advance label.
paymentTypeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

lastDocumentNumberobaveznostringNumber 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}$

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

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDVrednosti

advanceSalesobaveznoarray<FiscalDocument>
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancellationsobaveznoarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancelledAdvanceSaleIdsobaveznoarray<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.
advanceRefundopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
finalSaleopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
failureCodeopcionostring| null (može biti null)
createdAtobaveznodate-time
updatedAtobaveznodate-time

Pročitaj avansni slučaj

get/v1/advance-cases/{advanceCaseId}

Scope fiscal:read

Ceo lanac: avansne prodaje, storna, konačna refundacija avansa i konačni račun, plus stanje koje kaže šta je sledeće dozvoljeno.

Parametri

getAdvanceCase: Parametri
PoljeGdeTipOpis
advanceCaseIdobaveznopathuuid

Primer

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"

Odgovori

getAdvanceCase: Odgovori
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"
}
Odgovor: AdvanceCase

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

getAdvanceCase: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
clientReferenceobaveznostring
externalAdvanceopcionoExternalAdvance| null (može biti null)
amountobaveznonumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelobaveznostringTax label of the future supply; must be a prescribed advance label.
paymentTypeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

lastDocumentNumberobaveznostringNumber 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}$

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

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDVrednosti

advanceSalesobaveznoarray<FiscalDocument>
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancellationsobaveznoarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancelledAdvanceSaleIdsobaveznoarray<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.
advanceRefundopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
finalSaleopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
failureCodeopcionostring| null (može biti null)
createdAtobaveznodate-time
updatedAtobaveznodate-time

Fiskalizuj avansnu uplatu

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

Scope advance:writeZahteva Idempotency-Key

Izdaje sledeću avansnu prodaju u lancu; BokaPOS sam upisuje referencu na prethodnu. Stavke su propisani avansni artikli (10: Аванс (Ђ) i srodni), komercijalni tekst je obavezan.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

fiscalizeAdvancePayment: Parametri
PoljeGdeTipOpis
advanceCaseIdobaveznopathuuid

Telo zahteva application/json

fiscalizeAdvancePayment: Telo zahteva
PoljeTipOpis
cashierobaveznoCashier
idobaveznostring
displayNameopcionostring
buyeropcionoBuyer
idopcionostringOfficial prefix and value, for example 10:123456789.
optionalFieldopcionostringOfficial buyer-cost-center prefix and value where applicable.
paymentOccurredAtopcionodate-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.
itemsobaveznoarray<LineItem>

min 1 items

catalogProductIdopcionouuidOptional; arbitrary inline items are permitted.
nameobaveznostring

min 1max 2048

unitOfMeasureopcionostringRequired 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

quantityobaveznonumberV-PFR Decimal(14,3).

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

unitPriceBeforeDiscountopciononumberOptional 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

gtinopcionostring

min 8max 14

taxLabelsobaveznoarray<string>

min 1 itemsunique

paymentsobaveznoarray<Payment>

min 1 items

typeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

amountobaveznonumberAt 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

commercialFooterobaveznostringMandatory non-fiscal commercial area for the Advance Sale.

min 1max 2000

Primer

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."
}'

Odgovori

fiscalizeAdvancePayment: Odgovori
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"
}

U produkciji naziv stavke je propisani `10: Аванс (Ђ)` (ili 11/12/13 za Е, Г, А) sa istom oznakom. Sandbox nema te oznake, pa prima `10: Аванс (X)` za bilo koju oznaku iz sveže konfiguracije.

Odgovor: FiscalDocument

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

fiscalizeAdvancePayment: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time

Storniraj poslednji avans

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

Scope advance:writeZahteva Idempotency-Key

Avansna refundacija koja poništava poslednju avansnu prodaju u celosti, sa PIB-om prodavca kao kupcem, kako propisuje zvanični postupak. Slučaj ostaje otvoren.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

cancelAdvanceSale: Parametri
PoljeGdeTipOpis
advanceCaseIdobaveznopathuuid

Telo zahteva application/json

cancelAdvanceSale: Telo zahteva
PoljeTipOpis
cashierobaveznoCashier
idobaveznostring
displayNameopcionostring
advanceSaleFiscalDocumentIdobaveznouuidThe latest fiscalized Advance Sale of the open case; nothing else can be cancelled.

Primer

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

Odgovori

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

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

cancelAdvanceSale: Odgovor
PoljeTipOpis
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

propertyobaveznostring

max 120

codesobaveznoarray<string>

max 5 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time

Zatvori avansni slučaj

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

Scope advance:closeZahteva Idempotency-Key

Dva dokumenta u jednom pozivu: avansna refundacija ukupnog avansa, pa konačni račun za promet sa stavkama isporuke i preostalim plaćanjem. Ako drugi korak ne stigne do V-PFR-a, odgovor 202 to kaže, a ponovni poziv istim ključem ponavlja samo njega.

Beleške iz ugovora (OpenAPI, engleski)

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.

Parametri

closeAdvanceCase: Parametri
PoljeGdeTipOpis
advanceCaseIdobaveznopathuuid

Telo zahteva application/json

closeAdvanceCase: Telo zahteva
PoljeTipOpis
cashierobaveznoCashier
idobaveznostring
displayNameopcionostring
buyeropcionoBuyer
idopcionostringOfficial prefix and value, for example 10:123456789.
optionalFieldopcionostringOfficial buyer-cost-center prefix and value where applicable.
finalItemsobaveznoarray<LineItem>

min 1 items

catalogProductIdopcionouuidOptional; arbitrary inline items are permitted.
nameobaveznostring

min 1max 2048

unitOfMeasureopcionostringRequired 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

quantityobaveznonumberV-PFR Decimal(14,3).

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

unitPriceBeforeDiscountopciononumberOptional 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

gtinopcionostring

min 8max 14

taxLabelsobaveznoarray<string>

min 1 itemsunique

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

typeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

amountobaveznonumberAt 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

commercialFooteropcionostring

max 1500

Primer

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."
}'

Odgovori

closeAdvanceCase: Odgovori
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"
  }
}

Konačni račun nosi ukupnu vrednost isporuke (8.990) i referencu na avansnu refundaciju; `remainingPayments` je samo doplata (5.990).

Odgovor: AdvanceCloseResult

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

closeAdvanceCase: Odgovor
PoljeTipOpis
caseobaveznoAdvanceCase
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
clientReferenceobaveznostring
externalAdvanceopcionoExternalAdvance| null (može biti null)
amountobaveznonumberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelobaveznostringTax label of the future supply; must be a prescribed advance label.
paymentTypeobaveznoPaymentType

OTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENTVrednosti

lastDocumentNumberobaveznostringNumber 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}$

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

OPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILEDVrednosti

advanceSalesobaveznoarray<FiscalDocument>
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancellationsobaveznoarray<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
cancelledAdvanceSaleIdsobaveznoarray<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.
advanceRefundopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
finalSaleopcionoFiscalDocument| null (može biti null)
idobaveznouuid
taxpayerIdobaveznouuid
businessPremiseIdobaveznouuid
idempotencyKeyobaveznostring
clientReferenceobaveznostring
invoiceTypeobaveznoInvoiceType

NORMALPROFORMACOPYTRAININGADVANCEVrednosti

transactionTypeobaveznoTransactionType

SALEREFUNDVrednosti

cashierIdobaveznostring
buyerIdopcionostring| null (može biti null)
buyerDetailsopcionoFiscalBuyerDetails| null (može biti null)The buyer's company-registry facts stored with the document at reservation and printed under the buyer identification. Null when the buyer is not a domestic company (prefixes 10, 12, 14 with a valid PIB) or the register could not answer at issuance.
legalNameobaveznostring

max 350

taxIdentifierobaveznostring

pattern ^[0-9]{9}$

registrationNumberopcionostring| null (može biti null)

pattern ^[0-9]{8}$

addressopcionostring| null (može biti null)

max 300

cityopcionostring| null (može biti null)

max 100

sourceobaveznostring

nbs-jrrVrednosti

resolvedAtobaveznodate-time
statusobaveznoFiscalDocumentStatus

RECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILINGVrednosti

fiscalizedobaveznoboolean
failureCodeopcionostring| null (može biti null)
pfrRejectionopcionoobject| null (može biti null)Present only on a single-document read of a REJECTED operation. The V-PFR's own validation result, bounded to the property path of the caller's request and the supplier's numeric codes (2310 invalid tax label; 2800 to 2808 required, length, range, value, format and list-size validation). Lists never carry it.
itemsobaveznoarray<object>

max 10 items

retryableobaveznoboolean
pfropcionoPfrResult| null (može biti null)
invoiceNumberobaveznostring
sdcTimeobaveznodate-time
requestedByobaveznostring
signedByobaveznostring
transactionTypeCounteropcionointeger| null (može biti null)V-PFR transaction-type counter (the left half of the printed counter). Null when the stored receipt does not carry it; the printed counter is always in the journal text.
totalCounteropcionointeger| null (može biti null)V-PFR total counter (the right half of the printed counter and the last segment of invoiceNumber). Null under the same condition as transactionTypeCounter.
invoiceCounterExtensionopcionostring| null (može biti null)Official Cyrillic invoice/transaction type pair printed after the counter (ПП, ПР, АП, АР, КП, КР, ОП, ОР, РП, РР). Null under the same condition as transactionTypeCounter.
totalAmountobaveznonumber
totalTaxopciononumber| null (može biti null)Sum of the V-PFR signed tax amounts of the document (the printed "Укупан износ пореза" before its two-decimal display rounding). Null under the same condition as transactionTypeCounter.
verificationUrlobaveznouri
journalobaveznostring
receiptopcionoReceiptRepresentations| null (može biti null)
textUrlobaveznouri-reference
jsonUrlobaveznouri-reference
pdfA4Urlobaveznouri-reference
pdf80mmUrlobaveznouri-reference
pdf58mmUrlobaveznouri-reference
previewImageUrlobaveznouri-reference
qrImageUrlobaveznouri-reference
verificationUrlobaveznouri
preferredPaperFormatobaveznostringImmutable preferred print/PDF format captured when this fiscal operation was reserved.

80mm58mma4Vrednosti

referenceopcionoResolvedReference
fiscalDocumentIdopcionouuid
pfrNumberobaveznostring
pfrTimeobaveznodate-time
createdAtobaveznodate-time
updatedAtobaveznodate-time
failureCodeopcionostring| null (može biti null)
createdAtobaveznodate-time
updatedAtobaveznodate-time