> ## 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 All Invoices

> Get All Invoices



## OpenAPI

````yaml /api-reference/openapi.json get /v1/invoices
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/invoices:
    get:
      tags:
        - Invoices
      summary: Get All Invoices
      description: Get All Invoices
      operationId: getAllInvoices
      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: 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: 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: invoiceStatuses
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      Includes invoice statuses. Comma separated list of invoice
                      statuses eg: DRAFT,SENT,PAID,OVERDUE,CANCELLED
                description: >-
                  Includes invoice statuses. Comma separated list of invoice
                  statuses eg: DRAFT,SENT,PAID,OVERDUE,CANCELLED
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      enum:
                        - DRAFT
                        - SENT
                        - PAID
                        - OVERDUE
                        - CANCELLED
      responses:
        '200':
          description: Get All Invoices 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:
                      invoices:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              type: string
                              description: The id of the invoice
                            projectId:
                              type: string
                              description: The id of the project
                            status:
                              type: string
                              enum:
                                - DRAFT
                                - SENT
                                - PAID
                                - OVERDUE
                                - CANCELLED
                              description: The status of the invoice
                            invoiceId:
                              type: string
                              description: The number of the invoice eg. 0001, 0002, etc.
                            purchaseOrderId:
                              type: string
                              nullable: true
                              description: The id of the purchase order
                            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
                                otherEmails:
                                  type: array
                                  items:
                                    type: string
                                    format: email
                                  nullable: true
                                  description: The other emails of the counterparty
                                address:
                                  type: object
                                  properties:
                                    city:
                                      type: string
                                      nullable: true
                                    country:
                                      type: string
                                      nullable: true
                                    state:
                                      type: string
                                      nullable: true
                                    cca2:
                                      type: string
                                      nullable: true
                                    line1:
                                      type: string
                                      nullable: true
                                    line2:
                                      type: string
                                      nullable: true
                                    postalCode:
                                      type: string
                                      nullable: true
                                  additionalProperties: false
                                  nullable: true
                                  description: The address of the counterparty
                              required:
                                - _id
                              additionalProperties: false
                              nullable: true
                              description: The counterparty of the invoice
                            discount:
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - PERCENTAGE
                                    - FIXED
                                value:
                                  type: number
                              required:
                                - type
                                - value
                              additionalProperties: false
                              description: >-
                                Global discount, after applying the line item
                                discounts
                            amount:
                              type: number
                              description: The amount of the invoice
                            convertedAmount:
                              type: number
                              nullable: true
                              description: The converted amount of the invoice
                            convertedCurrency:
                              type: string
                              nullable: true
                              description: The converted currency of the invoice
                            sendDate:
                              type: string
                              format: date-time
                              nullable: true
                              description: The date of the sending
                            sendBy:
                              type: string
                              nullable: true
                              description: The user who sent the invoice
                            invoiceDate:
                              type: string
                              format: date-time
                              description: The date of the invoice
                            dueDate:
                              type: string
                              format: date-time
                              description: The date of the due date
                            currency:
                              type: string
                              description: The currency of the invoice
                            lineItems:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  description:
                                    type: string
                                  quantity:
                                    type: number
                                  unitPrice:
                                    type: number
                                  tax:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - PERCENTAGE
                                          - FIXED
                                      value:
                                        type: number
                                    required:
                                      - type
                                      - value
                                    additionalProperties: false
                                  discount:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - PERCENTAGE
                                          - FIXED
                                      value:
                                        type: number
                                    required:
                                      - type
                                      - value
                                    additionalProperties: false
                                required:
                                  - id
                                  - name
                                  - quantity
                                  - unitPrice
                                  - tax
                                  - discount
                                additionalProperties: false
                              description: The line items of the invoice
                            note:
                              type: string
                              description: The notes of the invoice
                            calculated:
                              type: object
                              properties:
                                grandTotal:
                                  type: number
                                  description: The grand total of the invoice
                                tax:
                                  type: number
                                  description: The tax of the invoice
                                discount:
                                  type: number
                                  description: The discount of the invoice
                                subTotal:
                                  type: number
                                  description: The sub total of the invoice
                              required:
                                - grandTotal
                                - tax
                                - discount
                                - subTotal
                              additionalProperties: false
                            cancellationReason:
                              type: string
                              nullable: true
                              description: The reason of the cancellation
                            cancellationDate:
                              type: string
                              format: date-time
                              nullable: true
                              description: The date of the cancellation
                            cancellationBy:
                              type: string
                              nullable: true
                              description: The user who cancelled the invoice
                            paidMarkedBy:
                              type: string
                              nullable: true
                              description: The user who marked the invoice as paid
                            paidMarkedDate:
                              type: string
                              format: date-time
                              nullable: true
                              description: The date of the payment
                            attachedTransactionId:
                              type: string
                              nullable: true
                              description: >-
                                The id of the transaction attached to the
                                invoice
                            attachments:
                              type: array
                              items:
                                type: string
                              description: The attachments of the invoice
                            payViaStripeAccountConnectionId:
                              type: string
                              pattern: ^[0-9A-Fa-f]{24}$
                              description: >-
                                The id of the pay via stripe account connection.
                                Expected to be a valid object id like
                                666666666666666666666666
                              nullable: true
                            createdAt:
                              type: string
                              format: date-time
                              description: The date of the creation
                            updatedAt:
                              type: string
                              format: date-time
                              description: The date of the last update
                          required:
                            - _id
                            - projectId
                            - status
                            - invoiceId
                            - discount
                            - amount
                            - invoiceDate
                            - dueDate
                            - currency
                            - lineItems
                            - note
                            - calculated
                            - attachments
                            - createdAt
                            - updatedAt
                          additionalProperties: false
                        description: The invoices
                      count:
                        type: number
                        description: The count of the invoices
                    required:
                      - invoices
                      - 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.

````