CostSheets
CreditGrants
Credit Notes
Customers
Wallets
Invoices
Entitlements
Environments
Events
Features
Payments
Plans
Integrations
Subscriptions
Tenants
Users
CostSheets
Calculate ROI for cost sheet
Calculate ROI (Return on Investment) for a given cost sheet
POST
/
cost
/
roi
Copy
curl --request POST \
--url https://api.cloud.flexprice.com/v1/cost/roi \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"meter_id": "<string>",
"period_end": "<string>",
"period_start": "<string>",
"price_id": "<string>",
"subscription_id": "<string>"
}'
Copy
{
"cost": 123,
"cost_breakdown": [
{
"cost": 123,
"meter_id": "<string>",
"meter_name": "<string>",
"usage": 123
}
],
"markup": 123,
"markup_percentage": 123,
"net_margin": 123,
"net_margin_percentage": 123,
"net_revenue": 123,
"revenue": 123
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
application/json
ROI calculation request
The body is of type object
.
Response
200
application/json
OK
The response is of type object
.
Copy
curl --request POST \
--url https://api.cloud.flexprice.com/v1/cost/roi \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"meter_id": "<string>",
"period_end": "<string>",
"period_start": "<string>",
"price_id": "<string>",
"subscription_id": "<string>"
}'
Copy
{
"cost": 123,
"cost_breakdown": [
{
"cost": 123,
"meter_id": "<string>",
"meter_name": "<string>",
"usage": 123
}
],
"markup": 123,
"markup_percentage": 123,
"net_margin": 123,
"net_margin_percentage": 123,
"net_revenue": 123,
"revenue": 123
}
Assistant
Responses are generated using AI and may contain mistakes.