Bulk usage/metered data upload
POST/api/v3/usage/_action/bulk
ChargeOver also has a dedicated bulk endpoint to push usage to. You can upload a maximum number of 1000 usage records per REST API call.
In addition to line_item_id
, ChargeOver also supports sending usage data using the customer.external_key
and line_item.item_external_key
fields.
Request
- application/json
Body
Line Item ID that the usage is for
Usage value
Usage type (default "add", other options are "add", "max", "lat", "pia", "pas", "dlt")
An array of usage options
Starting date/time for the usage period
Ending date/time for the usage period
External key value
Custom field 1
Custom field 2
Custom field 3
Custom field 4
Custom field 5
Custom field 6
Custom field 7
Custom field 8
Custom field 9
Custom field 10
Custom field 11
Custom field 12
Custom field 13
Custom field 14
Custom field 15
Custom field 16
Custom field 17
Custom field 18
Custom field 19
Custom field 20
Responses
- 201
- 400
- 401
Object was created successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
response
object
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": {
"id": 0
}
}
{
"code": 201,
"status": "OK",
"message": "",
"details": {},
"response": {
"id": 1234
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}