customers

Retrieve customer current and projected usage

Changed on

This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.

get/customers/{external_customer_id}/projected_usage

Request

Path parameters

external_customer_idstring required
Example:5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba

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

Query parameters

external_subscription_idstring required
Example:sub_1234567890

The unique identifier of the subscription within your application.

apply_taxesboolean
Example:true

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

charge_idstring uuid
Example:1a901a90-1a90-1a90-1a90-1a901a901a90

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

charge_codestring
Example:storage

Filter usage to a specific charge by its code.

billable_metric_codestring
Example:storage

Filter usage to a specific billable metric by its code.

groupobject

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

{
  "cloud": "aws"
}
filter_by_presentationstring
Example:["engineering", "operations"]

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

    • info

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

    • info

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

    • info

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

    • info

      added the required property //// to the response with 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

    • breaking

      the response property /////// became nullable for the status

    • breaking

      the response property /////// became nullable for the status

    • warning

      added the new SYP enum value to the /// response property for the response status

    • warning

      added the new SYP enum value to the / response property for the response status

    • warning

      added the new TND enum value to the /// response property for the response status

    • warning

      added the new TND enum value to the / response property for the response status

    • warning

      added the new dynamic enum value to the //// response property for the response status

    • warning

      added the new graduated_percentage enum value to the //// response property for the response status

    • info

      added the new optional query request parameter billable_metric_code

    • info

      added the new optional query request parameter charge_code

    • info

      added the new optional query request parameter charge_id

    • info

      added the new optional query request parameter filter_by_presentation

    • info

      added the new optional query request parameter group

    • 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

      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