Skip to main content
GET

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

external_customer_id
string
required

The customer external unique identifier (provided by your own application).

Example:

"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"

Query Parameters

external_subscription_id
string
required

The unique identifier of the subscription within your application.

Example:

"sub_1234567890"

apply_taxes
boolean
default:true

Optional flag to determine if taxes should be applied. Defaults to true if not provided or if null.

Example:

true

charge_id
string<uuid>

Filter usage to a specific charge by its Lago ID (UUID). Replaces deprecated filter_by_charge_id.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

charge_code
string

Filter usage to a specific charge by its code. Replaces deprecated filter_by_charge_code.

Example:

"storage"

billable_metric_code
string

Filter usage to a specific billable metric by its code.

Example:

"storage"

group
object

Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. group[cloud]=aws. Replaces deprecated filter_by_group.

Example:
filter_by_charge_id
string<uuid>

Deprecated. Filter usage to a specific charge by its Lago ID (UUID).

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

filter_by_charge_code
string

Deprecated. Filter usage to a specific charge by its code.

Example:

"storage"

filter_by_group
object

Deprecated. Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. filter_by_group[cloud]=aws.

Example:
full_usage
boolean
default:false

When true, returns usage since subscription start instead of the current billing period. Requires one of charge_id, charge_code, group (or their deprecated filter_by_* equivalents) to be set.

Example:

true

filter_by_presentation
string

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.

Example:

"[\"engineering\", \"operations\"]"

Response

Customer usage

customer_usage
object
required