Start charge invoice
Get preview or make invoice for customer for his services
Request
- Base URL: https://demo.splynx.com/api/2.0
- URL: https://demo.splynx.com/api/2.0/admin/finance/to-bill/{customer_id}--{action}
- Auth: HTTP basic
Path parameters
The ID of the Customer.
Preview|generate action.
Request body
Example request
{
"toBillDate": "2017-01-01",
"transactionDate": "2017-01-01",
"period": 1
}Response
Explanation. According to post data if we select action "generate" we can generate and get info about new invoice.<br> Response has two elements: "invoice" with id, number and "result" with info about invoice items.<br> "Result" has elements with service types (internet/voice/custom)<br> each of them has elements with serivice id (5, 10 etc)<br> each of them has debit/credit element<br> and, finaly, each of them has info about invoice item (description, price, etc)<br> If action was selected like "preview" so we can get same result but without creating invoice<br> and invoice array will be with empty elements<br>
Example response
{
"result": {
"internet": {
"5": {
"debit": [
{
"description": "first service description",
"quantity": 1,
"unit": 1,
"days": 30,
"price": 1,
"tax_percent": 0,
"total": 10,
"date": "2017-12-01",
"from": "2017-10-22",
"to": "2017-11-30"
}
]
},
"10": {
"debit": [
{
"description": "second internet service description",
"quantity": 1,
"unit": 1,
"days": 30,
"price": 1,
"tax_percent": 0,
"total": 10,
"date": "2017-12-01",
"from": "2017-11-01",
"to": "2017-11-30"
}
]
}
},
"custom": {
"3": {
"debit": [
{
"description": "description of custom service",
"quantity": 1,
"unit": 1,
"days": 30,
"price": 1,
"tax_percent": 0,
"total": 10,
"date": "2017-12-01",
"from": "2017-10-22",
"to": "2017-11-30"
}
]
}
}
},
"invoice": {
"id": 6,
"number": 201703000004
}
}Changes
No recorded changes to this operation across all 1 revision of this API.