Update Invoice by Id

Updates the order invoice details by identifying it using the order.id field.

📄 Invoice

📘

Automatic status transition

This method also updates the order status to 20 (Invoice Created).

Payload Simples

This payload is used to send invoice data for a specific order.

FieldTypeDescription
keystringUnique access key for the invoice (usually 44 digits).
numberstringInvoice number as issued by the system.
serieNumberintegerSeries number of the invoice (typically related to fiscal series).
totalAmountnumberTotal value of the invoice.
xmlUrlstringPublic URL to download the XML file of the invoice. Should follow the format with {client_id}, {order_id}, and {invoice.key}.
fileUrlstringPublic URL to download the PDF representation of the invoice. Same dynamic placeholders apply.
issuanceDatestring (ISO 8601)Date and time the invoice was issued (e.g., 2024-08-04T03:00:00Z).


Payload for Including an Electronic Invoice (NFe) via xmlString in Base64

This document describes the JSON payload used for the PUT request that attaches the details of an Electronic Invoice (NFe) to an existing sales order.


Payload Structure

The payload is a JSON object with the following structure:

FieldTypeDescriptionRequired
invoiceobjectObject containing the data of the invoice to be associated with the order.Yes
sellerOrderIdstringThe identifier of the sales order in the seller's system.Yes
sellerobjectObject containing the seller's information (invoice issuer).Yes

invoice Object Details

This object stores the NFe data.

FieldTypeDescription
keystringThe NFe access key, a unique identifier for the document.
numberstringThe invoice number.
serieNumbernumberThe invoice serial number.
xmlUrlstringThe URL to the NFe XML file. Can be null.
fileUrlstringThe URL to the NFe PDF file (DANFE). Can be null.
xmlStringstringA string in Base64 format representing the contents of the NFe XML file. This is the recommended format to avoid parsing issues with special characters.
issuanceDatestringThe issue date of the invoice, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ).

Note about xmlString: The invoice XML must be sent encoded in Base64 to ensure the request does not fail. Be sure to include the ?XMLStringIsBase64=true query parameter in the URL to indicate that the XML is encoded.


seller Object Details

This object contains the invoice issuer's data.

FieldTypeDescription
cnpjstringThe seller's CNPJ.
Language
Credentials
OAuth2
URL