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

# Usage history



## OpenAPI

````yaml GET /api/v1/subscriptions/{subscription_id}/usage/history
openapi: 3.1.0
info:
  title: Paypulse
  description: Subscription billing platform with Nomba payment integration
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/subscriptions/{subscription_id}/usage/history:
    get:
      tags:
        - subscriptions
      summary: Get Usage History
      operationId: >-
        get_usage_history_api_v1_subscriptions__subscription_id__usage_history_get
      parameters:
        - name: subscription_id
          in: path
          required: true
          schema:
            type: string
            title: Subscription Id
        - name: from_dt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: From Dt
        - name: to_dt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: To Dt
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UsageRecordResponse'
                title: >-
                  Response Get Usage History Api V1 Subscriptions  Subscription
                  Id  Usage History Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UsageRecordResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        subscription_id:
          type: string
          format: uuid
          title: Subscription Id
        quantity:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Quantity
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        idempotency_key:
          type: string
          title: Idempotency Key
        billed:
          type: boolean
          title: Billed
        billed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Billed At
        invoice_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Invoice Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - subscription_id
        - quantity
        - description
        - idempotency_key
        - billed
        - billed_at
        - invoice_id
        - timestamp
        - created_at
      title: UsageRecordResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````