OpenMeter Customers

List customer charges

Changed on

List customer charges.

Returns the customer's charges that are represented as either flat fee or usage-based charges.

get/openmeter/customers/{customerId}/charges

Request

  • Base URL: http://localhost:8888/api/v3
  • URL: http://localhost:8888/api/v3/openmeter/customers/{customerId}/charges
  • Auth: none declared

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Query parameters

sizeinteger

The number of items to include per page.

numberinteger

The page number.

Determines which page of the collection to retrieve.

sortstring

The asc suffix is optional as the default sort order is ascending. The desc suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').

Example:created_at desc

Sort charges returned in the response.

Supported sort attributes are:

  • id
  • created_at
  • service_period.from
  • billing_period.from

Filter charges.

To filter charges by status add the following query param: filter[status][oeq]=created,active

To filter charges by feature, use filter[feature_id][oeq]=<id>,<id> or filter[feature_key][oeq]=<key>,<key>.

See the service_period_from filter field for expressing a service-period window query.

{
  "feature_id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "service_period_from": "2023-01-01T01:01:01.001Z",
  "service_period_to": "2023-01-01T01:01:01.001Z"
}
expandBillingChargesExpand[]

Expand full objects for referenced entities.

Supported values are:

  • real_time_usage: Expand the charge's real-time usage; it sets the usage and the totals.realtime fields.
  • customer: Expand the charge's customer to the complete entity.
  • feature: Expand the charge's feature to the complete entity.
  • subscription: Expand the charge's subscription to the complete entity.
  • realization.invoice: Expand each realization's invoice to the complete entity.
  • realization.totals: Expand each realization run's totals.
  • realization.detailed_lines: Expand each realization run's detailed_lines.

Response

Page paginated response.

Changes

    • info

      added to the ///////////////////// response property allOf list for the response status

    • info

      added to the ///////////////////// response property allOf list for the response status

    • info

      removed from the ///////////////////// response property allOf list for the response status

    • info

      removed from the ///////////////////// response property allOf list for the response status

    • info

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

    • info

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

    • info

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

    • info

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

    • info

      added to the ///////////// response property allOf list for the response status

    • info

      added to the ///////////// response property allOf list for the response status

    • info

      removed from the ///////////// response property allOf list for the response status

    • info

      removed from the ///////////// response property allOf list for the response status