Skip to main content

Sending Invoice (PDF or XML)

This endpoint allows you to register an invoice in an order package and send the document to the Marketplace. The endpoint does not return a body in the response (void).

API Documentation: /orders/{id}/fiscalDocument

Parameters​

ParameterTypeRequiredDescription
id (path)LongRequiredOrder ID in ANYMARKET.
packageId (query)UUIDRequired when the order has packages; must not be provided when the order has no packagesIdentifier of the order package to which the invoice belongs.

Body (multipart/form-data)​

FieldTypeRequiredDescription
fileFile (PDF or XML)RequiredInvoice file.
numberStringRequiredInvoice number.
dateString (ISO 8601)RequiredIssue date. Ex: 2026-05-05T10:00:00-03:00.
accessKeyStringOptionalNF-e access key.
seriesStringOptionalInvoice series.
cfopStringOptionalTax Operations and Services Code.
companyStateTaxIdStringOptionalState tax ID of the issuing company.
linkNfeStringOptionalURL to query the NF-e.
invoiceLinkStringOptionalURL where the PDF or XML invoice is stored.
extraDescriptionStringOptionalField for additional notes.
operationTypeStringOptionalFiscal operation type.
emissionTypeStringOptionalInvoice emission type.
authorizationProtocolStringOptionalInvoice authorization protocol.

Important: Invoiced packages become immutable β€” they cannot be edited, deleted, or cancelled.

Return Codes​

CodeDescription
200Invoice successfully registered in the package.
400packageId obrigatΓ³rio β€” the order has packages and the request did not provide packageId.
400PACKAGE_ALREADY_INVOICED β€” the provided package already has an associated invoice.

In case of failure​

There are some cases in which the document submission is not accepted.

If a 400 error is returned when sending the document, it will be necessary to update the Order status to Invoiced using the standard JSON endpoint via /orders/{id}