<service domain|custom domain>/app/<portal>/api/v3/billings/_generate_bill
Billing
Contains invoice details for services delivered by a Managed Service Provider (MSP).
Attributes
id (long)
Unique identifier of the bill
start_date (datestamp)
Denotes the start date of the bill period.
end_date (datestamp)
Denotes the end date of the bill period.
status (string)read only
Denotes the status of the bill Allowed Values : SCHEDULED, RUNNING, FINISHED, FAILED
generated_time (datetime)
Denotes the generated time of the bill.
is_all_worklogs (boolean)
Denotes whether the bill is for all worklogs.
More Attributes Expand all
Get List Billing
This operation helps to get All Bills.
Url
<service domain|custom domain>/app/<portal>/api/v3/billings
Attributes
id (long)
Unique identifier of the bill
start_date (datestamp)
Denotes the start date of the bill period.
end_date (datestamp)
Denotes the end date of the bill period.
status (string)read only
Denotes the status of the bill Allowed Values : SCHEDULED, RUNNING, FINISHED, FAILED
generated_time (datetime)
Denotes the generated time of the bill.
is_all_worklogs (boolean)
Denotes whether the bill is for all worklogs.
More Attributes Expand all
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/billings\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"\
--data-urlencode input_data='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/billings";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {};
params = {"input_data":input_data};
response = invokeurl
[
url: url
type: GET
parameters:params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/billings"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{}'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/billings"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"billings": [
{
"end_date": {
"display_value": "May 10, 2025",
"value": "2025-05-10"
},
"generated_by": {
"email_id": "mathew@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": "",
"last_name": "",
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"deleted": false,
"name": "Base Site",
"id": "234567890123456",
"is_default": true,
"customer": {
"id": "234759602834500"
}
},
"phone": "",
"employee_id": null,
"name": "Mathew",
"id": "234567890234567",
"photo_url": "",
"is_vip_user": false,
"department": null,
"first_name": "Mathew",
"job_title": null,
"customer": {
"name": "Customer A",
"id": "234759602834500",
"is_msp": true,
"deleted_time": null
}
},
"display_id": "1",
"file_id": "2",
"is_all_worklogs": true,
"id": "234759602834598",
"generated_time": {
"display_value": "May 12, 2025 11:26 AM",
"value": "1747029366753"
},
"status": "FINISHED",
"customer": {
"name": "Customer A",
"id": "234759602834500",
"is_msp": true,
"deleted_time": null
},
"start_date": {
"display_value": "May 1, 2025",
"value": "2025-05-01"
}
}
],
"list_info": {
"sort_fields": [
{
"field": "id",
"order": "desc"
}
],
"has_more_rows": false,
"start_index": 1,
"fields_required": [
"display_id",
"generated_time",
"is_all_worklogs",
"time_period",
"generated_by",
"status",
"file_id",
"start_date",
"end_date"
],
"total_count": 1,
"page": 1,
"get_total_count": "true",
"search_criteria": {
"condition": "is",
"field": "generated_time",
"value": "$(THIS_MONTH)"
},
"row_count": 1
}
}
Delete Billing
This operation helps to delete a Bill.
Url
<service domain|custom domain>/app/<portal>/api/v3/billings?ids={bill_ids}
$ curl <service domain|custom domain>/app/<portal>/api/v3/billings?ids={bill_ids}\
-X DELETE\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/billings?ids={bill_ids}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
url: url
type: DELETE
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/billings?ids={bill_ids}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/billings?ids={bill_ids}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Generate Bill
To generate new bill for the specific customer
Url
$ curl <service domain|custom domain>/app/<portal>/api/v3/billings/_generate_bill\
-X POST\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"\
-d input_data='{
"generate_bill": {
"customerId": "234759602834500",
"modules_selected": [
"All"
],
"all_worklogs": true,
"start_date": "2025-05-01",
"end_date": "2025-05-30"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/billings/_generate_bill";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"generate_bill": {
"customerId": "234759602834500",
"modules_selected": [
"All"
],
"all_worklogs": true,
"start_date": "2025-05-01",
"end_date": "2025-05-30"
}
};
params = {"input_data": input_data};
response = invokeurl
[
url: url
type: POST
parameters: params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/billings/_generate_bill"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"generate_bill": {
"customerId": "234759602834500",
"modules_selected": [
"All"
],
"all_worklogs": true,
"start_date": "2025-05-01",
"end_date": "2025-05-30"
}
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/billings/_generate_bill"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"generate_bill": {
"customerId": "234759602834500",
"modules_selected": [
"All"
],
"all_worklogs": true,
"start_date": "2025-05-01",
"end_date": "2025-05-30"
}
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="POST")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
}
}