Download PDF receipt for given order.

The endpoint will return the bytes for the order pdf file. The headers for the response are:

'Content-Type': 'application/pdf'
'Content-Length': '8437'
'Content-Disposition': 'attachment; filename={order_id}.pdf'

Example

import requests


token = create_jwt()

url = f"https://api.lirium-sandbox.com/v1/customers/{customer_id}/orders/{order_id}/receipt"
headers = {
  "Authorization": f"Bearer {token}",
}

response = requests.get(url=url, headers=headers)

data = response.content

with open("./{order_id}.pdf", "wb") as f:
f.write(data)
Language
Authorization
Header
Click Try It! to start a request and see the response here!