Create Sale
Creates Invoice with Line Items and Payments
/invoices/create
https://api.oauth.pabau.com/{api_key}/invoices/create
Request
Note: You can send user_id or biller_id in the employee_id field
If item_type = gift-voucher, the sale_item should look like this:
[{
"item_type":"giftvoucher",
"price":{Float},
"valid_from": {String (date(Y-m-d))},
"valid_to": String (date(Y-m-d))},
"template_id": {Int},
}]
If item_type = account, there should be only one sale_item like this:
[{
"price": {Float},
"item_type":"account"
}]
Response sample
application/json
{
"token": "{token}",
"expiration": "2024-05-03T06:26:51.092Z",
"tenant": "{tenant}",
"catalog": {
},
"success": true,
"message": "Invoice Created",
"invoice_No": {Invoice Number},
"next_appointment": {ID}
}