Query for usage/metered data
GET/api/v3/usage
Available query parameter values for filtering:
line_item_id
- associated subscription lineexternal_key
- external key for usage/metered data pointfrom
- from dateto
- to date
Request
Query Parameters
where string
line_item_id:EQUALS:581
order string
line_item_id:ASC
limit string
2
offset string
8
Responses
- 200
- 400
- 401
Object was fetched successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response object
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": {}
}
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": [
{
"usage_history_id": 14,
"external_key": null,
"usage_value": 1,
"custom_1": "test",
"custom_2": "test2",
"custom_3": null,
"custom_4": null,
"custom_5": null,
"custom_6": null,
"custom_7": null,
"custom_8": null,
"custom_9": null,
"custom_10": null,
"custom_11": null,
"custom_12": null,
"custom_13": null,
"custom_14": null,
"custom_15": null,
"custom_16": null,
"custom_17": null,
"custom_18": null,
"custom_19": null,
"custom_20": null,
"line_item_id": 581,
"from": "2024-05-04 00:00:00",
"to": "2024-05-04 00:00:00"
},
{
"usage_history_id": 15,
"external_key": null,
"usage_value": 3,
"custom_1": "test",
"custom_2": "test2",
"custom_3": null,
"custom_4": null,
"custom_5": null,
"custom_6": null,
"custom_7": null,
"custom_8": null,
"custom_9": null,
"custom_10": null,
"custom_11": null,
"custom_12": null,
"custom_13": null,
"custom_14": null,
"custom_15": null,
"custom_16": null,
"custom_17": null,
"custom_18": null,
"custom_19": null,
"custom_20": null,
"line_item_id": 629,
"from": "2024-05-05 00:00:00",
"to": "2024-05-05 00:00:00"
}
]
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"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 integer
status string
message stringnullable
details objectnullable
response boolean
{
"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
}
Loading...