nfse_issue_batch
Emits up to 50 NFS-e in one call, for one company or several (for example the rows of a spreadsheet). Longer lists go in several batches of 50. Each item takes the same fields as a single NFS-e (company_tax_id or company_id, plus amount or services; customer, competence_date, service_code etc. are optional). With a stable idempotency_key per item (for example "-row-"), repeating the same batch after a timeout issues nothing twice. Items are checked one by one: invalid items come back rejected with an error and are not saved, the valid ones are saved together. Results are keyed by index (the item position, starting at 0); each rejected row carries its error.message. Accepted items are already saved, and sending them again without the same idempotency_key creates new invoices. Items with replayed true were already saved by an earlier call with the same idempotency_key. Issuance is asynchronous: each invoice starts queued and gets its final status later. Without confirm: true it changes nothing and returns a preview; with confirm: true it runs. The preview shows the number of invoices, the total amount, the companies and how many e-mails go out; items that would be rejected are listed with their error.
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": {
"invoices": "<invoices>"
},
"name": "nfse_issue_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | true runs the action. Without it nothing changes and only a preview is returned. | |
| invoices | Yes | Invoices to issue (1 to 50). Each item has the same fields as a single NFS-e; items may belong to different companies. |