Sending an Invoice


Overview

Endpointhttps://{base_url}/v1/seller-orders/{code}/invoice/
MethodPATCH
Headers:

  • AuthorizationJWT {id_token}
  • Acceptapplication/json
  • Content-Typeapplication/json

The URL must contain the following parameters:

  • code: Unique order code generated by Olist;

Payload:

  • url: The invoice URL for the XML file must be publicly available and accessible. Olist needs to download and save all order invoices.
    It is recommended to create a pre-signed URL for the security of the client's data, duly in the HTTPS protocol for download;

Response codes:

  • 200: Ok
  • 400: Bad request
  • 401: Unauthorized

02 - UF Code
04 - Year and month of issue
14 - CNPJ of the issuer
02 - model
03 - series
09 - NF-e number
01 - Form of issuance of the NF-e
08 - numeric code
01 - check digit

For Olist, it is necessary that the model is the 55

Unique invoice key

A note that has already been imported into Olist for one order cannot be used for another. There is a validation that checks if the note key has already been used.

But, the same note can be used for an order that has more than one volume, without problems.

Note issuance date and time

An invoice must have the date and time of issue after the date of creation of the order for the seller.


Request

curl --location --request PUT 'https://{base_url}/v1/seller-orders/{code}/invoice/' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: JWT {id_token}' \
--data '{
	"url": "http://example.com/invoices/invoice.xml"
}'

Response

{
    "url": "http://example.com/invoices/invoice.xml",
    "seller_order_code": "{code}"
}