# API: Metered Billing: Add usage

# meteredAddUsage

Add usage for metered billing variable

# Required parameters

Parameter Description
account_id HostBill account ID that usage is being added
variable Name of variable that usage of is being added. I.e: bandwidth
qty Quantity of usage to record

# Optional parameters

Parameter Description
output Comment, additional information about current usage
rawoutput Additional comments, raw data output to use in custom scripts
charge Amount to charge for usage - if not present HostBill will calculate it automatically, using related variable scheme
date_created Date (PHP format: Y-m-d H:i:s) when entry was added, default is current date
date_updated Date (PHP format: Y-m-d H:i:s) when entry was added, needs to be set if date_created is and match it

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=meteredAddUsage&account_id=ACCOUNT_ID&variable=VARIABLE&qty=QTY

# PHP Samples

# Response

{
    "success": true,
    "usage_id": "109",
    "call": "meteredAddUsage",
    "server_time": 1323788439
}
Last Updated: 10/7/2024, 2:36:43 PM