nfse_get
Get one NFS-e by its internal invoice id (the id returned when the invoice is issued or listed), including status, amounts, customer and the events timeline (every status change with its reason and time). The timeline explains why a note was rejected or what happened to it. Instead of invoice_id it takes external_id, your own reference sent when issuing: it searches NFS-e, NF-e and NFC-e (type is not needed) and returns the note; since an external_id is not unique, when more than one note has it it returns ambiguous: true with the matches (id, type, status, createdAt) instead of a note. Fails when the id does not exist in this workspace and environment. With type "nfe" or "nfce" it returns the NF-e or NFC-e and its timeline (states and fiscal events); the NFC-e also has qrCode and urlChave.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "nfse_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Kind of invoice: "nfse" (default, services), "nfe" (goods, model 55) or "nfce" (sale to the consumer, model 65). NF-e and NFC-e are homologação only and need their own release for the account. With "nfe" or "nfce" use invoice_id, not access_key. | nfse |
| invoice_id | No | Internal invoice id (UUID). Required unless external_id is given. | |
| external_id | No | Your own reference of the note (the external_id sent when issuing), exact match, any type. Alternative to invoice_id. |