List Billing
List Billing
GET
https://api.ocamba.com/v2/ocamba/usage
Retrieves Billing detailsQuery parameters
parametersPath parameters
parametersResponse schemas
›
200
application/json
curl -X GET \
"https://api.ocamba.com/v2/ocamba/usage" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v2/ocamba/usage';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v2/ocamba/usage");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
200 OK
{
"total": 3,
"items": [
{
"id": "1971",
"company_id": "6197120",
"app_id": "1001",
"items": [
{
"name": "adex requests",
"quantity": 5938,
"unit_price": 0,
"price": 0,
"discount_rate": 0,
"discount": 0,
"tax_rate": 20,
"tax": 0,
"amount": 0,
"description": "Adex Requests",
"unit": 1
}
],
"currency_code": "USD",
"limit_status": "0",
"usage_percent": 0.59,
"start_time": "2021-11-01T00:00:00Z",
"end_time": "2021-11-30T00:00:00Z"
},
{
"id": "1969",
"company_id": "6197120",
"app_id": "1007",
"items": [
{
"name": "enterprise",
"quantity": 1,
"unit_price": 1,
"price": 1,
"discount_rate": 0,
"discount": 0,
"tax_rate": 20,
"tax": 0.2,
"amount": 1.2,
"description": "Ocamba MST Enterprise Plan (Annually)",
"unit": 1
}
],
"price": 1,
"amount": 1.2,
"currency_code": "USD",
"limit_status": "0",
"start_time": "2021-10-30T00:00:00Z",
"end_time": "2021-11-29T00:00:00Z"
},
{
"id": "1982",
"company_id": "6197120",
"app_id": "1003",
"items": [
{
"name": "subscribers",
"quantity": 98985,
"unit_price": 0,
"price": 0,
"discount_rate": 0,
"discount": 0,
"tax_rate": 20,
"tax": 0,
"amount": 0,
"description": "Subscribers included in plan",
"unit": 1
}
],
"currency_code": "USD",
"limit_status": "0",
"usage_percent": 100,
"start_time": "2021-11-10T00:00:00Z",
"end_time": "2021-12-09T00:00:00Z"
}
]
}
Responses
Tip
Searchable field is items.
Sortable fields are: price, discount, amount, currency_code, limit_status, usage_percent, start_date, end_date, create_time and update_time.