API reference

Fiscal

Org-level NFS-e fiscal-document reads and short-lived artifact downloads.

Fiscal documents are legal artifacts, not usage-summary invoices. Reads require fiscal:read, are organization-scoped, and stay reachable even when production credit is exhausted.

List documents

GET/v1/fiscal/nfse

Query params

FieldTypeNotes
limitrequiredinteger
Maximum number of items to return. Defaults to 20; maximum 100.
range 1..100
starting_afterstring
Opaque cursor from the previous response next_cursor.
status"pending" | "authorized" | "rejected" | "blocked" | "canceled" | "substituted"
Optional fiscal document status filter.
source_kind"consumption_period" | "subscription_term"
Optional taxable-event source filter.

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Retrieve a document

GET/v1/fiscal/nfse/{'{id}'}

Response

FieldTypeNotes
idrequiredstring
objectrequired"fiscal_document"
organization_idrequiredstring
statusrequired"pending" | "authorized" | "rejected" | "blocked" | "canceled" | "substituted"
source_kindrequired"consumption_period" | "subscription_term"
source_idrequiredstring
serierequiredstring
numerorequiredinteger
range -9007199254740991..9007199254740991
chave_acessorequiredstring | null
amount_brlrequiredstring
competence_daterequiredstring<ISO-8601> | null
receipt_daterequiredstring<ISO-8601> | null
cancellation_deadline_atrequiredstring<ISO-8601> | null
rejection_cstatrequiredstring | null
rejection_reasonrequiredstring | null
danfse_availablerequiredboolean
xml_availablerequiredboolean
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Download artifacts

Authorized documents expose 15-minute presigned URLs for the DANFSE PDF and authorized NFS-e XML. If an artifact is not ready, the API returns fiscal_document_not_ready.

GET/v1/fiscal/nfse/{'{id}'}/danfse
GET/v1/fiscal/nfse/{'{id}'}/xml

Response

FieldTypeNotes
objectrequired"fiscal_document_download"
fiscal_document_idrequiredstring
artifactrequired"danfse" | "xml"
urlrequiredstring
expires_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$