Retrieve customer current usage
Changed onThis endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
Request
- Base URLhttps://api.getlago.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The customer external unique identifier (provided by your own application).
Query parameters
The unique identifier of the subscription within your application.
Optional flag to determine if taxes should be applied. Defaults to true if not provided or if null.
Filter usage to a specific charge by its Lago ID (UUID). Replaces deprecated filter_by_charge_id.
Filter usage to a specific charge by its code. Replaces deprecated filter_by_charge_code.
Filter usage to a specific billable metric by its code.
Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. group[cloud]=aws. Replaces deprecated filter_by_group.
{
"cloud": "aws"
}Deprecated. Filter usage to a specific charge by its Lago ID (UUID).
Deprecated. Filter usage to a specific charge by its code.
Deprecated. Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. filter_by_group[cloud]=aws.
{
"cloud": "aws"
}When true, returns usage since the subscription started instead of the current billing period. It requires the granular lifetime usage add-on, at least one of charge_id, charge_code, billable_metric_code or group (or their deprecated filter_by_* equivalents), and a subscription without prorated charges. The request returns 405 when one of these conditions is not met.
Filter presentation_breakdowns by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable presentation_breakdowns entirely.
Response
Customer usage
Changes
- breaking
the response property
/////became nullable for the status - breaking
the response property
/////became nullable for the status - breaking
the response property
///////became nullable for the status - breaking
the response property
///////became nullable for the status - warning
added the new
SYPenum value to the///response property for the response status - warning
added the new
SYPenum value to the/response property for the response status - warning
added the new
TNDenum value to the///response property for the response status - warning
added the new
TNDenum value to the/response property for the response status - warning
added the new
dynamicenum value to the////response property for the response status - warning
added the new
graduated_percentageenum value to the////response property for the response status - info
added the non-success response with the status
- info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
///////became required for the status - info
the response property
///////became required for the status - info
the response property
///////became required for the status - info
the response property
///////became required for the status - info
the response property
///////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/////became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
added the required property
////to the response with the status
- breaking