Skip to content

Pull bills and recover safely ​

A partner reads bills from Račun under an explicit customer grant. Select the agreed profile and retain the source/environment identity with the messages you receive.

Sign partner requests ​

Use the nine-line HMAC construction, with the partner's own issuer/key and an empty idempotency line. Do not send an Idempotency-Key header. A GET body is empty; code exchange signs its exact JSON. The target line is the escaped path plus ? and the raw query as sent, if present. Reordering, escaping or changing a parameter after signing fails.

The list accepts after, limit and optional presentation, each at most once and nonempty. The listPartnerBills query schema in the generated contract defines the page-size default and bounds. after is the previous page's last message ID. Only the defined lowercase/unescaped query syntax is accepted; do not add arbitrary tracking parameters. Single-message GET accepts only the optional presentation selection; PDF GET accepts no query.

Read a full pass ​

http
GET /v1/partner/grants/{grant_id}/bills
GET /v1/partner/grants/{grant_id}/bills?after={next_after}
GET /v1/partner/grants/{grant_id}/bills/{message_id}
GET /v1/partner/grants/{grant_id}/bills/{message_id}/pdf

Brace values above are placeholders; substitute actual IDs and sign the final target. A page returns items and, when traversal can continue, next_after. Preserve the selected profile and grant throughout the pass. Stop when no next cursor is returned. Validate the selected profile, message identity and supported semantics before storing a message. For PDF, verify its declared digest and size.

Items are ordered by message_id, not by modification time. Each page is a new snapshot. This is a full-pass traversal, not a durable change feed or a resumable event offset. New readable revisions may sort before a saved cursor; start a new pass without after to reconcile current visibility, and deduplicate using the profile's immutable identities. A page's absence never proves deletion or completeness of a previous traversal.

Preserve revisions and supplements ​

In the legacy profile, the message ID is derived from profile, issuer market, provider, source document ID and revision. Every revision is a complete immutable version. Store messages within the supplied source/environment identity, not just the provider's display name. The highest revision is current irrespective of arrival order. A cancellation is a new revision, not deletion or refund.

Same message identity and bill content is replay. Changed bill content or a changed already-known PDF conflicts. A first PDF may arrive later as an attachment supplement; its absence in a later response does not remove an already-known attachment. Do not compare whole-envelope bytes as the bill identity: PDF attachment, and optional signature bytes, can change separately. The rich profile has its own IDs and minimized-body digest; do not reinterpret one profile's message as another. See profiles.

Check current access on every read ​

A read requires an active partner, live partner key, matching live grant, Active account and the account's current read right. Both the candidate revision and the document's current publication must belong to that same account. Knowing any ID or customer reference grants nothing.

If a newer revision changes customer, the earlier customer's partner loses list, direct-message and PDF access to the document's history. The new customer's current right does not open the old customer's versions. Same-account readable history remains available. Withdrawal/current-right loss is enforced on reads; PDF authorization is checked again immediately before bytes are sent.

ResponseClient action
401Repair exact signing, clock or key; stop blind retries
403 partner_suspendedStop until the operator resolves partner suspension
403 partner_grant_inactiveStop using this grant; do not manufacture renewed consent
404 not_foundGrant is unknown or outside this partner's scope
404 bill_not_foundVersion is not readable under this grant/profile now
404 bill_pdf_not_foundNo authorized PDF is available
400 invalid_partner_requestRepair query/profile selection or resolve an unsupported presentment format
503Temporary storage/signing availability issue; use a bounded retry and retain the same operation

Previously downloaded copies ​

Revocation blocks new reads; it cannot recall bytes already downloaded. There is no durable deletion/withdrawal feed or automatic downstream erasure contract in this pull. A missing page item or failed read does not tell a partner which historical local copies to delete. Agree downstream retention, withdrawal and resynchronization behavior before a connected real-data integration.

Documentation for providers and partners.