curl --request POST \
--url https://api.cloud.flexprice.io/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>"
}'
{
"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
}
Calculate ROI (Return on Investment) for a given cost sheet
curl --request POST \
--url https://api.cloud.flexprice.io/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>"
}'
{
"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
}
Enter your API key in the format x-api-key <api-key>*
ROI calculation request
The body is of type object
.
OK
The response is of type object
.