v1

latestOpenAPI 3.0.02026-07-14641139.1 KB
Invoice

Order invoice notification

Once the order is invoiced, the seller should use this request to send the invoice information to the marketplace.

We strongly recommend that you always send the object of the invoiced items. With this practice, rounding errors will be avoided.

It is not allowed to use the same invoiceNumber in more than one request to the Order Invoice Notification endpoint.

Be aware that this endpoint is also used by the seller to send the order tracking information. This, however, should be done in a separate moment, once the seller has the tracking information.

The Notify invoice resource is needed to use this API request. This is included in OMS - Full access and IntegrationProfile - Fulfillment Oms, among other default roles available in the Admin. Learn more about the License manager roles and resources.

post/api/orders/pvt/document/{orderId}/invoices

Path parameters

orderIdstring required
Example:70caf3941s6df1

ID of the order.

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

cfopstring

Fiscal code used in Brazil.

courierstring nullable

The name of the carrier responsible for delivering the order.

This field should only be used when sending tracking information. When the request is used for sending the invoice, this field should be left empty ("").

extraValueinteger

Extra value in the invoice in cents. Do not use any decimal separator. For instance, $24.99 should be represented as 2499.

invoiceKeystring nullable

Invoice key.

invoiceNumberstring required

Number that identifies the invoice.

invoiceUrlstring

URL of the invoice. Can be used to send the URL of an XML file, for example, which is useful for some integrations.

invoiceValuestring required

Total amount being invoiced in cents. Do not use any decimal separator. For instance, $24.99 should be represented as 2499.

issuedDatestring required

Issuance date of the invoice in ISO format.

trackingNumberstring nullable

Code that identifies the order tracking.

This field should only be used when sending the tracking information. When the request is used for sending the invoice, this field should be left empty ("").

trackingUrlstring nullable

URL used to track the order.

This field should only be used when sending the tracking information. When the request is used for sending the invoice, this field should be left empty ("").

typestring required

The type of invoice. There are two possible values: "Output" and "Input". The "Output" type should be used when the invoice you are sending is a selling invoice. The "Input" type should be used when you send a return invoice.

volumesinteger

Number of volumes in the invoice.

Example request

{
  "courier": null,
  "extraValue": 100,
  "invoiceKey": null,
  "invoiceNumber": "9999",
  "invoiceUrl": null,
  "invoiceValue": 2499,
  "issuedDate": "2019-01-30",
  "items": [
    {
      "id": "1234",
      "price": 10000,
      "quantity": 1
    }
  ],
  "trackingNumber": null,
  "trackingUrl": null,
  "type": "Output"
}

Response

OK

datestring

Date and time when the notification was received.

orderIdstring

Identification of the order in the seller.

receiptstring

Protocol code generated by the update. It may be null.

Example response

{
  "date": "2014-02-07T15:22:56.7612218-02:00",
  "orderId": "123543123",
  "receipt": "38e0e47da2934847b489216d208cfd91"
}