---
updatedAt: 2025-02-20T00:12:57.000Z
agentTools:
  projectIndex: https://developers.credrails.com/llms.txt
---

# /v1alpha2/analyseAccountStatementAndDownload

Analyse an account statement from a supported Financial Service Provider (FSP) and return the result as a PDF file.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/v1alpha2/analyseAccountStatementAndDownload": {
      "post": {
        "operationId": "AppControllerV1alpha2_analyseAccountStatementAndDownload",
        "summary": "",
        "description": "Analyse an account statement from a supported Financial Service Provider (FSP) and return the result as a PDF file.",
        "parameters": [
          {
            "name": "view",
            "required": false,
            "in": "query",
            "description": "Output statement view type. Defaults to `detailed`.",
            "schema": {
              "enum": [
                "detailed",
                "summary"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AccountStatementAnalysisRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Credrails categorized statement.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Buffer"
                }
              }
            }
          }
        },
        "tags": [
          "accountStatements v1alpha2"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Categorization Service API",
    "description": "Performs categorical analysis on financial data.",
    "version": "1.0",
    "contact": {}
  },
  "servers": [],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "schemas": {
      "AccountStatementAnalysisRequestDto": {
        "type": "object",
        "properties": {
          "fspId": {
            "type": "string",
            "enum": [
              "mpesa",
              "accessbank",
              "firstbankng",
              "gtbank",
              "uba",
              "zenithbank",
              "equitybank",
              "stanchartbank",
              "absabank",
              "coopbank",
              "kcbbank",
              "wemabank",
              "familybank"
            ]
          },
          "data": {
            "type": "string",
            "format": "binary"
          },
          "analysisType": {
            "type": "string",
            "description": "Account statement analysis type. Defaults to `individual`.",
            "enum": [
              "business",
              "individual",
              "merchant"
            ],
            "default": "individual"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "fspId",
          "data",
          "analysisType"
        ]
      },
      "Buffer": {
        "type": "object",
        "properties": {}
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```