Skip to content

Billing Setting

Specifies the configuration rules that determine which entity statuses are included when generating a bill.

Attributes

is_closed_entity_only (boolean)
Denotes whether to include only closed entity while generating bill.

is_closed_entity_only (boolean)
Boolean value which can have two possible values. The values are true and false.

is_canceled_entity_excluded (boolean)
Denotes whether to exclude the canceled entity while generating bill.

is_canceled_entity_excluded (boolean)
Boolean value which can have two possible values. The values are true and false.

Edit Billing Setting

This operation helps to update the billing settings

Url

<service domain|custom domain>/app/<portal>/api/v3/billing_settings

Attributes

is_closed_entity_only (boolean)
Denotes whether to include only closed entity while generating bill.

is_closed_entity_only (boolean)
Boolean value which can have two possible values. The values are true and false.

is_canceled_entity_excluded (boolean)
Denotes whether to exclude the canceled entity while generating bill.

is_canceled_entity_excluded (boolean)
Boolean value which can have two possible values. The values are true and false.

$ curl <service domain|custom domain>/app/<portal>/api/v3/billing_settings\
      -X PUT\ 
      -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='{
  "billing_setting": {
    "is_canceled_entity_excluded": false,
    "is_closed_entity_only": true
  }
}
'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/billing_settings";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "billing_setting": {
    "is_canceled_entity_excluded": false,
    "is_closed_entity_only": true
  }
}
;
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/billing_settings"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
  "billing_setting": {
    "is_canceled_entity_excluded": false,
    "is_closed_entity_only": true
  }
}

'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -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/billing_settings"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "billing_setting": {
    "is_canceled_entity_excluded": false,
    "is_closed_entity_only": true
  }
}
'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
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"
  },
  "billing_setting": {
    "is_canceled_entity_excluded": false,
    "is_closed_entity_only": true
  }
}

Get Billing Setting

This operation helps to get the billing settings.

Url

<service domain|custom domain>/app/<portal>/api/v3/billing_settings

Attributes

is_closed_entity_only (boolean)
Denotes whether to include only closed entity while generating bill.

is_closed_entity_only (boolean)
Boolean value which can have two possible values. The values are true and false.

is_canceled_entity_excluded (boolean)
Denotes whether to exclude the canceled entity while generating bill.

is_canceled_entity_excluded (boolean)
Boolean value which can have two possible values. The values are true and false.

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/billing_settings\
      -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"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/billing_settings";
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: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/billing_settings"
$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 get -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/billing_settings"
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)
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"
    },
    "billing_setting": {
        "is_canceled_entity_excluded": false,
        "is_closed_entity_only": true
    }
}