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

# Get Event Reserves

> Returns reserve information for all transaction categories on an event.

Each category includes:
- `reserves`: Current reserve amount (null if category doesn't support reserves)
- `owed`: Total amount owed
- `paid`: Total amount paid
- `expectedTotal`: Expected total amount

**All amounts are in cents.**

**Required permission:** `company.payment:read`




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/external/companies/{companyId}/events/{eventId}/financials/reserves
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://app.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/external/companies/{companyId}/events/{eventId}/financials/reserves:
    get:
      tags:
        - Event Financials
      summary: Get Event Reserves
      description: >
        Returns reserve information for all transaction categories on an event.


        Each category includes:

        - `reserves`: Current reserve amount (null if category doesn't support
        reserves)

        - `owed`: Total amount owed

        - `paid`: Total amount paid

        - `expectedTotal`: Expected total amount


        **All amounts are in cents.**


        **Required permission:** `company.payment:read`
      operationId: getEventReserves
      parameters:
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/eventId'
      responses:
        '200':
          description: Reserve information for all categories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventReserve'
              examples:
                withReserves:
                  summary: Event with reserves
                  value:
                    - categoryId: indemnity_invoice
                      reserves: 1000000
                      owed: 200000
                      paid: 500000
                      expectedTotal: 1500000
                    - categoryId: alae_invoice
                      reserves: 100000
                      owed: 75000
                      paid: 0
                      expectedTotal: 200000
                noReserves:
                  summary: Categories without reserves
                  value:
                    - categoryId: indemnity_invoice
                      reserves: null
                      owed: 0
                      paid: 0
                      expectedTotal: 0
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                eventNotFound:
                  summary: Event not found
                  value:
                    error:
                      code: NOT_FOUND
                      message: Event not found
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
    eventId:
      name: eventId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Event identifier
  schemas:
    EventReserve:
      type: object
      description: Reserve information for a transaction category on an event
      properties:
        categoryId:
          type: string
          description: Transaction category identifier
        reserves:
          type: integer
          nullable: true
          description: Reserve amount in cents (null if category doesn't support reserves)
        owed:
          type: integer
          description: Total owed amount in cents
        paid:
          type: integer
          description: Total paid amount in cents
        expectedTotal:
          type: integer
          description: Expected total amount in cents
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: Authorization header is required
            bearerTokenNotAllowed:
              summary: Bearer token used instead of API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: External API endpoints require API key authentication
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientPermissions:
              summary: Insufficient permissions
              value:
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: INTERNAL_ERROR
                  message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````