> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creem.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get consumed units for a customer

> How many units a customer has consumed through this meter in a billing period, alongside the period's boundaries. Without `at`, this is an O(1) read of the current period's projection — the number billing uses. With `at`, the units are replayed from the raw events as of that instant, within the billing period containing it, which is the right call for reconstructing what a customer had consumed at a past moment (an invoice date, a support question).



## OpenAPI

````yaml get /v1/meters/{id}/consumed
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/meters/{id}/consumed:
    get:
      tags:
        - Meters
      summary: Get consumed units for a customer
      description: >-
        How many units a customer has consumed through this meter in a billing
        period, alongside the period's boundaries. Without `at`, this is an O(1)
        read of the current period's projection — the number billing uses. With
        `at`, the units are replayed from the raw events as of that instant,
        within the billing period containing it, which is the right call for
        reconstructing what a customer had consumed at a past moment (an invoice
        date, a support question).
      operationId: getMeterConsumedUnits
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: customer_id
          required: true
          in: query
          description: The customer whose consumption is read
          schema:
            example: cust_abc123
            type: string
        - name: at
          required: false
          in: query
          description: >-
            ISO 8601 instant. When present, the consumption is replayed from the
            raw events as of that point in time, within the billing period that
            contains it. When absent, the current billing period’s projected
            total is returned.
          schema:
            example: '2026-08-15T00:00:00.000Z'
            type: string
      responses:
        '200':
          description: Consumed units for the period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeterConsumedUnitsApiResponseDto'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    MeterConsumedUnitsApiResponseDto:
      type: object
      properties:
        meter_id:
          type: string
          description: Meter ID
          example: mtr_abc123
        customer_id:
          type: string
          description: Customer ID
          example: cust_abc123
        units:
          type: string
          description: Consumed units for the period, as a string for BigInt safety
          example: '1280'
        period_start:
          type: string
          description: Start of the billing period (inclusive, ISO 8601)
        period_end:
          type: string
          description: End of the billing period (exclusive, ISO 8601)
        updated_at:
          type: string
          description: >-
            When the projection was last advanced. Null when no usage has been
            folded into this period yet, and always null for an `at=` reply
            (which is replayed from raw events rather than read from the
            projection).
          nullable: true
        as_of:
          type: string
          description: >-
            The point in time the units were replayed as of. Present only when
            `at=` was supplied.
      required:
        - meter_id
        - customer_id
        - units
        - period_start
        - period_end
        - updated_at
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````