> ## 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.

# Get all invoices



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json get /v1/invoices
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/invoices:
    get:
      tags:
        - Invoice
      summary: Get all invoices
      operationId: invoice.index
      parameters:
        - name: search
          in: query
          description: The search query.
          schema:
            type:
              - string
              - 'null'
            maxLength: 255
        - name: status
          in: query
          description: Filter by status.
          schema:
            type:
              - string
              - 'null'
            enum:
              - draft
              - success
              - sent
              - waiting
              - error
              - cancelled
        - name: is_archived
          in: query
          description: Filter by archived status.
          schema:
            type:
              - boolean
              - 'null'
        - name: is_draft
          in: query
          description: Filter by draft status.
          schema:
            type:
              - boolean
              - 'null'
        - name: is_cancelled
          in: query
          description: Filter by cancelled status.
          schema:
            type:
              - boolean
              - 'null'
        - name: date_from
          in: query
          description: Filter records from this date (inclusive, YYYY-MM-DD).
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: date_to
          in: query
          description: Filter records up to this date (inclusive, YYYY-MM-DD).
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: sort_by
          in: query
          description: The field to sort by.
          schema:
            type:
              - string
              - 'null'
            enum:
              - created_at
              - issue_date
              - document_number
              - amount_payable
        - name: sort_order
          in: query
          description: The sort direction (asc or desc).
          schema:
            type:
              - string
              - 'null'
            enum:
              - asc
              - desc
        - name: per_page
          in: query
          description: The number of items per page.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
            maximum: 100
        - 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
      responses:
        '200':
          description: Paginated set of `InvoiceResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InvoiceResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      last_page:
                        type: integer
                        minimum: 1
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                      total:
                        type: integer
                        description: Total number of items being paginated.
                        minimum: 0
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    InvoiceResource:
      type: object
      properties:
        id:
          type: integer
        document_number:
          type: string
        document_class:
          type: string
        document_type:
          type: string
        profile_id:
          type:
            - string
            - 'null'
        issue_date:
          type: string
          format: date-time
        sent_at:
          type:
            - string
            - 'null'
          format: date-time
        sender_tax_number:
          type:
            - string
            - 'null'
        receiver_name:
          type:
            - string
            - 'null'
        receiver_tax_number:
          type:
            - string
            - 'null'
        receiver_email:
          type:
            - string
            - 'null'
        exchange_rate:
          type: string
        amount_tax_exclusive:
          type:
            - string
            - 'null'
        amount_tax_total:
          type:
            - string
            - 'null'
        amount_payable:
          type: string
        invoice_amount:
          type:
            - string
            - 'null'
        status:
          type: string
        status_label:
          type: string
        is_printed:
          type: boolean
        is_cancelled:
          type: boolean
        is_read:
          type: boolean
        is_draft:
          type: boolean
        is_archived:
          type: boolean
        series_name:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        customer:
          $ref: '#/components/schemas/Customer'
        currency:
          $ref: '#/components/schemas/Currency'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - document_number
        - document_class
        - document_type
        - profile_id
        - issue_date
        - sent_at
        - sender_tax_number
        - receiver_name
        - receiver_tax_number
        - receiver_email
        - exchange_rate
        - amount_tax_exclusive
        - amount_tax_total
        - amount_payable
        - invoice_amount
        - status
        - status_label
        - is_printed
        - is_cancelled
        - is_read
        - is_draft
        - is_archived
        - series_name
        - notes
        - created_at
        - updated_at
      title: InvoiceResource
    Customer:
      type: object
      properties:
        id:
          type: integer
        tenant_id:
          type: integer
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        phone_number:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        date_of_birth:
          type:
            - string
            - 'null'
          format: date-time
        gender:
          anyOf:
            - $ref: '#/components/schemas/Gender'
            - type: 'null'
        country_id:
          type:
            - integer
            - 'null'
        identity_number:
          type:
            - string
            - 'null'
        job:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        avatar_url:
          type:
            - string
            - 'null'
        avatar_updated_at:
          type:
            - string
            - 'null'
          format: date-time
        user_id:
          type:
            - integer
            - 'null'
        city_id:
          type:
            - integer
            - 'null'
        district_id:
          type:
            - integer
            - 'null'
        import_source_id:
          type:
            - integer
            - 'null'
        passport_number:
          type:
            - string
            - 'null'
        search_vector:
          type:
            - string
            - 'null'
        is_intake_completed:
          type: boolean
        default_channel_id:
          type:
            - integer
            - 'null'
      required:
        - id
        - tenant_id
        - first_name
        - last_name
        - phone_number
        - email
        - date_of_birth
        - gender
        - country_id
        - identity_number
        - job
        - address
        - deleted_at
        - created_at
        - updated_at
        - avatar_url
        - avatar_updated_at
        - user_id
        - city_id
        - district_id
        - import_source_id
        - passport_number
        - search_vector
        - is_intake_completed
        - default_channel_id
      title: Customer
    Currency:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        code:
          type:
            - string
            - 'null'
        symbol:
          type:
            - string
            - 'null'
        is_active:
          type: string
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        locale:
          type:
            - string
            - 'null'
        search_vector:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - code
        - symbol
        - is_active
        - deleted_at
        - created_at
        - updated_at
        - locale
        - search_vector
      title: Currency
    Gender:
      type: string
      enum:
        - male
        - female
        - other
      title: Gender
  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://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````