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

# Get unattributed usage

> Retrieve a customer's usage that no subscription bills. When subscriptions of the customer
pricing a metric set a usage filter, events matching none of the filters are billed by a
subscription without one; when every such subscription has a filter, those events are kept
and reported here instead of being billed.



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json get /api/v1/usage/customer/{customer_id}/unattributed
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Proprietary
    identifier: LicenseRef-Proprietary
  version: 0.1.0
servers: []
security: []
tags:
  - name: Meteroid
    description: Meteroid API
  - name: Add-ons
  - name: Batch Jobs
  - name: Budgets
    description: >-
      Beta: may change before general availability. Spending limits on a
      customer's usage, or one subscription's, per currency, with alerts at
      percentages of the amount.
    x-beta: true
  - name: Checkout Sessions
  - name: Checks
    description: >-
      Beta: may change before general availability. Whether a customer may
      consume more of a feature right now.
    x-beta: true
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Credit units
    description: >-
      Custom denominations, such as "credits", that usage can be priced in and
      credit granted or sold in, instead of money.
  - name: Credits
    description: >-
      Prepaid credit: a customer's wallets, credit grants, ledger and top-ups.
      Promotional credit applies before tax like a discount; paid credit applies
      after tax like a payment.
  - name: Custom Properties
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - name: Licenses
    description: >-
      Licenses for your customers' self-hosted installations: signed tokens
      carrying their plan's entitlements, activated and refreshed by the
      installation over the public licensing endpoints.
  - name: Metrics
  - name: OAuth
    description: OAuth 2.0 token endpoints (public, client-credentials auth)
  - name: OAuth Apps
    description: Manage OAuth applications for Connect integrations
  - name: Plans
  - name: Product Families
  - name: Products
  - name: Subscriptions
  - name: Usage
  - name: Usage costs
    description: >-
      Beta: may change before general availability. A customer's or a
      subscription's usage events and usage over time, with what they cost.
    x-beta: true
  - name: Webhook Endpoints
    description: Manage outbound webhook endpoints and inspect their deliveries
paths:
  /api/v1/usage/customer/{customer_id}/unattributed:
    get:
      tags:
        - Usage
      summary: Get unattributed usage
      description: >-
        Retrieve a customer's usage that no subscription bills. When
        subscriptions of the customer

        pricing a metric set a usage filter, events matching none of the filters
        are billed by a

        subscription without one; when every such subscription has a filter,
        those events are kept

        and reported here instead of being billed.
      operationId: get_unattributed_usage
      parameters:
        - name: customer_id
          in: path
          description: Customer ID or alias
          required: true
          schema:
            type: string
        - name: start_date
          in: query
          description: >-
            First day of the range. Defaults to the first day of the current
            month (UTC).
          required: false
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          description: >-
            Day after the range (exclusive). Defaults to the first day of the
            next month.
          required: false
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Unattributed usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnattributedUsageResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    UnattributedUsageResponse:
      type: object
      required:
        - period_start
        - period_end
        - usage
      properties:
        period_end:
          type: string
          format: date
        period_start:
          type: string
          format: date
        usage:
          type: array
          items:
            $ref: '#/components/schemas/UnattributedMetricUsage'
    RestErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    UnattributedMetricUsage:
      type: object
      description: >-
        A metric's usage over `[from, until)` that no subscription bills: it
        matches none of the

        usage filters of the subscriptions pricing the metric, and none of them
        bills without one.
      required:
        - metric_id
        - metric_name
        - metric_code
        - from
        - until
        - total_value
      properties:
        from:
          type: string
          format: date-time
        metric_code:
          type: string
        metric_id:
          $ref: '#/components/schemas/BillableMetricId'
        metric_name:
          type: string
        total_value:
          type: string
          format: decimal
        until:
          type: string
          format: date-time
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - TOKEN_EXPIRED
        - TOO_MANY_REQUESTS
        - INTERNAL_SERVER_ERROR
    BillableMetricId:
      type: string
      format: MeteroidId
      examples:
        - bm_7n42DGM5Tflk9n8mt7Fhc7
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.