# API: Simulate Order Invoice
# simulateOrderInvoice
Simulate invoice creation (without actual sending/creating invoice) from order ie.: to get tax information
# Required parameters
Parameter | Description |
---|---|
id | Draft ID |
# Optional parameters
Parameter | Description |
---|---|
tax_exempt | Force tax excemption - set 1 or 0. |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=simulateOrderInvoice&id=ID
# PHP Samples
# Response
{
"success": true,
"invoice": {
"id": "",
"status": "Unpaid",
"client_id": 207,
"contact_id": 0,
"date": "2023-08-30",
"duedate": "2023-08-30",
"paybefore": "2023-08-30",
"datepaid": "0000-00-00",
"subtotal": "1231.00",
"credit": 11,
"tax": "283.13",
"taxrate": "23.00",
"tax2": 0,
"taxrate2": 0,
"taxexempt": 0,
"total": "1503.13",
"grandtotal": 1514.13,
"notes": "",
"payment_module": 0,
"currency_id": 0,
"rate": 1,
"rate2": 0,
"rate3": 1,
"paid_id": "",
"recurring_id": 0,
"locked": 0,
"metadata": [],
"flags": 0,
"sortid": 0,
"items": [
{
"type": "Product",
"item_id": "6038",
"description": "DIY CLOUD - PERSONAL 1234\n + test: x 1",
"description2": "DIY CLOUD - PERSONAL 1234\n + test: x 1",
"amount": "1231",
"taxed": true,
"tax_rate": "23.00",
"tax_group_id": "1",
"qty": 1,
"contract_id": 0,
"_amount": "1231",
"linetotal": "1231.00",
"position": 0,
"tax": "283.13"
}
],
"discounts": [],
"client": {
"id": "207",
"group_id": "0",
"email": "[email protected]",
"lastlogin": "2023-04-21 23:57:16",
"ip": "172.20.0.1",
"host": "172.20.0.1",
"status": "Active",
"loginattempts": "0",
"mfamodule": "0",
"brand_id": "1",
"browser": "",
"parent_id": "0",
"firstname": "aa",
"lastname": "bb",
"companyname": "John Doe Inc.",
"address1": "",
"address2": "",
"city": "",
"state": "DOLNO\u015aL\u0104SKIE",
"postcode": "",
"country": "PL",
"phonenumber": "",
"datecreated": "2020-09-29",
"notes": "",
"language": "english",
"company": "1",
"credit": "11.00",
"taxexempt": "0",
"latefeeoveride": 0,
"overideduenotices": false,
"client_id": "207",
"cardnum": "",
"currency_id": "0",
"privileges": "",
"taxrateoverride": "0",
"taxrate": "0",
"billing_contact_id": "0",
"overideautosusp": "0",
"disableemails": "0",
"brand": "Default"
},
"proforma_id": "P23-"
},
"call": "simulateOrderInvoice",
"server_time": 1696493156
}