Sudrel API
Dashboard Create API key

Documentation › NFS-e issuance

Guides

Batch issuance

Up to 5,000 invoices in one call, by JSON or spreadsheet, with a result and reprocessing per row.

Up to 5,000 invoices in one call, as JSON or through the dashboard spreadsheet, with a result per row. Same engine as single issuance and the spreadsheet. Always send referencia in each item: it is what makes resending the batch safe.

POST /v1/lotes  --202-->  validando
                              |
          ao_validar = emitir_validas          ao_validar = aguardar
                              |                       |
                              |               aguardando_emissao
                              |                       |
                              |          POST /v1/lotes/{id}/emissao
                              v                       v
                          processando  (as notas transmitindo)
                              |
                              v
                          concluido  --> webhook LOTE_EMISSAO_CONCLUIDO
Step Route What happens
Create POST /v1/lotes Always 202. Readiness with bloqueio returns 412, and nothing is created.
Track GET /v1/lotes/{id} status: validando, aguardando_emissao, processando, concluido or erro, and the counts.
Result per row GET /v1/lotes/{id}/itens Each row with the invoice status, or com_erro_validacao, aguardando_emissao, ja_existente.
Issue (with aguardar) POST /v1/lotes/{id}/emissao "todas" or a list of rows. Only once.
Fix and issue again POST /v1/lotes/{id}/reprocessamento Only rows with errors, rejeitada, or falha_transmissao with dps_enviada: "nao".
Report GET /v1/lotes/{id}/relatorio The spreadsheet with the result of each row.

Limits: 5,000 items with the production key, 100 with the test key. JSON up to 30 MB, spreadsheet up to 20 MB. One POST /v1/lotes counts as one call against the request limit. Batch items enter the queue behind single invoices.

Do not confuse validating with issuing. Validation always runs, right after the batch is created. With emitir_validas (default), the valid rows are issued next. With aguardar, nothing is issued until you call POST /v1/lotes/{id}/emissao.

Send referencia in every item: it is what makes it safe to send the batch again. See Idempotency.

Endpoints in this section, with in-page testing