consult_invoice
Look up an invoice's current status. Read-only.
After an OUTCOME_UNKNOWN issuance, consult its document_id: the dps_id of an nfse, the access_key of an nfe. A 404 on a dps_id means nothing was issued.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_type": "<document_type>"
},
"name": "consult_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dps_id | No | nfse instead of access_key: its DPS id. | |
| access_key | No | The access key (chave de acesso) the authorizer assigned, as issue_invoice and list_invoices return it. An NF-e key has 44 characters; the issuer's CNPJ inside it may carry letters since July 2026, so copy it exactly. | |
| company_id | No | UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| document_type | Yes | nfse for a service invoice, nfe for goods. | |
| company_tax_id | No | CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Local id. Use it for reissue and for submissions, and when a document was rejected and has no key. | |
| status | No | issued, rejected or cancelled. | |
| protocol | No | The authorization protocol, when granted. | |
| access_key | No | The authorizer's key. Absent while the document is not authorized. |