> ## 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 invoice accounts



## OpenAPI

````yaml get /v1/invoices/accounts
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/invoices/accounts:
    get:
      tags:
        - Invoice
      summary: Get all invoice accounts
      operationId: invoice.accounts
      parameters:
        - name: search
          in: query
          description: The search query.
          schema:
            type:
              - string
              - 'null'
            maxLength: 255
        - name: document_type
          in: query
          description: Filter by document type.
          schema:
            type:
              - string
              - 'null'
            enum:
              - einvoice
              - evoucher
              - null
        - name: party_type
          in: query
          description: Filter by party type.
          schema:
            type:
              - string
              - 'null'
            enum:
              - individual
              - company
              - null
        - name: integration_id
          in: query
          description: Filter by integration ID.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
        - name: active_integration
          in: query
          description: >-
            Only return accounts whose integrator is active, i.e. the ones an
            invoice can be issued from.
          schema:
            type:
              - boolean
              - 'null'
        - name: sort_by
          in: query
          description: The field to sort by.
          schema:
            type:
              - string
              - 'null'
            enum:
              - created_at
              - name
              - tax_number
              - default_series
              - null
        - name: sort_order
          in: query
          description: The sort direction (asc or desc).
          schema:
            type:
              - string
              - 'null'
            enum:
              - asc
              - desc
              - null
        - 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 `InvoiceAccountResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InvoiceAccountResource'
                  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:
    InvoiceAccountResource:
      type: object
      properties:
        id:
          type: integer
        integration_id:
          type: integer
        integration:
          $ref: '#/components/schemas/RelatedIntegrationResource'
        party_type:
          type: string
        party_type_label:
          type: string
          enum:
            - Bireysel
            - Kurumsal
        document_type:
          type: string
        document_type_label:
          type: string
          enum:
            - E-Fatura
            - E-SMM
        name:
          type:
            - string
            - 'null'
        surname:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        tax_number:
          type: string
        default_series:
          type:
            - string
            - 'null'
        tax_office:
          type:
            - string
            - 'null'
        country_id:
          type:
            - integer
            - 'null'
        city_id:
          type:
            - integer
            - 'null'
        district_id:
          type:
            - integer
            - 'null'
        address:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        use_vat_exemption:
          type: boolean
        withholding_rate_percent:
          type: number
        default_apply_withholding:
          type: boolean
        configured_extra_fields:
          type: array
          description: >-
            Keys of the integrator credentials (`extra_fields`) that are set;
            the values are never returned.
          items:
            type: string
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - integration_id
        - party_type
        - party_type_label
        - document_type
        - document_type_label
        - name
        - surname
        - title
        - tax_number
        - default_series
        - tax_office
        - country_id
        - city_id
        - district_id
        - address
        - phone
        - email
        - use_vat_exemption
        - withholding_rate_percent
        - default_apply_withholding
        - configured_extra_fields
        - created_at
        - updated_at
      title: InvoiceAccountResource
    RelatedIntegrationResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        system_name:
          type:
            - string
            - 'null'
        company_logo:
          type: 'null'
          description: >-
            Short-lived (5 minute) signed URL of the integrator logo; `null`
            when none is set.
      required:
        - id
        - name
        - system_name
        - company_logo
      title: RelatedIntegrationResource
  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

````

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