Invoices (NF-e)

Send invoice

Sends the XML of an already authorized invoice for the order.

POST/v1/orders/{orderId}/invoices

Coming soon

This route is not in the API yet. This page shows what it will do. Fields, examples and the playground arrive when it ships.

marketapi does not issue invoices. Upload the authorized XML as a confidential asset and send its xmlAssetId here (never the XML in the body). To replace a rejected invoice, also send replacesInvoiceId.

marketapi validates the XML before accepting it: key, total amount and issuer tax ID. It answers 202 with the invoice as pending and an invoice.submit job, which sends it to the marketplace. The result arrives as invoice.accepted or invoice.rejected.

Refusals that create no job: 422 if the XML is invalid, not authorized, or the key, issuer or total do not match; 409 if the key already exists, the order is cancelled, or an invoice that was not rejected already exists.