Quick Reference

Quickstart.Billing.Account

Estimated reading: 2 minutes 375 views

Get Account Billing History.

This service provide billing information about a user account.

URL:

https://[hoster-api-host]/1.0/billing/account/rest/getaccountbillinghistorybyperiod

Authentication:

You can authenticate using either an application ID (appid) or a user session token (session).

POST fields in the body :

FieldsTypesExample
session/appid *string134bdc9a2892************de8057d
starttime *string1999-01-01 12:00:00 (yyyy-MM-dd HH:mm:ss)
endtime *string1999-01-02 12:00:00 (yyyy-MM-dd HH:mm:ss)
period *stringDAY [YEAR, MONTH, WEEK, DAY, HOUR]
targetAppidstring
timeOffsetstring
groupNodesstring
Request
				
					curl -X POST \
  https://[hoster-api-host]/1.0/billing/account/rest/getaccountbillinghistorybyperiod \
  -H "cache-control: no-cache" \
  -H "content-type: application/x-www-form-urlencoded" \
  -d "session=582e7dd&starttime=2024-04-01 20:23:55&endtime=2024-04-02 20:23:55&period=DAY"				
			
Response
				
					{
  "result": 0,
  "array": [
    {
      "resourceFreeCost": 0,
      "dateTime": "2024-04-01 00:00:00",
      "billNetworkExtAmount": 0,
      "usedStorageAmount": 0,
      "licenceHours": 0,
      "fixedCloudletsCost": 0,
      "storageCost": 0,
      "type": "ip",
      "resourceBillableAmount": 0,
      "networkExtCost": 0,
      "hostGroupDisplayName": "Users",
      "isBonus": false,
      "flexibleCloudletsFreeAmount": 0,
      "nodeCount": 1,
      "flexibleCloudletsCost": 0,
      "networkExtFreeAmount": 0,
      "nodeid": 1639,
      "group": 0,
      "usedCloudletsAmount": 3,
      "cost": 0.012846,
      "fixedCloudletsFreeAmount": 0,
      "isRemote": false,
      "count": 3,
      "flexibleCloudletsAmount": 0,
      "resourceFreeAmount": 0,
      "isPaid": false,
      "fixedCloudletsAmount": 0,
      "isWithdrawn": false,
      "resourceCost": 0,
      "minFeeResourceAmount": 0,
      "appid": "08888888888888888888888888888851",
      "domain": "env-7057607",
      "billStorageAmount": 0,
      "usedNetworkExtAmount": 0,
      "storageFreeAmount": 0,
      "hostGroupUniqueName": "user_host_group",
      "resourceType": "OPTION"
    }, ... 
    ]
}				
			

Leave a Comment