POST
https://app.amberflo.io/payments/cost/usage-query
Retrieves detailed usage costs, revenue, and profit analysis for your account.
This endpoint provides a comprehensive view of your billing metrics over time, combining both revenue generated from usage and associated costs.
Use this endpoint to:
- Analyze profitability by customer, product, or custom dimensions
- Track revenue trends and cost drivers over time
- Generate financial reports with granular time breakdowns
- Monitor usage patterns and their financial impact
The response includes three key components: usage revenue (what customers are billed), usage costs (your costs to deliver the service), and usage profit (revenue minus costs).
Results can be filtered by multiple dimensions and grouped by time intervals ranging from seconds to years.
Important Note: Time ranges are automatically expanded to include complete time intervals based on your specified granularity.
bodyobjectInput parameters for usage cost calculation request specifying product scope, time range, and aggregation preferences.
200Successfully retrieved usage costs, revenue and profit analysis
400Invalid request parameters such as malformed time range or invalid filters
401Authentication required or invalid API key
403Insufficient permissions to access billing analysis data
404Requested product or customer not found
500Internal server error occurred while processing the analysis
curl --request POST \
--url https://app.amberflo.io/payments/cost/usage-query \
--header 'accept: application/json'