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

# List customer credit pools

> This endpoint allows fetching the credit pools associated with a customer.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/credit-pools/by-customer
openapi: 3.1.0
info:
  title: API Reference
  version: '1.0'
  description: Aira API Reference
  x-logo:
    url: https://static.useaira.com/images/airalogo.svg
    backgroundColor: '#FFFFFF'
    altText: Aira Logo
servers:
  - url: https://api.useaira.com
    description: API base URL
security:
  - ApiKey: []
paths:
  /v1/credit-pools/by-customer:
    get:
      tags:
        - Credit Pools
      summary: List customer credit pools
      description: >-
        This endpoint allows fetching the credit pools associated with a
        customer.
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: customerId
          required: true
          description: The unique identifier of the customer.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      description: >-
                        Schema representing a credit pool with its top up
                        settings.
                      properties:
                        id:
                          type: string
                          format: uuid
                        customerId:
                          type: string
                          format: uuid
                        currencyUnitId:
                          type: string
                          format: uuid
                        startDate:
                          type: string
                          format: date
                        renewalCreditAmount:
                          type: string
                          pattern: ^\d+(\.\d{1,6})?$
                        availableAmount:
                          type: string
                          pattern: ^\d+(\.\d{1,6})?$
                        scheduleRenewalDate:
                          type: string
                          format: date
                        topUpSettings:
                          type: object
                          description: Schema representing credit pool top up settings.
                          properties:
                            createdBy:
                              type: string
                              format: uuid
                            creditPackageAmount:
                              type: string
                              pattern: ^\d+(\.\d{1,6})?$
                            price:
                              type: number
                              minimum: 1
                          required:
                            - createdBy
                            - creditPackageAmount
                            - price
                          additionalProperties: false
                        currencyUnit:
                          type: object
                          description: Schema representing a currency unit.
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                            code:
                              type: string
                          required:
                            - id
                            - name
                            - code
                          additionalProperties: false
                      required:
                        - id
                        - customerId
                        - currencyUnitId
                        - startDate
                        - renewalCreditAmount
                        - availableAmount
                        - scheduleRenewalDate
                        - topUpSettings
                        - currencyUnit
                      additionalProperties: false
                    description: A list of items.
                required:
                  - items
                additionalProperties: false
        '404':
          description: Error object returned to the client when a resource is not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A human-readable description of the error
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      description: API Key Authentication.
      name: X-API-KEY
      in: header

````