Request parameters
- tenant - (mandatory) - business tenant
- account_id - (conditional) - Account ID
- account_code - (conditional) - Account Code
- account_name - (conditional) - Account Name
- skip_lookup_account - (optional; default false) - is used only when account_id is provided; skips extra call to DB for Account verification
- invoice_mode - (mandatory) - Invoice Mode; defines what should be done; dictionary: regular, interim, rollback, copybill
- invoice_id - (optional; default "") - required when invoice_mode is either rollback or copybill; otherwise ignored
- include_events - (optional; default false) - whether events should be included into Invoice, or not
- include_rops - (optional; default false) - whether ROPs (RECURRING) should be included into Invoice, or not
One of conditional parameters: account_id, or account_code, or account_name - is mandatory to be provided.
Response parameters
Only result of ordering. You can get Invoice information by API GetInvoiceData.
Request:
{
"tenant": "zegoal",
"acc_id": "13",
"mode": "interim"
}
CODE
Response (success):
{
"processing_result": {
"text": "success",
"status": "ok",
"code": 0
},
"processing_date": "2019-04-24 17:31:05",
"OrderInvoice": {
"response": {
"tenant": "zegoal",
"skip_lookup_account": false,
"result": "successful",
"lc_from": "2019-04-24 17:30:56",
"invoices": [<link>],
"invoice_mode": "interim",
"invoice_id": "",
"include_rops": false,
"include_events": false,
"account_name": "Название аккаунта 29",
"account_id": 4,
"account_code": "29",
"TZ": "Europe/Minsk"
},
"request": {
"tenant": "zegoal",
"invoice_mode": "interim",
"account_id": "4"
}
}
}
CODE
Response (error)
{
"processing_result": {
"text": "Subscriber was not found",
"status": "error",
"code": 1
},
"processing_date": "2019-02-15 16:06:19 +00:00",
"OrderInvoice": {
"response": "false",
"request": {
"tenant": "taskvizor",
"mode": "regular",
"acc_id": "501"
}
}
}
CODE