Pređi na sadržaj

Referenca

Dostava računa e-poštom

Slanje fiskalizovanog računa kupcu sa platforme, sa verifikacionim linkom i PDF prilozima (modul E-mail).

3 operacija

Lista dostava jednog računa

get/v1/receipt-deliveries

Scope fiscal:read

Sve e-mail dostave jednog fiskalnog dokumenta sa statusom i brojem pokušaja.

Parametri

listReceiptDeliveries: Parametri
PoljeGdeTipOpis
fiscalDocumentIdobaveznoqueryuuid

Primer

GET /v1/receipt-deliveries
curl -X GET "https://api.bokapos.rs/v1/receipt-deliveries?fiscalDocumentId=9f8e7d6c-5b4a-4321-8765-0fedcba98761" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Odgovori

listReceiptDeliveries: Odgovori
200 OKDeliveries in creation order (at most 100)
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
200 OK
{
  "items": [
    {
      "id": "f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b90",
      "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
      "channel": "EMAIL",
      "recipient": "kupac@example.com",
      "language": "sr-Latn",
      "attachments": [
        "a4"
      ],
      "status": "DELIVERED",
      "attempts": 1,
      "failureCode": null,
      "createdAt": "2026-09-01T08:15:40.000Z",
      "deliveredAt": "2026-09-01T08:15:52.418Z",
      "updatedAt": "2026-09-01T08:15:52.418Z"
    }
  ]
}
Odgovor:

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

listReceiptDeliveries: Odgovor
PoljeTipOpis
itemsobaveznoarray<ReceiptDelivery>
idobaveznouuid
fiscalDocumentIdobaveznouuid
channelobaveznoconst "EMAIL"
recipientobaveznostring
languageobaveznoReceiptDeliveryLanguageLanguage of the message; the receipt itself is the official journal rendered into the attached PDFs.

sr-Cyrlsr-LatnenVrednosti

attachmentsobaveznoReceiptDeliveryAttachmentsReturned in canonical order (a4, 80mm, 58mm, png). An empty list sends the link only.

a480mm58mmpngmax 4 itemsuniqueVrednosti

statusobaveznostring

QUEUEDSENDINGDELIVEREDFAILEDVrednosti

attemptsobaveznointeger

>= 0

failureCodeobaveznostring| null (može biti null)
createdAtobaveznodate-time
deliveredAtobaveznodate-time| null (može biti null)
updatedAtobaveznodate-time

Pošalji račun e-poštom

post/v1/receipt-deliveries

Scope fiscal:writeZahteva Idempotency-Key

Stavlja u red jednu poruku sa verifikacionim linkom i izabranim PDF prilozima, na jeziku obveznika. Radi samo za fiskalizovan dokument i samo ako je obveznik uključio dostavu u podešavanjima; u produkciji traži modul E-mail. Status dostave nikad nije dokaz fiskalizacije.

Beleške iz ugovora (OpenAPI, engleski)

Queues one email delivery of one fiscalized document from the platform mailbox, in the taxpayer's chosen language, with the official verification URL as an active link and the A4 PDF attached. Delivery is queued only after the signed result is durably stored, only when the taxpayer enabled email delivery in its settings (422 RECEIPT_DELIVERY_DISABLED otherwise; the taxpayer then delivers through its own system), and only while the platform transport is configured (503 RECEIPT_DELIVERY_UNAVAILABLE otherwise). A delivery outcome is never evidence of fiscalization. Tenant branding stays outside the fiscal receipt boundary.

Telo zahteva application/json

createReceiptDelivery: Telo zahteva
PoljeTipOpis
fiscalDocumentIdobaveznouuid
channelobaveznoconst "EMAIL"
recipientobaveznoemail

max 320

languageopcionoReceiptDeliveryLanguage| null (može biti null)Defaults to the taxpayer's setting.

sr-Cyrlsr-LatnenVrednosti

attachmentsopcionoReceiptDeliveryAttachments| null (može biti null)Defaults to the taxpayer's setting.

a480mm58mmpngVrednosti

Primer

POST /v1/receipt-deliveries
curl -X POST "https://api.bokapos.rs/v1/receipt-deliveries" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN" \
  -H "Idempotency-Key: order-4127-email-1" \
  -H "Content-Type: application/json" \
  -d '{
  "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "channel": "EMAIL",
  "recipient": "kupac@example.com",
  "language": "sr-Latn",
  "attachments": [
    "a4"
  ]
}'

Odgovori

createReceiptDelivery: Odgovori
200 OKIdempotent replayReceiptDelivery
202 AcceptedDelivery queuedReceiptDelivery

Zaglavlja odgovora: Location

404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409 ConflictThe key was already used with different canonical contentIdempotencyConflict
422 Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
503 Service UnavailableThe platform mail transport is not configured
202 Accepted
{
  "id": "f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b90",
  "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "channel": "EMAIL",
  "recipient": "kupac@example.com",
  "language": "sr-Latn",
  "attachments": [
    "a4"
  ],
  "status": "QUEUED",
  "attempts": 0,
  "failureCode": null,
  "createdAt": "2026-09-01T08:15:40.000Z",
  "deliveredAt": null,
  "updatedAt": "2026-09-01T08:15:40.000Z"
}
Odgovor: ReceiptDelivery

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

createReceiptDelivery: Odgovor
PoljeTipOpis
idobaveznouuid
fiscalDocumentIdobaveznouuid
channelobaveznoconst "EMAIL"
recipientobaveznostring
languageobaveznoReceiptDeliveryLanguageLanguage of the message; the receipt itself is the official journal rendered into the attached PDFs.

sr-Cyrlsr-LatnenVrednosti

attachmentsobaveznoReceiptDeliveryAttachmentsReturned in canonical order (a4, 80mm, 58mm, png). An empty list sends the link only.

a480mm58mmpngmax 4 itemsuniqueVrednosti

statusobaveznostring

QUEUEDSENDINGDELIVEREDFAILEDVrednosti

attemptsobaveznointeger

>= 0

failureCodeobaveznostring| null (može biti null)
createdAtobaveznodate-time
deliveredAtobaveznodate-time| null (može biti null)
updatedAtobaveznodate-time

Pročitaj dostavu

get/v1/receipt-deliveries/{receiptDeliveryId}

Scope fiscal:read

Stanje jedne dostave: QUEUED, SENDING, DELIVERED ili FAILED sa šifrom.

Parametri

getReceiptDelivery: Parametri
PoljeGdeTipOpis
receiptDeliveryIdobaveznopathuuid

Primer

GET /v1/receipt-deliveries/{receiptDeliveryId}
curl -X GET "https://api.bokapos.rs/v1/receipt-deliveries/f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b90" \
  -H "Authorization: Bearer $BOKAPOS_TOKEN"

Odgovori

getReceiptDelivery: Odgovori
200 OKDeliveryReceiptDelivery
404 Not FoundResource does not exist within the authenticated tenant scopeErrorCode
200 OK
{
  "id": "f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b90",
  "fiscalDocumentId": "9f8e7d6c-5b4a-4321-8765-0fedcba98761",
  "channel": "EMAIL",
  "recipient": "kupac@example.com",
  "language": "sr-Latn",
  "attachments": [
    "a4"
  ],
  "status": "DELIVERED",
  "attempts": 1,
  "failureCode": null,
  "createdAt": "2026-09-01T08:15:40.000Z",
  "deliveredAt": "2026-09-01T08:15:52.418Z",
  "updatedAt": "2026-09-01T08:15:52.418Z"
}
Odgovor: ReceiptDelivery

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

getReceiptDelivery: Odgovor
PoljeTipOpis
idobaveznouuid
fiscalDocumentIdobaveznouuid
channelobaveznoconst "EMAIL"
recipientobaveznostring
languageobaveznoReceiptDeliveryLanguageLanguage of the message; the receipt itself is the official journal rendered into the attached PDFs.

sr-Cyrlsr-LatnenVrednosti

attachmentsobaveznoReceiptDeliveryAttachmentsReturned in canonical order (a4, 80mm, 58mm, png). An empty list sends the link only.

a480mm58mmpngmax 4 itemsuniqueVrednosti

statusobaveznostring

QUEUEDSENDINGDELIVEREDFAILEDVrednosti

attemptsobaveznointeger

>= 0

failureCodeobaveznostring| null (može biti null)
createdAtobaveznodate-time
deliveredAtobaveznodate-time| null (može biti null)
updatedAtobaveznodate-time