Skip to content
Reference

Advances

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

6 operations

List advance cases

get/v1/advance-cases

Scopefiscal:read

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

Contract notes (OpenAPI)

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

Parameters

listAdvanceCases: Parameters
FieldDescription
taxpayerIdoptionalIn: queryType: uuid
businessPremiseIdoptionalIn: queryType: uuid
stateoptionalIn: queryType: stringOPEN is every chain still in progress (including unknown-outcome states the operator must resolve); CLOSED and FAILED are terminal.

ValuesOPENCLOSEDFAILED

searchoptionalIn: queryType: stringCase-insensitive substring of the client reference.

max 200

updatedFromoptionalIn: queryType: date-timeOnly chains changed at or after this instant. Any RFC 3339 offset is accepted and compared as an instant.
pageSizeoptionalIn: queryType: integer

>= 1<= 50default 25

Responses

listAdvanceCases: Responses
200OKRecent advance chainsAdvanceCasePage
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: AdvanceCasePage

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

listAdvanceCases: Response
FieldDescription
itemsrequiredType: array<AdvanceCase>
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: string
externalAdvanceoptionalType: ExternalAdvance | null (nullable)
amountrequiredType: numberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredType: stringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

lastDocumentNumberrequiredType: stringNumber 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}$

lastDocumentTimerequiredType: date-timeIssue date of that document; must precede the request.
staterequiredType: string

ValuesOPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILED

advanceSalesrequiredType: array<FiscalDocument>
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancellationsrequiredType: array<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancelledAdvanceSaleIdsrequiredType: array<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.
advanceRefundoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
finalSaleoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

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

Open an advance case

post/v1/advance-cases

Scopeadvance:writeRequires Idempotency-Key

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

Contract notes (OpenAPI)

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

Request bodyapplication/json

createAdvanceCase: Request body
FieldDescription
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: string

min 1max 200

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

> 0step 0.01

taxLabelrequiredType: stringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

lastDocumentNumberrequiredType: stringNumber 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}$

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

Responses

createAdvanceCase: Responses
200OKIdempotent replay of the same case creationAdvanceCase
201CreatedAdvance caseAdvanceCase
409ConflictThe key was already used with different canonical contentIdempotencyConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: AdvanceCase

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

createAdvanceCase: Response
FieldDescription
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: string
externalAdvanceoptionalType: ExternalAdvance | null (nullable)
amountrequiredType: numberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredType: stringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

lastDocumentNumberrequiredType: stringNumber 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}$

lastDocumentTimerequiredType: date-timeIssue date of that document; must precede the request.
staterequiredType: string

ValuesOPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILED

advanceSalesrequiredType: array<FiscalDocument>
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancellationsrequiredType: array<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancelledAdvanceSaleIdsrequiredType: array<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.
advanceRefundoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
finalSaleoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

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

Read an advance case

get/v1/advance-cases/{advanceCaseId}

Scopefiscal:read

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

Parameters

getAdvanceCase: Parameters
FieldDescription
advanceCaseIdrequiredIn: pathType: uuid

Responses

getAdvanceCase: Responses
200OKAdvance caseAdvanceCase
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
Response: AdvanceCase

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

getAdvanceCase: Response
FieldDescription
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: string
externalAdvanceoptionalType: ExternalAdvance | null (nullable)
amountrequiredType: numberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredType: stringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

lastDocumentNumberrequiredType: stringNumber 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}$

lastDocumentTimerequiredType: date-timeIssue date of that document; must precede the request.
staterequiredType: string

ValuesOPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILED

advanceSalesrequiredType: array<FiscalDocument>
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancellationsrequiredType: array<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancelledAdvanceSaleIdsrequiredType: array<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.
advanceRefundoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
finalSaleoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

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

Cancel the latest advance

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

Scopeadvance:writeRequires Idempotency-Key

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

Contract notes (OpenAPI)

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

Parameters

cancelAdvanceSale: Parameters
FieldDescription
advanceCaseIdrequiredIn: pathType: uuid

Request bodyapplication/json

cancelAdvanceSale: Request body
FieldDescription
cashierrequiredType: Cashier
idrequiredType: string
displayNameoptionalType: string
advanceSaleFiscalDocumentIdrequiredType: uuidThe latest fiscalized Advance Sale of the open case; nothing else can be cancelled.

Responses

cancelAdvanceSale: Responses
200OKIdempotent replay of the fiscalized Advance RefundFiscalDocument
201CreatedFiscalized Advance Refund cancelling the Advance SaleFiscalDocument
409ConflictThe key was already used with different canonical contentIdempotencyConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument
Response: FiscalDocument

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

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

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

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

Close an advance case

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

Scopeadvance:closeRequires Idempotency-Key

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

Contract notes (OpenAPI)

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

Parameters

closeAdvanceCase: Parameters
FieldDescription
advanceCaseIdrequiredIn: pathType: uuid

Request bodyapplication/json

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

min 1 items

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

min 1max 2048

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

min 1max 50

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

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

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

>= 0step 0.0001

gtinoptionalType: string

min 8max 14

taxLabelsrequiredType: array<string>

min 1 itemsunique

remainingPaymentsrequiredType: array<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

typerequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

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

>= 0step 0.01

commercialFooteroptionalType: string

max 1500

Responses

closeAdvanceCase: Responses
200OKIdempotent replay of an already closed caseAdvanceCloseResult
201CreatedClosed advance caseAdvanceCloseResult
202AcceptedAdvance Refund is fiscalized; final Sale remains pendingAdvanceCloseResult
409ConflictThe key was already used with different canonical contentIdempotencyConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument
Response: AdvanceCloseResult

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

closeAdvanceCase: Response
FieldDescription
caserequiredType: AdvanceCase
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
clientReferencerequiredType: string
externalAdvanceoptionalType: ExternalAdvance | null (nullable)
amountrequiredType: numberSum of every advance collected before eFiscalization; at most two decimals.

> 0step 0.01

taxLabelrequiredType: stringTax label of the future supply; must be a prescribed advance label.
paymentTyperequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

lastDocumentNumberrequiredType: stringNumber 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}$

lastDocumentTimerequiredType: date-timeIssue date of that document; must precede the request.
staterequiredType: string

ValuesOPENADVANCE_SALE_OUTCOME_UNKNOWNCLOSINGADVANCE_REFUND_OUTCOME_UNKNOWNADVANCE_REFUND_FISCALIZED_SALE_PENDINGFINAL_SALE_OUTCOME_UNKNOWNCLOSEDFAILED

advanceSalesrequiredType: array<FiscalDocument>
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancellationsrequiredType: array<FiscalDocument>Standalone Advance Refunds that cancelled an erroneous Advance Sale of this case, in issue order.
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
cancelledAdvanceSaleIdsrequiredType: array<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.
advanceRefundoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

referenceoptionalType: ResolvedReference
fiscalDocumentIdoptionalType: uuid
pfrNumberrequiredType: string
pfrTimerequiredType: date-time
createdAtrequiredType: date-time
updatedAtrequiredType: date-time
finalSaleoptionalType: FiscalDocument | null (nullable)
idrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
idempotencyKeyrequiredType: string
clientReferencerequiredType: string
invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

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

Values80mm58mma4

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

Fiscalize an advance payment

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

Scopeadvance:writeRequires Idempotency-Key

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

Contract notes (OpenAPI)

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

Parameters

fiscalizeAdvancePayment: Parameters
FieldDescription
advanceCaseIdrequiredIn: pathType: uuid

Request bodyapplication/json

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

min 1 items

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

min 1max 2048

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

min 1max 50

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

>= 0.001<= 99999999999.999step 0.001

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

>= 0step 0.01

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

>= 0step 0.0001

gtinoptionalType: string

min 8max 14

taxLabelsrequiredType: array<string>

min 1 itemsunique

paymentsrequiredType: array<Payment>

min 1 items

typerequiredType: PaymentType

ValuesOTHERCASHCARDCHECKWIRE_TRANSFERVOUCHERINSTANT_PAYMENT

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

>= 0step 0.01

commercialFooterrequiredType: stringMandatory non-fiscal commercial area for the Advance Sale.

min 1max 2000

Responses

fiscalizeAdvancePayment: Responses
200OKIdempotent replay of the fiscalized Advance SaleFiscalDocument
201CreatedFiscalized Advance SaleFiscalDocument
409ConflictThe key was already used with different canonical contentIdempotencyConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503Service UnavailableNo fiscal receipt was issued because V-PFR was unavailable or its outcome requires reconciliationFiscalDocument
Response: FiscalDocument

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

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

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

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

max 350

taxIdentifierrequiredType: string

pattern ^[0-9]{9}$

registrationNumberoptionalType: string | null (nullable)

pattern ^[0-9]{8}$

addressoptionalType: string | null (nullable)

max 300

cityoptionalType: string | null (nullable)

max 100

sourcerequiredType: string

Valuesnbs-jrr

resolvedAtrequiredType: date-time
statusrequiredType: FiscalDocumentStatus

ValuesRECEIVEDVALIDATEDSUBMITTINGFISCALIZEDREJECTEDNOT_FISCALIZEDOUTCOME_UNKNOWNRECONCILING

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

max 10 items

propertyrequiredType: string

max 120

codesrequiredType: array<string>

max 5 items

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

Values80mm58mma4

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