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

# Count the transactions of a selection

> The number of transactions a bulk delete with the same `transaction_ids` or `select_all` body would act on,
for a confirmation such as "1,238 transactions will be deleted". Use it instead of the list's pagination
`total`, which belongs to a page that may be out of date.



## OpenAPI

````yaml /api-referansi/openapi.json post /v1/bank-accounts/{accountId}/transactions/bulk-count
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/bank-accounts/{accountId}/transactions/bulk-count:
    post:
      tags:
        - AccountTransaction
      summary: Count the transactions of a selection
      description: >-
        The number of transactions a bulk delete with the same `transaction_ids`
        or `select_all` body would act on,

        for a confirmation such as "1,238 transactions will be deleted". Use it
        instead of the list's pagination

        `total`, which belongs to a page that may be out of date.
      operationId: accountTransaction.bulkCount
      parameters:
        - name: accountId
          in: path
          required: true
          description: The bank account identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountTransactionBulkCountRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      count:
                        type: integer
                    required:
                      - count
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    AccountTransactionBulkCountRequest:
      type: object
      description: >-
        The selection of a bulk delete: the ticked `transaction_ids`, or
        `select_all` with the list's

        filters in `filters` (the parameters of `GET
        /bank-accounts/{accountId}/transactions`).
      properties:
        transaction_ids:
          type: array
          description: >-
            The identifiers of the selected records. Send either these or
            `select_all`.
          items:
            type: integer
            minimum: 1
          minItems: 1
          maxItems: 100
        select_all:
          type: boolean
          description: >-
            Select every record the list shows with the filters in `filters`.
            The action then runs in the background and the response only carries
            the number of records.
        filters:
          type:
            - object
            - 'null'
          description: >-
            With `select_all`, the filters the list shows, as an object: the
            query parameters of `GET
            /api/v1/bank-accounts/{accountId}/transactions` with the same names
            and values, array parameters without the `[]`. Paging and sorting
            parameters are ignored.
          properties:
            search:
              type:
                - string
                - 'null'
              description: The search query.
              maxLength: 255
            type:
              anyOf:
                - $ref: '#/components/schemas/AccountTransactionType'
                  description: Filter by transaction type.
                - type: 'null'
            payment_method:
              anyOf:
                - $ref: '#/components/schemas/PaymentMethod'
                  description: Filter by payment method.
                - type: 'null'
            currency_id:
              type:
                - integer
                - 'null'
              description: Filter by currency ID.
            transaction_date_from:
              type:
                - string
                - 'null'
              format: date-time
              description: Filter records on or after this transaction date (YYYY-MM-DD).
            transaction_date_to:
              type:
                - string
                - 'null'
              format: date-time
              description: Filter records on or before this transaction date (YYYY-MM-DD).
        except_ids:
          type:
            - array
            - 'null'
          description: >-
            With `select_all`, the identifiers of the records to leave out, at
            most 1000.
          items:
            type: integer
            description: A record identifier to leave out.
            minimum: 1
          maxItems: 1000
      title: AccountTransactionBulkCountRequest
    AccountTransactionType:
      type: string
      enum:
        - collection
        - payment
        - transfer
        - bank_commission
        - opening_balance
      title: AccountTransactionType
    PaymentMethod:
      type: string
      enum:
        - bank_account
        - cash
        - transfer_cash
        - other
        - clinic_credit_card
        - credit_card
        - private_insurance
        - sgk
      title: PaymentMethod
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.flextell.ai/oauth/authorize
          tokenUrl: https://app.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

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