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

# Read a reservation

> Reports a reservation's current state, what it covers, and every close already committed against it.

`closes` exists for one recovery: a client that has lost its `Idempotency-Key` and cannot reproduce the events it sent can read what already landed, instead of resending and burning twice. This is a read and cannot settle anything. An unknown or foreign token returns `404`, indistinguishably.



## OpenAPI

````yaml /api-reference/specs/2026-04-01.json get /credits/reservations/{reservation_id}
openapi: 3.1.0
info:
  description: >-
    Alguna is the AI-native quote-to-revenue platform for B2B companies: CPQ,
    subscription and usage-based billing, invoicing, payment collection, and
    revenue recognition in one system of record. The API operates on one
    versioned agreement per customer: quotes, subscriptions and their versions,
    usage, invoices, payments, and revenue schedules read from it. Official
    SDKs: TypeScript (@alguna/sdk), Python (alguna), Go
    (github.com/alguna-io/alguna-go), Rust (alguna), and the alguna CLI
    (@alguna/cli).
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
    x-fern-server-name: Production
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Checkout Sessions
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Feedback
  - name: Insights
  - name: Integrations
  - name: Invoices
  - name: Merchants
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Quotes
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Tags
  - name: Tax
  - name: Users
  - name: Wallet Grants
  - name: Wallets
paths:
  /credits/reservations/{reservation_id}:
    get:
      tags:
        - Credits
      summary: Read a reservation
      description: >-
        Reports a reservation's current state, what it covers, and every close
        already committed against it.


        `closes` exists for one recovery: a client that has lost its
        `Idempotency-Key` and cannot reproduce the events it sent can read what
        already landed, instead of resending and burning twice. This is a read
        and cannot settle anything. An unknown or foreign token returns `404`,
        indistinguishably.
      operationId: get-credit-reservation
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: path
          name: reservation_id
          required: true
          schema:
            description: Unique identifier for the reservation
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationStatusResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden — the organization does not have access to this feature
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          description: >-
            Bad Gateway — sent by the infrastructure in front of the API; the
            body is not JSON. Safe to retry.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Service Unavailable — a dependency is temporarily unavailable. Retry
            with backoff.
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Gateway Timeout — the request did not finish in time. Retry with
            backoff; use an idempotency key for writes.
components:
  schemas:
    ReservationStatusResponse:
      properties:
        block_amount:
          description: Credits this reservation fenced when it opened.
          example: '500'
          type: string
        closes:
          description: >-
            Every close already committed, oldest first. This is how a client
            that lost its Idempotency-Key discovers what already landed instead
            of resending and burning twice.
          items:
            $ref: '#/components/schemas/ReservationCloseSummary'
          type: array
        consumed:
          description: >-
            What every close so far priced to: the sum of closes[].used, not of
            closes[].covered. Under on_envelope_exceeded: record a close can
            price past the hold, so this can exceed block_amount — and because
            remaining floors at zero, block_amount − consumed is not a way to
            derive it. Sum closes[].covered instead for what the ledger actually
            burned.
          example: '266'
          type: string
        expires_at:
          description: When the hold expires. Absent once terminal.
          example: '2026-04-01T10:20:00Z'
          format: date-time
          nullable: true
          type: string
        identities:
          description: >-
            The metrics this hold covers — one entry per credit-consuming metric
            its settles price against. A settle's events must carry event names
            these identities count.
          items:
            $ref: '#/components/schemas/ReservationIdentity'
          type: array
        open:
          description: Whether the reservation can still be settled against.
          type: boolean
        remaining:
          description: >-
            Credits still authorised: block_amount − consumed, floored at zero.
            Zero once the reservation is terminal, whatever the arithmetic would
            otherwise allow.
          example: '234'
          type: string
        reservation_id:
          example: crt_abc123
          type: string
        status:
          description: open, capturing, captured, released, expired, or recovery_pending.
          enum:
            - open
            - capturing
            - recovery_pending
            - captured
            - released
            - expired
          example: open
          type: string
      required:
        - block_amount
        - closes
        - consumed
        - identities
        - open
        - remaining
        - reservation_id
        - status
      type: object
    ErrorResponse:
      description: The body of every error the API returns.
      properties:
        code:
          description: >-
            Machine-readable error code, such as `not_found` or
            `invoice_already_issued`. New codes may be added at any time, so
            handle a code you do not know by its HTTP status.
          type: string
        detail:
          description: Explanation of what went wrong
          type: string
        request_id:
          description: >-
            Identifies the request, as the `X-Request-Id` response header does.
            Quote it when contacting support.
          type: string
        status:
          description: HTTP status code of the response
          format: int64
          type: integer
        title:
          description: >-
            HTTP status text. Sent only by version, idempotency and
            credit-refusal errors.
          type: string
        type:
          description: Always `about:blank`. Sent only by version and idempotency errors.
          type: string
      required:
        - status
        - detail
      type: object
    GatewayErrorResponse:
      description: >-
        Returned by the API gateway when a request carries no valid API key,
        before the API handles it.
      properties:
        code:
          description: Machine-readable error code, e.g. `unauthenticated`
          type: string
        details:
          nullable: true
          type: object
        message:
          description: Explanation of what went wrong
          type: string
      required:
        - code
        - message
      type: object
    ReservationCloseSummary:
      properties:
        capture_seq:
          description: >-
            This close's position in the reservation's capture sequence, oldest
            first.
          example: 1
          format: int64
          type: integer
        close_key:
          description: >-
            This close's identity: the Idempotency-Key it was sent under
            (namespaced ik:), or a hash of its events' unique_ids for a keyless
            close (namespaced uids:).
          example: ik:close_run_88f_final
          type: string
        closed:
          description: Whether this close terminated the reservation.
          type: boolean
        covered:
          description: >-
            Credits this close actually burned. Below used whenever the close
            priced past what the hold still had; the difference billed as cash.
          example: '80'
          type: string
        used:
          description: >-
            Credits this close was priced at. This — not covered — is what
            accumulates into the reservation's consumed.
          example: '80'
          type: string
      required:
        - capture_seq
        - close_key
        - closed
        - covered
        - used
      type: object
    ReservationIdentity:
      properties:
        event_name:
          description: The usage event that metric counts.
          example: inference_call
          type: string
        metric_id:
          description: A billable metric this hold's settles price against.
          example: mtr_tokens
          type: string
      required:
        - event_name
        - metric_id
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http
      x-fern-bearer:
        env: ALGUNA_API_KEY
        name: apiKey

````

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