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

# Retrieve a usage event.



## OpenAPI

````yaml /openapi/ledgerup-engine.json get /v2/events/{event_id}
openapi: 3.1.0
info:
  title: LedgerUp API
  version: 0.1.0
  description: OpenAPI contract for the LedgerUp API.
servers: []
security: []
tags:
  - name: Health
  - name: Customers
  - name: Accounts
  - name: Grants
  - name: Currencies
    description: Currencies discovered from reported usage events.
  - name: Metrics
  - name: Refill Configurations
    description: Automatic balance refill thresholds and targets for an account and metric.
  - name: Events
    description: >-
      Individual usage events reported against an account and either a metric or
      currency.
  - name: Test
    description: Endpoints for test environment maintenance.
  - name: Products
    x-group: Billing
    description: Sellable catalog objects. Products can map to Stripe products.
  - name: Prices
    x-group: Billing
    description: >-
      Simple commercial terms for a product. Contract lines can reference a
      price or a rate card, but not both.
  - name: Rate Cards
    x-group: Billing
    description: Reusable rating policies that convert engine facts into billable amounts.
  - name: Contracts
    x-group: Billing
    description: >-
      Subscription-like commercial agreements. Contracts own contract lines and
      cancellation state.
  - name: Invoice Preview
    x-group: Billing
    description: Read-only preview of LedgerUp invoice lines before any Stripe write.
paths:
  /v2/events/{event_id}:
    get:
      tags:
        - Events
      summary: Retrieve a usage event.
      operationId: getEvent
      parameters:
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            description: LedgerUp event identifier.
            example: event_0194f4e3a2b77c6aa91c4f6b4db2a980
            pattern: ^event_[0-9a-f]{32}$
          description: Resource identifier.
      responses:
        '200':
          description: Resource found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '400':
          $ref: '#/components/responses/BadRequestText'
        '401':
          $ref: '#/components/responses/UnauthorizedText'
        '403':
          $ref: '#/components/responses/ForbiddenText'
        '404':
          $ref: '#/components/responses/NotFoundText'
        '408':
          $ref: '#/components/responses/RequestTimeoutText'
        '429':
          $ref: '#/components/responses/RateLimitedText'
        '500':
          $ref: '#/components/responses/InternalServerErrorText'
      security:
        - LedgerUpApiKey: []
components:
  schemas:
    Event:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: LedgerUp event identifier.
          example: event_0194f4e3a2b77c6aa91c4f6b4db2a980
          pattern: ^event_[0-9a-f]{32}$
        metric_id:
          type: string
          description: >-
            LedgerUp metric identifier, or the lowercase three-letter currency
            code for currency usage events.
          example: metric_0194f4e3a2b77c6aa91c4f6b4db2a980
          pattern: ^(metric_[0-9a-f]{32}|[a-z]{3})$
        currency:
          type:
            - string
            - 'null'
          description: >-
            Three-letter lowercase currency code. Quantity is expressed in major
            currency units, not minor units. Null for metric usage events.
          example: usd
          pattern: ^[a-z]{3}$
        quantity:
          type: string
          description: Decimal quantity serialized as a string.
          example: '1250.5'
          pattern: ^-?\d+(\.\d+)?$
        account_id:
          type: string
          description: LedgerUp account identifier.
          example: account_0194f4e3a2b77c6aa91c4f6b4db2a980
          pattern: ^account_[0-9a-f]{32}$
        occurred_at:
          $ref: '#/components/schemas/UnixTimestamp'
        properties:
          $ref: '#/components/schemas/Properties'
        accepted_at:
          $ref: '#/components/schemas/UnixTimestamp'
        created_at:
          anyOf:
            - $ref: '#/components/schemas/UnixTimestamp'
            - type: 'null'
          description: >-
            ClickHouse insertion timestamp. Null in the initial 202 response
            while the event is queued.
      required:
        - id
        - metric_id
        - currency
        - quantity
        - account_id
        - occurred_at
        - properties
        - accepted_at
        - created_at
    UnixTimestamp:
      type: integer
      format: int64
      description: Unix timestamp in seconds.
      example: 1767225600
    Properties:
      description: >-
        Arbitrary JSON object or value. If omitted on write endpoints, the
        service stores an empty object.
      default: {}
  responses:
    BadRequestText:
      description: >-
        Bad request, invalid header, invalid amount/quantity/currency, or text
        validation failure.
      content:
        text/plain:
          schema:
            type: string
    UnauthorizedText:
      description: Missing or invalid API key.
      content:
        text/plain:
          schema:
            type: string
            example: Invalid API key
    ForbiddenText:
      description: >-
        API key lacks the required permission, or reset was attempted outside
        the test namespace.
      content:
        text/plain:
          schema:
            type: string
    NotFoundText:
      description: Referenced or requested resource was not found.
      content:
        text/plain:
          schema:
            type: string
            example: not found
    RequestTimeoutText:
      description: Request exceeded the 30 second timeout.
      content:
        text/plain:
          schema:
            type: string
    RateLimitedText:
      description: Rate limit exceeded.
      content:
        text/plain:
          schema:
            type: string
            example: rate limit exceeded
    InternalServerErrorText:
      description: Internal server error or queue failure.
      content:
        text/plain:
          schema:
            type: string
  securitySchemes:
    LedgerUpApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: LedgerUp API Key.
      x-displayName: LedgerUp API Key

````