Update invoice

Information

To update the invoice data it is not necessary to send all the fields, just the fields you want to update.

Example Request

{
"status":"invoiced",
"shipments":
 [
   {
     "nfe_key":"41444444444444444444444444444",
     "nfe_link":"https://linkexemplo.com.br/xml/1112.xml",
     "nfe_number":"12",
     "nfe_serie":"1",
     "nfe_date":"2022-01-03T11:00:47",
     "cfops":"String com todos CFOPs do pedido"
   }
 ]
}

Attention

The order may have the delivery "id" already registered, in these cases you must send the id returned in shipments.

Example Request

{
"status":"invoiced",
"shipments":
 [
   {   
   "nfe_key":"41444444444444444444444444444",
   "id":"606b87e9e7cb7f1d4d5f8d33",
   "nfe_link":"https://linkexemplo.com.br/xml/1112.xml",
   "nfe_number":"12",
   "nfe_serie":"1",
   "nfe_date":"2022-01-03T11:00:47",
    "cfops":"6602"
   }
 ]
}

Reason for update failure

When you return the error:

{
    "error": true,
    "type": "not_updated",
    "message": "An error occurred, see details for more information.",
    "details": "Changes not found in the order"
}

It means that the order is already updated in the API Plugg.to, and it is not possible to send the same status.

Request object has the following properties:

FieldTypeDescription
statusstringinform order status
idstringorder delivery id
nfe_keystringinvoice key (send numbers only)
nfe_linkstringlink to invoice xml
nfe_numberstringinvoice number
nfe_seriestringinvoice series
nfe_datestringinvoice date (date in UTC format)
Language
Click Try It! to start a request and see the response here!