Generate Order Invoice
Generate (or reuse a cached) invoice PDF for an order and return its file URL.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Path Parameters
Header Parameters
API contract version to target. See the Changelog for what changed in each version.
"2.0.0""2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
"ORDER_INVOICE" | "ORDER_INVOICE_EN" | "ORDER_INVOICE_AR"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.flavours.sa/dev/api/v2/export/pdf/orders/sint/invoice" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "type": "ORDER_INVOICE_EN", "options": [ "SHOW_PRODUCT_NOTES" ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Order invoice generated successfully."
},
"data": "https://flavours-files.s3.me-south-1.amazonaws.com/export/pdf/orders/invoices/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d-order_invoice_en-show_customer-show_message.pdf"
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 422,
"status": "error",
"message": "The selected Type is invalid. (and 1 more error)"
},
"data": [
{
"code": 0,
"message": "The selected Type is invalid.",
"field": "type"
},
{
"code": 0,
"message": "The selected options.0 is invalid.",
"field": "options.0"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}Order Products GET
Paginated on-demand line items for an order, filtered by status (related/returned/changed). At X-API-Version >= 2.6.0 each row eager-loads its product/modifiers/taxes/discounts by default; below 2.6.0 rows are bare unless explicit includes are passed. Scoped to the caller's market/branch. Paginated via page/per_page (max 100).
Create Order Type POST
Register a new order type in the shared catalog.