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

# Get Transactions

> Get Transactions



## OpenAPI

````yaml /api-reference/openapi.json get /v1/transactions
openapi: 3.0.3
info:
  title: Bookeeping.ai API
  version: 1.0.0
  description: API for accessing and managing bookkeeping.ai data.
servers:
  - url: https://api.bookeeping.ai/public-api
    description: USA Virginia Region
  - url: https://ca-api.bookeeping.ai/public-api
    description: Canada Toronto Region
  - url: https://eu-api.bookeeping.ai/public-api
    description: EU Belgium Region
security:
  - BearerAuth: []
paths:
  /v1/transactions:
    get:
      tags:
        - Transactions
      summary: Get Transactions
      description: Get Transactions
      operationId: getTransactions
      parameters:
        - name: page
          in: query
          required: false
          description: The page number 1 - n
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: The number of items per page. Max is 250. Default is 10.
          schema:
            type: string
        - name: sortKey
          in: query
          required: false
          description: The key to sort the items by. Default is _id.
          schema:
            type: string
            enum:
              - _id
              - name
              - createdAt
              - updatedAt
              - transactionDate
        - name: sortOrder
          in: query
          required: false
          description: >-
            The order to sort the items by. Default is 1. -1 for descending. 1
            for ascending.
          schema:
            type: string
            enum:
              - '1'
              - '-1'
        - name: counterparties
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Includes counterparties ids. Comma separated list of
                      object ids eg:
                      666666666666666666666666,666666666666666666666666
                description: >-
                  Includes counterparties ids. Comma separated list of object
                  ids eg: 666666666666666666666666,666666666666666666666666
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      pattern: ^[0-9A-Fa-f]{24}$
        - name: accounts
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Includes accounts ids. Comma separated list of object ids
                      eg: 666666666666666666666666,666666666666666666666666
                description: >-
                  Includes accounts ids. Comma separated list of object ids eg:
                  666666666666666666666666,666666666666666666666666
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      pattern: ^[0-9A-Fa-f]{24}$
        - name: categories
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Includes categories ids. Comma separated list of object
                      ids eg: 666666666666666666666666,666666666666666666666666
                description: >-
                  Includes categories ids. Comma separated list of object ids
                  eg: 666666666666666666666666,666666666666666666666666
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      pattern: ^[0-9A-Fa-f]{24}$
        - name: classes
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Includes classes ids. Comma separated list of object ids
                      eg: 666666666666666666666666,666666666666666666666666
                description: >-
                  Includes classes ids. Comma separated list of object ids eg:
                  666666666666666666666666,666666666666666666666666
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      pattern: ^[0-9A-Fa-f]{24}$
        - name: minAmount
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Minimum amount. Expected to be a number string (Int or
                      Float) eg: 1000,1000.5
                description: >-
                  Minimum amount. Expected to be a number string (Int or Float)
                  eg: 1000,1000.5
              - anyOf:
                  - not: {}
                  - type: number
        - name: maxAmount
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Maximum amount. Expected to be a number string (Int or
                      Float) eg: 1000,1000.5
                description: >-
                  Maximum amount. Expected to be a number string (Int or Float)
                  eg: 1000,1000.5
              - anyOf:
                  - not: {}
                  - type: number
        - name: startDate
          in: query
          required: false
          description: Start date in ISO format
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          required: false
          description: End date in ISO format
          schema:
            type: string
            format: date-time
        - name: mainCategories
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      The accounts to filter the categories by.. Comma separated
                      list of level two categories eg:
                      INCOME,OTHER_INCOME,SALES,EXPENSE,DEPRECIATION,COST_OF_GOODS_SOLD,OTHER_EXPENSE,OVERHEAD,CURRENT_ASSET,FIXED_ASSET,INVENTORY,NON_CURRENT_ASSET,PREPAYMENT,LIABILITY,CURRENT_LIABILITY,NON_CURRENT_LIABILITY,TAX_PAYABLE,TAX,EQUITY
                description: >-
                  The accounts to filter the categories by.. Comma separated
                  list of level two categories eg:
                  INCOME,OTHER_INCOME,SALES,EXPENSE,DEPRECIATION,COST_OF_GOODS_SOLD,OTHER_EXPENSE,OVERHEAD,CURRENT_ASSET,FIXED_ASSET,INVENTORY,NON_CURRENT_ASSET,PREPAYMENT,LIABILITY,CURRENT_LIABILITY,NON_CURRENT_LIABILITY,TAX_PAYABLE,TAX,EQUITY
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      enum:
                        - INCOME
                        - OTHER_INCOME
                        - SALES
                        - EXPENSE
                        - DEPRECIATION
                        - COST_OF_GOODS_SOLD
                        - OTHER_EXPENSE
                        - OVERHEAD
                        - CURRENT_ASSET
                        - FIXED_ASSET
                        - INVENTORY
                        - NON_CURRENT_ASSET
                        - PREPAYMENT
                        - LIABILITY
                        - CURRENT_LIABILITY
                        - NON_CURRENT_LIABILITY
                        - TAX_PAYABLE
                        - TAX
                        - EQUITY
                        - OTHER
        - name: ne_categories
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Excludes categories id, only valid it categories is not
                      present. Comma separated list of object ids eg:
                      666666666666666666666666,666666666666666666666666
                description: >-
                  Excludes categories id, only valid it categories is not
                  present. Comma separated list of object ids eg:
                  666666666666666666666666,666666666666666666666666
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      pattern: ^[0-9A-Fa-f]{24}$
        - name: ne_mainCategories
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Excludes main categories ids, only valid if main
                      categories is not present. Comma separated list of level
                      two categories eg:
                      INCOME,OTHER_INCOME,SALES,EXPENSE,DEPRECIATION,COST_OF_GOODS_SOLD,OTHER_EXPENSE,OVERHEAD,CURRENT_ASSET,FIXED_ASSET,INVENTORY,NON_CURRENT_ASSET,PREPAYMENT,LIABILITY,CURRENT_LIABILITY,NON_CURRENT_LIABILITY,TAX_PAYABLE,TAX,EQUITY
                description: >-
                  Excludes main categories ids, only valid if main categories is
                  not present. Comma separated list of level two categories eg:
                  INCOME,OTHER_INCOME,SALES,EXPENSE,DEPRECIATION,COST_OF_GOODS_SOLD,OTHER_EXPENSE,OVERHEAD,CURRENT_ASSET,FIXED_ASSET,INVENTORY,NON_CURRENT_ASSET,PREPAYMENT,LIABILITY,CURRENT_LIABILITY,NON_CURRENT_LIABILITY,TAX_PAYABLE,TAX,EQUITY
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      enum:
                        - INCOME
                        - OTHER_INCOME
                        - SALES
                        - EXPENSE
                        - DEPRECIATION
                        - COST_OF_GOODS_SOLD
                        - OTHER_EXPENSE
                        - OVERHEAD
                        - CURRENT_ASSET
                        - FIXED_ASSET
                        - INVENTORY
                        - NON_CURRENT_ASSET
                        - PREPAYMENT
                        - LIABILITY
                        - CURRENT_LIABILITY
                        - NON_CURRENT_LIABILITY
                        - TAX_PAYABLE
                        - TAX
                        - EQUITY
                        - OTHER
      responses:
        '200':
          description: Get Transactions executed successfully
          headers:
            x-rate-limiter-daily-limit:
              description: Maximum number of requests allowed per day
              schema:
                type: integer
                example: 1500
            x-rate-limiter-minutely-limit:
              description: Maximum number of requests allowed per minute
              schema:
                type: integer
                example: 25
            x-rate-limiter-daily-usage:
              description: Number of requests made today
              schema:
                type: integer
                example: 106
            x-rate-limiter-minutely-usage:
              description: Number of requests made in the current minute
              schema:
                type: integer
                example: 1
            x-rate-limiter-operation-type:
              description: Operation type. Either read or write.
              schema:
                type: string
                enum:
                  - read
                  - write
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
                  metaData:
                    type: object
                    properties:
                      warnings:
                        type: array
                        items:
                          type: string
                        description: Any validation warnings
                  data:
                    type: object
                    properties:
                      transactions:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              type: string
                              description: The id of the transaction
                            projectId:
                              type: string
                              description: The project id of the transaction
                            refNo:
                              type: string
                              nullable: true
                              description: The reference number of the transaction
                            currency:
                              type: string
                              description: The currency of the transaction
                            totalAmount:
                              type: number
                              description: >-
                                The total amount of the transaction. Same as the
                                sum of the Total Credit = Total Debit.
                            transactionDate:
                              type: string
                              format: date-time
                              description: The transaction date of the transaction
                            paymentMethod:
                              type: string
                              enum:
                                - CASH
                                - CHEQUE
                                - NEFT
                                - IMPS
                                - UPI
                                - CARD
                                - TRANSFER
                                - OTHER
                              description: The payment method of the transaction
                            source:
                              type: string
                              enum:
                                - BANK
                                - CSV
                                - MANUAL
                                - STRIPE
                                - INVOICE_BILL
                                - QUICKBOOKS_IMPORT
                                - AIRBNB
                                - API_HOOK
                                - SHOPIFY
                                - OTHER
                              description: The source of the transaction
                            originalAmount:
                              type: number
                              nullable: true
                              description: The original amount of the transaction
                            originalCurrency:
                              type: string
                              nullable: true
                              description: The original currency of the transaction
                            isReconciled:
                              type: boolean
                              description: The reconciliation status of the transaction
                            nonProfitAllocations:
                              type: array
                              items:
                                type: object
                                properties:
                                  program:
                                    type: object
                                    properties:
                                      _id:
                                        type: string
                                        description: The id of the program
                                      name:
                                        type: string
                                        description: The name of the program
                                      status:
                                        type: string
                                        enum:
                                          - PLANNING
                                          - ACTIVE
                                          - COMPLETED
                                          - CANCELLED
                                        description: The status of the program
                                      hexColor:
                                        type: string
                                        nullable: true
                                        description: The hex color of the program
                                      createdAt:
                                        type: string
                                        format: date-time
                                        description: The created at of the program
                                      updatedAt:
                                        type: string
                                        format: date-time
                                        description: The updated at of the program
                                    required:
                                      - _id
                                      - name
                                      - status
                                      - createdAt
                                      - updatedAt
                                    additionalProperties: false
                                    nullable: true
                                    description: The program of the non profit allocation
                                  grant:
                                    type: object
                                    properties:
                                      _id:
                                        type: string
                                        description: The id of the grant
                                      name:
                                        type: string
                                        description: The name of the grant
                                      status:
                                        type: string
                                        enum:
                                          - ACTIVE
                                          - COMPLETED
                                          - CANCELLED
                                        description: The status of the grant
                                      hexColor:
                                        type: string
                                        nullable: true
                                        description: The hex color of the grant
                                      funders:
                                        type: array
                                        items:
                                          type: string
                                        nullable: true
                                        description: >-
                                          The funders of the grant, typically
                                          counterparty ids
                                      createdAt:
                                        type: string
                                        format: date-time
                                        description: The created at of the grant
                                      updatedAt:
                                        type: string
                                        format: date-time
                                        description: The updated at of the grant
                                    required:
                                      - _id
                                      - name
                                      - status
                                      - createdAt
                                      - updatedAt
                                    additionalProperties: false
                                    nullable: true
                                    description: The grant of the non profit allocation
                                  percentage:
                                    type: number
                                    description: >-
                                      The percentage of the non profit
                                      allocation
                                  note:
                                    type: string
                                    nullable: true
                                    description: The note of the non profit allocation
                                required:
                                  - percentage
                                additionalProperties: false
                              description: The non profit allocations of the transaction
                            counterParty:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  description: The id of the counterparty
                                accountName:
                                  type: string
                                  nullable: true
                                  description: The account name of the counterparty
                                accountNumber:
                                  type: string
                                  nullable: true
                                  description: The account number of the counterparty
                                email:
                                  type: string
                                  format: email
                                  nullable: true
                                  description: The email of the counterparty
                                phone:
                                  type: string
                                  nullable: true
                                  description: The phone of the counterparty
                                type:
                                  type: string
                                  enum:
                                    - customer
                                    - vendor
                                    - both
                                  nullable: true
                                  description: The type of the counterparty
                              required:
                                - _id
                              additionalProperties: false
                              nullable: true
                              description: The counter party of the transaction
                            account:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  description: The id of the account
                                accountName:
                                  type: string
                                  nullable: true
                                  description: The account name of the account
                                accountNumber:
                                  type: string
                                  nullable: true
                                  description: The account number of the account
                                accountType:
                                  type: string
                                  enum:
                                    - Depository
                                    - Credit
                                    - Loan
                                    - Investment
                                    - Other
                                  description: The type of the account
                              required:
                                - _id
                                - accountType
                              additionalProperties: false
                              nullable: true
                              description: The account of the transaction
                            entries:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: The id of the entry
                                  amount:
                                    type: number
                                    minimum: 0
                                    description: The amount of the entry
                                  type:
                                    type: string
                                    enum:
                                      - DEBIT
                                      - CREDIT
                                    description: The type of the entry
                                  parentCategory:
                                    type: string
                                    enum:
                                      - INCOME
                                      - OTHER_INCOME
                                      - SALES
                                      - EXPENSE
                                      - DEPRECIATION
                                      - COST_OF_GOODS_SOLD
                                      - OTHER_EXPENSE
                                      - OVERHEAD
                                      - CURRENT_ASSET
                                      - FIXED_ASSET
                                      - INVENTORY
                                      - NON_CURRENT_ASSET
                                      - PREPAYMENT
                                      - LIABILITY
                                      - CURRENT_LIABILITY
                                      - NON_CURRENT_LIABILITY
                                      - TAX_PAYABLE
                                      - TAX
                                      - EQUITY
                                      - OTHER
                                    nullable: true
                                    description: The parent category of the entry
                                  category:
                                    type: object
                                    properties:
                                      _id:
                                        type: string
                                        description: The id of the category
                                      name:
                                        type: string
                                        description: The name of the category
                                      emoji:
                                        type: string
                                        nullable: true
                                        description: The emoji of the category
                                      parentCategory:
                                        type: string
                                        enum:
                                          - INCOME
                                          - OTHER_INCOME
                                          - SALES
                                          - EXPENSE
                                          - DEPRECIATION
                                          - COST_OF_GOODS_SOLD
                                          - OTHER_EXPENSE
                                          - OVERHEAD
                                          - CURRENT_ASSET
                                          - FIXED_ASSET
                                          - INVENTORY
                                          - NON_CURRENT_ASSET
                                          - PREPAYMENT
                                          - LIABILITY
                                          - CURRENT_LIABILITY
                                          - NON_CURRENT_LIABILITY
                                          - TAX_PAYABLE
                                          - TAX
                                          - EQUITY
                                          - OTHER
                                        nullable: true
                                        description: The parent category of the category
                                      number:
                                        type: string
                                        nullable: true
                                        description: The number of the category
                                      group:
                                        type: string
                                        nullable: true
                                        description: The group of the category
                                    required:
                                      - _id
                                      - name
                                    additionalProperties: false
                                    nullable: true
                                    description: The category of the entry
                                  isMain:
                                    type: boolean
                                    nullable: true
                                    description: The main status of the entry
                                  note:
                                    type: string
                                    nullable: true
                                    description: The note of the entry
                                required:
                                  - id
                                  - amount
                                  - type
                                additionalProperties: false
                              description: The entries of the transaction
                            classes:
                              type: array
                              items:
                                type: object
                                properties:
                                  _id:
                                    type: string
                                    description: The id of the class
                                  name:
                                    type: string
                                    description: The name of the class
                                  description:
                                    type: string
                                    nullable: true
                                    description: The description of the class
                                  emoji:
                                    type: string
                                    nullable: true
                                    description: The emoji of the class
                                  color:
                                    type: string
                                    nullable: true
                                    description: The color of the class
                                required:
                                  - _id
                                  - name
                                additionalProperties: false
                              description: The classes of the transaction
                            attachmentsIds:
                              type: array
                              items:
                                type: string
                              description: The attachments ids of the transaction
                            nonProfitGrantId:
                              type: string
                              nullable: true
                              description: Non profit grant source transaction id
                            attachedTransactionId:
                              type: string
                              nullable: true
                              description: Attached transaction id
                            createdAt:
                              type: string
                              format: date-time
                              description: The created at of the transaction
                            updatedAt:
                              type: string
                              format: date-time
                              description: The updated at of the transaction
                          required:
                            - _id
                            - projectId
                            - currency
                            - totalAmount
                            - transactionDate
                            - paymentMethod
                            - source
                            - isReconciled
                            - nonProfitAllocations
                            - entries
                            - classes
                            - attachmentsIds
                            - createdAt
                            - updatedAt
                          additionalProperties: false
                        description: The transactions
                      count:
                        type: number
                        description: The count of the transactions
                    required:
                      - transactions
                      - count
                    additionalProperties: false
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - BadRequestError
                  message:
                    type: string
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - UnauthorizedError
                  message:
                    type: string
        '409':
          description: Conflict - Resource already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - ConflictError
                  message:
                    type: string
        '429':
          description: >-
            Too Many Requests - Rate limit exceeded. Either daily or minutely
            limit exceeded. If you have any questions, please contact
            support@bookeeping.ai.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - TooManyRequestsError
                  message:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key for authentication. Get your key from the Dashboard > Settings >
        API Access.

````