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

# Upload Bank Statement

> Upload a tenant's bank statement as an alternative to connecting a bank
with [Initiate Bank](/api-reference/tenants/initiate-bank).

The statement goes through the same processing as a statement uploaded in
the SKOR platform: it is parsed, stored as the tenant's banking data, and
used for the financial analysis.

**File requirements:**
- One **PDF** file, sent in the `file` field.
- Maximum size: **8 MB**.
- The statement must show the **account holder name** and cover at
  least **3 months** of transactions.

Uploading a new statement replaces the tenant's previous banking data
and starts a new financial analysis.

### Asynchronous Processing

Bank statement processing is an **Asynchronous operation** and can take
a while. The API responds as soon as the statement is received, with
status `PROCESSING`. Reading the statement and the financial analysis
then run in the background.

**Call this endpoint once per statement.** Do not call it again or
retry while the statement is processing: each call starts the
processing again from the beginning and replaces the previous result.
Wait for a webhook below. Upload again only to send a different
statement, for example after a `FINANCIAL_ANALYSIS_FAILURE`.

### Post-Analysis Webhooks

- `FINANCIAL_ANALYSIS_SUCCESS`
  Indicates that banking analysis has completed successfully.

- `FINANCIAL_ANALYSIS_FAILURE`
  Indicates that banking analysis has failed. The payload contains
  `financial_info_errors`:
  - `accountHolderNameNotFound`: the statement does not show the
    account holder name.
  - `statementIsLessThanThreeMonths`: the statement covers less than
    3 months.
  - `accountHolderNameNotFoundAndStatementIsLessThanThreeMonths`: both
    of the above.
  - `bankStatementProcessingError`: the statement could not be read.
  - Other codes come from the financial analysis itself.

  The same error can be read at any time with **Get Tenant** in the
  `financial_info_errors` field of the tenant data. Upload a statement
  that fixes the issue to try again.




## OpenAPI

````yaml /api-reference/openapi.yaml post /tenants/upload-bank-statement/{tenantId}
openapi: 3.1.0
info:
  title: SKOR Modular API
  version: 1.0.0
  description: >
    ## Overview

    This is the SKOR Modular API v1. It provides access to tenant

    workflows, API keys, webhooks, document processing, identity

    verification, banking connectivity, and forensic analysis.


    ## Error Statuses


    The API uses standard HTTP status codes to indicate the success

    or failure of requests. Each error response provides guidance

    to help identify the issue and take corrective action.


    ### Success — `200 OK`

    The request was processed successfully and the expected response

    data is returned.


    ### Validation Error — `400 Bad Request`

    The request is invalid due to missing, malformed, or incorrect

    parameters.


    **Common causes:**

    - Required fields are missing from the request.

    - Invalid data formats or unsupported values are provided.

    - File size or payload limits are exceeded.


    **How to resolve:**

    - Verify all required parameters are present.

    - Ensure the request payload matches the documented schema.

    - Validate data formats and constraints before retrying.


    ### Unauthorized — `401 Unauthorized`

    Authentication failed or the provided token is missing or invalid.


    **Common causes:**

    - The `Authorization` header is missing.

    - An invalid or expired bearer token is provided.


    **How to resolve:**

    - Ensure the token is included in the request as an `Authorization: Bearer
    <token>` header.

    - Verify the token is valid and has not expired.

    - Generate a new token if required.


    ### Not Found — `404 Not Found`

    The requested resource does not exist or is not accessible.


    **Common causes:**

    - An invalid or non-existent resource identifier.

    - The resource has not been created or has been deleted.


    **How to resolve:**

    - Confirm the resource identifier is correct.

    - Ensure the resource exists before accessing it.


    ### Server Error — `500 Internal Server Error`

    An unexpected error occurred on the server while processing the request.


    **How to resolve:**

    - Retry the request after a short delay.

    - If the issue persists, **[contact us](mailto:info@skortorent.com)** with
    relevant request details.


    ### Need Help?

    If you encounter unexpected behavior,

    please **[contact us](mailto:info@skortorent.com)** for assistance.
servers:
  - url: https://api.skortorent.com/api/v1
    description: Live
  - url: https://dev-api.skortorent.com/api/v1
    description: Sandbox
security:
  - BearerAuth: []
paths:
  /tenants/upload-bank-statement/{tenantId}:
    post:
      tags:
        - Tenants
      summary: Upload Bank Statement
      description: >
        Upload a tenant's bank statement as an alternative to connecting a bank

        with [Initiate Bank](/api-reference/tenants/initiate-bank).


        The statement goes through the same processing as a statement uploaded
        in

        the SKOR platform: it is parsed, stored as the tenant's banking data,
        and

        used for the financial analysis.


        **File requirements:**

        - One **PDF** file, sent in the `file` field.

        - Maximum size: **8 MB**.

        - The statement must show the **account holder name** and cover at
          least **3 months** of transactions.

        Uploading a new statement replaces the tenant's previous banking data

        and starts a new financial analysis.


        ### Asynchronous Processing


        Bank statement processing is an **Asynchronous operation** and can take

        a while. The API responds as soon as the statement is received, with

        status `PROCESSING`. Reading the statement and the financial analysis

        then run in the background.


        **Call this endpoint once per statement.** Do not call it again or

        retry while the statement is processing: each call starts the

        processing again from the beginning and replaces the previous result.

        Wait for a webhook below. Upload again only to send a different

        statement, for example after a `FINANCIAL_ANALYSIS_FAILURE`.


        ### Post-Analysis Webhooks


        - `FINANCIAL_ANALYSIS_SUCCESS`
          Indicates that banking analysis has completed successfully.

        - `FINANCIAL_ANALYSIS_FAILURE`
          Indicates that banking analysis has failed. The payload contains
          `financial_info_errors`:
          - `accountHolderNameNotFound`: the statement does not show the
            account holder name.
          - `statementIsLessThanThreeMonths`: the statement covers less than
            3 months.
          - `accountHolderNameNotFoundAndStatementIsLessThanThreeMonths`: both
            of the above.
          - `bankStatementProcessingError`: the statement could not be read.
          - Other codes come from the financial analysis itself.

          The same error can be read at any time with **Get Tenant** in the
          `financial_info_errors` field of the tenant data. Upload a statement
          that fixes the issue to try again.
      parameters:
        - $ref: '#/components/parameters/TenantIdParam'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  contentMediaType: application/pdf
                  description: |
                    The bank statement as a PDF file. Maximum size 8 MB.
      responses:
        '200':
          description: Bank statement received and processing started
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                  - data
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                    example: >-
                      Bank statement received. Financial analysis is running in
                      the background
                  data:
                    type: object
                    required:
                      - status
                    properties:
                      status:
                        type: string
                        enum:
                          - PROCESSING
                        description: >-
                          Wait for a financial analysis webhook. Do not call
                          this endpoint again for the same statement.
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      x-codeSamples:
        - lang: curl
          label: Upload a bank statement
          source: |
            curl --request POST \
              --url https://api.skortorent.com/api/v1/tenants/upload-bank-statement/{tenantId} \
              --header 'Authorization: Bearer <token>' \
              --form 'file=@/path/to/bank-statement.pdf'
components:
  parameters:
    TenantIdParam:
      name: tenantId
      in: path
      required: true
      schema:
        type: string
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        HTTP Bearer Authentication. Generate a shared token via
        `/authenticate/token`, then pass it as `Authorization: Bearer <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.