Skip to main content

Order Invoice XML submission

In some scenarios of updating the Order to Invoiced, the Marketplaces require the XML to be sent when updating the Order Status.

How to identify an order that needs XML to be sent to Mercado Livre?​

When getting the order details, the following field will appear in the JSON, inside the metadata object: needInvoiceXML: true

Example:

{
...
"metadata": {
"needInvoiceXML": "true"
...
}
...
}

About sending the XML: /orders/{id}/nfe

When sending the XML information at the endpoint above, the order is updated to Invoiced with the invoice data. You do not need to send the invoice data information through JSON.

In case of an error​

There are some cases, in Mercado Livre, where sending the XML is optional and the field is returned to ANYMARKET as a false positive. The field will appear in the order as "needInvoiceXML: true" but Mercado Livre will not accept the XML.

If an error 400 is returned when sending the XML, for example: "Mercado Livre does not allow sending the XML of the invoice for the following combination of status and sub-status of shipment of the order on Mercado Livre", it will be necessary to update the Order status to Invoiced using the normal JSON endpoint /orders/{id}

How to identify an order that needs XML to be sent to B2W?​

It is only necessary to send the XML to B2W in the B2W Direct format.

When retrieving the order details, the following field will appear in the JSON: B2WshippingType: "b2wentregadirect"

For the Label printing scenario: if you need to change the number of volumes, before sending the XML, you must perform a PUT request on the /v2/orders/{Orderid} endpoint, changing the value of the number-of-packages field.

  • Example: {"metadata":{"number-of-packages":"2"}}

How to identify an order that needs XML to be sent to Dafiti?​

When retrieving the order details (metadata), the following field will appear in the JSON: needInvoiceXML: true

About sending the XML: /orders/{id}/nfe

When sending the XML information at the endpoint above, the order is updated to Invoiced with the invoice data. You do not need to send the invoice data information through JSON.