POST
/
cost
/
roi
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>"
}'
{
  "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

x-api-key
string
header
required

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.