# API: Metered Billing: Get usage

# meteredGetUsage

Get usage of metered billing components for certain HostBill account in current billing period. This method returns list of variables, summary of each is available under charge and usage values.

# Required parameters

Parameter Description
account_id HostBill account ID

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=meteredGetUsage&account_id=ACCOUNT_ID

# PHP Samples

# Response

{
    "success": true,
    "variables": {
        "5": {
            "id": "5",
            "product_id": "11",
            "name": "Domains",
            "variable_name": "powerdnspanel",
            "unit_name": "domain(s)",
            "cycle": "Monthly",
            "scheme": "volume",
            "options": "0",
            "usage": "2",
            "charge": 5,
            "values": [
                {
                    "id": "109",
                    "variable_name": "powerdnspanel",
                    "unit_name": "domain(s)",
                    "cycle": "Monthly",
                    "date_created": "2011-12-13 07:00:39",
                    "name": "Domains",
                    "date_updated": "2011-12-13 07:00:39",
                    "charge": "5.00",
                    "qty": "2",
                    "output": "",
                    "rawoutput": "",
                    "variable_id": "5",
                    "scheme": "volume",
                    "options": "0"
                }
            ]
        }
    },
    "call": "meteredGetUsage",
    "server_time": 1323788715
}
Last Updated: 10/7/2024, 2:36:43 PM