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

# List flagged bank statements

> List the latest amber or red alteration flag for each live bank statement.



## OpenAPI

````yaml https://app.herondata.io/swagger get /api/end_user_files/alteration_flags
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/end_user_files/alteration_flags:
    get:
      tags:
        - EndUserFiles
      summary: List flagged bank statements
      description: >-
        List the latest amber or red alteration flag for each live bank
        statement.
      parameters:
        - description: Include flags created on or after this date
          in: query
          name: since
          required: false
          schema:
            format: date
            nullable: true
            type: string
        - description: Include flags from this many calendar months ago
          in: query
          name: months
          required: false
          schema:
            enum:
              - 1
              - 3
              - 6
              - 12
              - null
            nullable: true
            type: integer
        - description: Risk filters. Repeat the parameter to include both risks.
          explode: true
          in: query
          name: risk
          required: false
          schema:
            items:
              enum:
                - red
                - amber
              type: string
            type: array
          style: form
        - description: Filter by deal name
          in: query
          name: search
          required: false
          schema:
            nullable: true
            type: string
        - in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 200
            minimum: 1
            type: integer
        - description: next_cursor of the previous page
          in: query
          name: cursor
          required: false
          schema:
            nullable: true
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  _meta:
                    properties:
                      next_cursor:
                        nullable: true
                        type: string
                      per_page:
                        type: integer
                      total:
                        description: >-
                          Matching flags, capped at 10,000. Counted on the first
                          page only.
                        nullable: true
                        type: integer
                      total_capped:
                        description: >-
                          True when total hit the 10,000 cap. Null after the
                          first page.
                        nullable: true
                        type: boolean
                    type: object
                  flags:
                    items:
                      $ref: '#/components/schemas/AlterationFlagSchema'
                    type: array
                type: object
          description: OK
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AlterationFlagSchema:
      properties:
        bank_name:
          nullable: true
          type: string
        end_user_file_heron_id:
          type: string
        end_user_heron_id:
          type: string
        end_user_name:
          nullable: true
          type: string
        filename:
          nullable: true
          type: string
        flagged_at:
          format: date-time
          type: string
        label:
          type: string
        risk:
          enum:
            - red
            - amber
          type: string
        statement_periods:
          items:
            $ref: '#/components/schemas/AlterationFlagStatementPeriod'
          type: array
        uploaded_at:
          format: date-time
          type: string
        why:
          type: string
      required:
        - bank_name
        - end_user_file_heron_id
        - end_user_heron_id
        - end_user_name
        - filename
        - flagged_at
        - label
        - risk
        - statement_periods
        - uploaded_at
        - why
      type: object
    AlterationFlagStatementPeriod:
      properties:
        end:
          nullable: true
          type: string
        start:
          nullable: true
          type: string
      required:
        - end
        - start
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````

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