# API: Metered Billing: Get variables

# meteredGetVariables

Get metered billing components available for product in HostBill.

# Required parameters

Parameter Description
product_id HostBill account ID

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=meteredGetVariables&product_id=PRODUCT_ID

# PHP Samples

# Response

{
    "success": true,
    "variables": [
        {
            "id": "4",
            "product_id": "10",
            "name": "Domains",
            "variable_name": "powerdnspanel",
            "unit_name": "domain(s)",
            "cycle": "Monthly",
            "scheme": "tiered",
            "options": "0",
            "prices": [
                {
                    "id": "308",
                    "variable_id": "4",
                    "qty": "0",
                    "qty_max": "2",
                    "price": "5.0000"
                },
                {
                    "id": "309",
                    "variable_id": "4",
                    "qty": "2",
                    "qty_max": "3",
                    "price": "4.0000"
                },
                {
                    "id": "310",
                    "variable_id": "4",
                    "qty": "3",
                    "qty_max": "6",
                    "price": "3.0000"
                },
                {
                    "id": "311",
                    "variable_id": "4",
                    "qty": "6",
                    "qty_max": "0",
                    "price": "1.0000"
                }
            ]
        }
    ],
    "call": "meteredGetVariables",
    "server_time": 1323788816
}
Last Updated: 10/7/2024, 2:36:43 PM