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β
| Parameter | Type | Required | Description |
|---|---|---|---|
| id (path) | Long | Required | Order ID in ANYMARKET. |
| packageId (query) | UUID | Required when the order has packages; must not be provided when the order has no packages | Identifier of the order package to which the invoice belongs. |
Body (multipart/form-data)β
| Field | Type | Required | Description |
|---|---|---|---|
| file | File (PDF or XML) | Required | Invoice file. |
| number | String | Required | Invoice number. |
| date | String (ISO 8601) | Required | Issue date. Ex: 2026-05-05T10:00:00-03:00. |
| accessKey | String | Optional | NF-e access key. |
| series | String | Optional | Invoice series. |
| cfop | String | Optional | Tax Operations and Services Code. |
| companyStateTaxId | String | Optional | State tax ID of the issuing company. |
| linkNfe | String | Optional | URL to query the NF-e. |
| invoiceLink | String | Optional | URL where the PDF or XML invoice is stored. |
| extraDescription | String | Optional | Field for additional notes. |
| operationType | String | Optional | Fiscal operation type. |
| emissionType | String | Optional | Invoice emission type. |
| authorizationProtocol | String | Optional | Invoice authorization protocol. |
Important: Invoiced packages become immutable β they cannot be edited, deleted, or cancelled.
Return Codesβ
| Code | Description |
|---|---|
| 200 | Invoice successfully registered in the package. |
| 400 | packageId obrigatΓ³rio β the order has packages and the request did not provide packageId. |
| 400 | PACKAGE_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}