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

# Release a Transaction's Reservations

> Use this endpoint to release every reservation a transaction holds in a single call, addressing them by the ledger `transactionId` — phase two of the two-phase reservation flow. The response reports how many reservations were transitioned in `flipped`. A `flipped` value of `0` is a valid, idempotent success — the transaction held no open reservations.



## OpenAPI

````yaml en/openapi/v3-current/tracer.yaml post /v1/reservations/transaction/{transaction_id}/release
openapi: 3.1.0
info:
  title: Tracer API
  description: >-
    Complete API reference for Tracer services including transaction validation,
    rules management, spending limits, and audit events for SOX/GLBA compliance.
  version: 1.0.1
servers:
  - url: https://tracer.sandbox.lerian.net
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Health API
    description: >-
      Health check endpoints for liveness and readiness probes. These endpoints
      do not require authentication.
  - name: Validations API
    description: >-
      Transaction validation endpoints. Performance target is under 80ms (p99).
      Validations are idempotent by `requestId` — a duplicate request returns
      the cached result with HTTP 200, while a new request returns HTTP 201. No
      idempotency header is required.
  - name: Rules API
    description: >-
      Validation rule management endpoints. Rules use CEL (Common Expression
      Language) expressions.
  - name: Limits API
    description: >-
      Spending limit management endpoints. Limits control transaction amounts by
      scope and period.
  - name: Reservations API
    description: >-
      Two-phase transaction-capacity reservation endpoints. A reserve holds
      capacity against spending limits; a confirm commits it and a release
      returns it. Confirm and release are idempotent.
  - name: Audit Events API
    description: >-
      Audit trail endpoints for SOX/GLBA compliance. All validation decisions
      and configuration changes are recorded.
paths:
  /v1/reservations/transaction/{transaction_id}/release:
    post:
      tags:
        - Reservations API
      summary: Release a Transaction's Reservations
      description: >-
        Use this endpoint to release every reservation a transaction holds in a
        single call, addressing them by the ledger `transactionId` — phase two
        of the two-phase reservation flow. The response reports how many
        reservations were transitioned in `flipped`. A `flipped` value of `0` is
        a valid, idempotent success — the transaction held no open reservations.
      operationId: releaseReservationByTransaction
      parameters:
        - $ref: '#/components/parameters/TransactionId'
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/XApiKey'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          description: Indicates that the transaction's reservations were released.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionActionResponse'
              example:
                transactionId: 019c96a0-1071-7a0d-9916-a831221de252
                status: RELEASED
                flipped: 2
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0007:
                  $ref: '#/components/examples/Error0007'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorUnauthenticated:
                  $ref: '#/components/examples/ErrorUnauthenticated'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0004:
                  $ref: '#/components/examples/Error0004'
components:
  parameters:
    TransactionId:
      name: transaction_id
      in: path
      description: >-
        The ledger transaction correlation ID whose reservations you want to
        confirm or release.
      required: true
      example: 019c96a0-1071-7a0d-9916-a831221de252
      schema:
        type: string
        format: uuid
    ContentType:
      name: Content-Type
      in: header
      description: The type of media of the resource. Must be `application/json`.
      required: true
      example: application/json
      schema:
        type: string
    XApiKey:
      name: X-API-Key
      in: header
      description: >-
        The API Key for authentication. **This header is required for all
        endpoints except health checks**.
      required: true
      schema:
        type: string
    XRequestId:
      name: X-Request-Id
      in: header
      description: A unique identifier used to trace and track each request.
      required: false
      example: 019c96a0-10ce-75fc-a273-dc799079a99c
      schema:
        type: string
        format: uuid
  schemas:
    TransactionActionResponse:
      type: object
      description: Body returned by the by-transaction confirm and release endpoints.
      required:
        - transactionId
        - status
        - flipped
      properties:
        transactionId:
          type: string
          format: uuid
          description: The ledger transaction whose reservations were transitioned.
        status:
          type: string
          enum:
            - CONFIRMED
            - RELEASED
          description: The terminal state the reservations resolved to.
        flipped:
          type: integer
          description: >-
            How many reservations were transitioned. A value of 0 is a valid,
            idempotent no-op — the transaction held no open reservations.
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
        fields:
          type: object
          additionalProperties: true
          description: Additional information about the fields that caused the error.
  examples:
    Error0007:
      summary: Invalid Path Parameter
      value:
        code: TRC-0007
        title: Invalid Path Parameter
        message: >-
          The provided ID is not a valid UUID format. Please verify the ID and
          try again.
    ErrorUnauthenticated:
      summary: Unauthorized
      value:
        code: Unauthenticated
        title: Unauthorized
        message: >-
          API Key missing or invalid. Provide a valid API Key in the X-API-Key
          header.
    Error0004:
      summary: Internal Server Error
      value:
        code: TRC-0004
        title: Internal Server Error
        message: >-
          An unexpected error occurred. Please try again later or contact
          support if the issue persists.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API Key authentication. Used by single-tenant deployments
        (`MULTI_TENANT_ENABLED=false`). Sent on every `/v1/*` request.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer authentication. Used by multi-tenant deployments
        (`MULTI_TENANT_ENABLED=true`). The JWT is issued by Access Manager and
        must carry the `tenantId` claim — Tracer resolves the tenant from the
        token, not from any header or body field.

````