Subscriptions

Get usage by subscription

Changed on

Use when showing usage for a subscription (e.g. in a portal or for overage checks). Supports time range and filters.

post/subscriptions/usage

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/subscriptions/usage
  • Auth
    API key in header x-api-key

Request body

end_timestring date-time
lifetime_usageboolean
start_timestring date-time
subscription_idstring required

Example request

{
  "end_time": "2024-03-20T00:00:00Z",
  "start_time": "2024-03-13T00:00:00Z",
  "subscription_id": "123"
}

Response

OK

amountnumber
commitment_amountnumber
commitment_utilizednumber

Amount of commitment used

currencystring
display_amountstring
end_timestring date-time
has_overageboolean

Whether any usage exceeded commitment

overage_amountnumber

Amount charged at overage rate

overage_factornumber
start_timestring date-time

Changes

    • info

      added the optional property /// to the response with the status

    • warning

      added the new not_implemented enum value to the response property for the response status

    • warning

      added the new not_implemented enum value to the response property for the response status