# API: Metered Billing: Add bulk usage

# meteredAddUsageBulk

Add usage for metered billing variables

# Required parameters

Parameter Description
account_id HostBill account ID that usage is being added
variables[variable][qty] Quantity of usage to record for variable named 'variable'

# Optional parameters

Parameter Description
variables[variable][output] Comment, additional information about current usage
variables[variable][rawoutput] Additional comments, raw data output to use in custom scripts
variables[variable][charge] Amount to charge for usage - if not present HostBill will calculate it automatically, using related variable scheme
variables[variable][date_created] Date (PHP format: Y-m-d H:i:s) when entry was added, default is current date
variables[variable][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=meteredAddUsageBulk&account_id=ACCOUNT_ID&variables%5Bvariable%5D%5Bqty%5D=VARIABLES%5BVARIABLE%5D%5BQTY%5D

# PHP Samples

# Response

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