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

# Retrieve Authorizer Balance History

> Retrieve balance check history for a specific authorizer

# Retrieve Authorizer Balance History

Retrieve the balance check history for a specific authorizer. Returns a list of recent balance results in reverse chronological order (most recent first).

## Use Cases

* Review historical balance data for an authorizer
* Debug failed balance checks
* Analyze balance trends over time

## Response Fields

| Field                  | Description                                                |
| ---------------------- | ---------------------------------------------------------- |
| `authorizer_unique_id` | The authorizer identifier                                  |
| `total_count`          | Total number of history records for this authorizer        |
| `history`              | Array of history entries (see below)                       |
| `next_page_token`      | Token for fetching the next page (null if no more results) |
| `has_more`             | Whether more results are available                         |

Each history entry contains:

| Field            | Description                            |
| ---------------- | -------------------------------------- |
| `run_at`         | When the balance check was performed   |
| `batch_id`       | The associated batch request ID        |
| `balance_amount` | The balance retrieved (null if failed) |
| `status`         | `success` or `failed`                  |
| `error_message`  | Error details if the check failed      |

## Pagination

Use the `limit` query parameter to control how many results are returned:

* Default: 10 entries
* Maximum: 100 entries

To fetch additional pages, pass the `next_page_token` from a previous response as the `next_page_token` query parameter. Continue fetching until `has_more` is `false` or `next_page_token` is null.


## OpenAPI

````yaml GET /v1/monitoring/authorizers/{id}/history
openapi: 3.1.0
info:
  title: Rightfoot API
  description: >-
    Submit a batch of authorizers for balance checks, retrieve processed
    balances, and check the status of a batch.
  version: 0.3.0-alpha
servers:
  - url: https://api.rightfoot.com
security:
  - BearerAuth: []
tags:
  - name: General Availability
    description: |
      **General Availability** indicates that the endpoint is production-ready.
  - name: Early Access
    description: >
      **Early Access** indicates that the endpoint is available for early access
      customers and is being actively refined.
  - name: In Development
    description: >
      **In Development** indicates that the endpoint is currently being built
      and will be available in an upcoming release.
paths:
  /v1/monitoring/authorizers/{id}/history:
    get:
      tags:
        - General Availability
      summary: Get authorizer balance history
      description: >
        Retrieve the balance check history for a specific authorizer. Returns a
        list of recent balance results in reverse chronological order.
      operationId: get_authorizer_history
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The authorizer_unique_id to retrieve history for.
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: >-
            The maximum number of history entries to return. Default is 10,
            maximum is 100.
        - in: query
          name: next_page_token
          schema:
            type: string
          description: >-
            A cursor token for pagination. Pass the `next_page_token` from a
            previous response to fetch the next page of results.
      responses:
        '200':
          description: Authorizer history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizerHistoryResponse'
              example:
                authorizer_unique_id: 1a2b3c4d
                total_count: 250
                history:
                  - run_at: '2024-12-12T02:30:00Z'
                    batch_id: BATCH-98765
                    balance_amount: 1523.47
                    status: success
                    error_message: null
                  - run_at: '2024-12-05T02:30:00Z'
                    batch_id: BATCH-98764
                    balance_amount: 892.31
                    status: success
                    error_message: null
                  - run_at: '2024-11-28T02:30:00Z'
                    batch_id: BATCH-98763
                    balance_amount: null
                    status: failed
                    error_message: Institution not supported
                next_page_token: eyJjdXJzb3IiOiA1MDAsICJ0b3RhbF9yb3dzX3JldHVybmVkIjogMjB9
                has_more: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                status: error
                status_code: 404
                error:
                  code: NOT_FOUND
                  message: Authorizer with the provided ID does not exist.
                  timestamp: '2024-12-12T12:00:00Z'
                  suggestion: Please check the authorizer unique ID.
                documentation_url: https://api.rightfoot.com/docs
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    AuthorizerHistoryResponse:
      type: object
      properties:
        authorizer_unique_id:
          type: string
          description: The unique identifier for the authorizer.
        total_count:
          type: integer
          description: Total number of history records for this authorizer.
        history:
          type: array
          description: >-
            List of balance check history entries in reverse chronological
            order.
          items:
            $ref: '#/components/schemas/AuthorizerHistoryRecord'
        next_page_token:
          type: string
          nullable: true
          description: >-
            Token for fetching the next page of results. Null if no more
            results.
        has_more:
          type: boolean
          description: Indicates whether more results are available beyond this page.
      required:
        - authorizer_unique_id
        - total_count
        - history
        - has_more
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Status of the error, either "error" or "success"
        status_code:
          type: integer
          description: HTTP status code of the error
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code (e.g., "RESOURCE_NOT_FOUND")
            message:
              type: string
              description: Detailed error message.
            details:
              type: string
              description: Additional details about the error
            timestamp:
              type: string
              format: date-time
              description: Time the error occurred
            suggestion:
              type: string
              description: Suggested action to resolve the error
        documentation_url:
          type: string
          format: uri
          description: URL to the documentation for the error
    AuthorizerHistoryRecord:
      type: object
      properties:
        run_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the balance check was performed.
        batch_id:
          type: string
          description: The associated batch request ID.
        balance_amount:
          type: number
          format: float
          nullable: true
          description: The balance amount retrieved. Null if the check failed.
        status:
          type: string
          enum:
            - success
            - failed
          description: Status of the balance check.
        error_message:
          type: string
          nullable: true
          description: Error message if the check failed. Null on success.
      required:
        - run_at
        - batch_id
        - status
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: error
            status_code: 401
            error:
              code: UNAUTHORIZED
              message: Invalid API key provided.
              timestamp: '2024-09-16T12:01:00Z'
              suggestion: Please check your API key.
            documentation_url: https://api.rightfoot.com/docs
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: error
            status_code: 500
            error:
              code: INTERNAL_SERVER_ERROR
              message: An unexpected error occurred while retrieving the balances.
              timestamp: '2024-09-16T12:11:00Z'
              suggestion: >-
                Please try again later. If the problem persists, contact our
                support team.
            documentation_url: https://api.rightfoot.com/docs
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        Authentication to the API is performed via Bearer Token Authentication.
        Provide your API key as the bearer token in the Authorization header.


        All API requests must be made over HTTPS. Calls made over plain HTTP
        will fail. API requests without authentication will also fail.

````