Read and download documents

Store the uuid returned by submission. This is the document ID for retrieve,
download and retry requests, rather than your document_number. List responses
expose it as document.id.

Every document family has the same read endpoints. These examples use invoices;
replace /invoices with the appropriate family for notes or prepayment invoices.

# List cleared invoices for one taxpayer.
curl "$BASE/invoices?status=CLEARED" \
  -H "Authorization: Api-Key $KEY" \
  -H "X-NBR-Connected-Account-Id: $ACCOUNT_ID"

# Retrieve one document and its statuses.
curl "$BASE/invoices/$DOC_ID" \
  -H "Authorization: Api-Key $KEY"

# Download signed or cleared XML, or a PDF with the QR code.
curl "$BASE/invoices/$DOC_ID/download?type=xml" \
  -H "Authorization: Api-Key $KEY" -o invoice.xml
curl "$BASE/invoices/$DOC_ID/download?type=pdf" \
  -H "Authorization: Api-Key $KEY" -o invoice.pdf

Standard accepted documents have status CLEARED; simplified accepted documents
have status REPORTED. Inspect returned errors and warnings when a document is
not accepted. GET /invoices/summary returns per-status counts.

Filter and paginate

List requests return count, next, previous and results, newest first.
Use page and page_size for pagination. Available filters include:

  • keyword: document number, customer, tax identifier or your reference.
  • status: CLEARED, REPORTED, ERROR, FAILED or PENDING.
  • issue_datetime_after and issue_datetime_before.
  • supply_date_after and supply_date_before.

Your API key scopes all results to your organization. Send
X-NBR-Connected-Account-Id and optionally X-NBR-Sub-CR to narrow list and summary
results to one taxpayer or branch. Each family returns only its own document
type; a credit note will not appear in the invoice list.

For an unsuccessful transmission, use the retry guidance
before sending another request.