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

# List Accounting Entries

> Lists accounting entries for validated activity reports on the API key's team.

Each item includes `invoice_number`, `file_name`, and a `freelancer` object.
Optional **`sort`** / **`direction`** query params order the list (default **`created_at`** **`desc`**).




## OpenAPI

````yaml /openapi.yaml get /api/v1/accounting/entries
openapi: 3.0.3
info:
  title: Folkyn API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://folkyn.com
  description: >-
    Team API key; responses in `data`, errors in `error` with `X-Request-Id`.
    Spec at `/api/v1/openapi.yaml` and `/api/v1/openapi.json` (no key). **60
    requests/minute** per key on `/api/v1/*`.
servers:
  - url: https://api.folkyn.com
    description: Production
security:
  - bearerAuth: []
  - ApiKeyHeader: []
tags:
  - name: Specification
    description: OpenAPI document download (no authentication)
  - name: Project codes
    description: Team project codes
  - name: Team tags
    description: Team tags
  - name: Teams
    description: Organizational teams (team units) and member lists
  - name: Missions
    description: Team missions
  - name: Freelancers
    description: Team freelancers and invitations
  - name: Activity reports
    description: Activity reports (CRA)
  - name: Accounting
    description: Accounting entries
paths:
  /api/v1/accounting/entries:
    get:
      tags:
        - Accounting
      summary: List Accounting Entries
      description: >
        Lists accounting entries for validated activity reports on the API key's
        team.


        Each item includes `invoice_number`, `file_name`, and a `freelancer`
        object.

        Optional **`sort`** / **`direction`** query params order the list
        (default **`created_at`** **`desc`**).
      operationId: listAccountingEntries
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
        - $ref: '#/components/parameters/AccountingEntrySort'
        - $ref: '#/components/parameters/AccountingEntrySortDirection'
        - name: status
          in: query
          schema:
            type: string
            enum:
              - paid
              - waiting_payment
        - name: type
          in: query
          schema:
            type: string
            enum:
              - invoice
              - expenses
        - name: activity_report_id
          in: query
          description: Filter by CRA UUID (validated, in-team scope).
          schema:
            type: string
            format: uuid
        - name: has_sent_to_accounting
          in: query
          description: >
            Presence filter on whether the entry was sent to the accounting tool
            (**not a date range**). Case-insensitive accepted values:
            **`with`**, **`without`**, **`true`**, **`false`** (also **`1`** /
            **`0`**). **`with`** / **`true`**: **`sent_to_accounting_at`** is
            set (already sent). **`without`** / **`false`**: not sent yet
            (`null`). Returns **`400`** if the value is invalid.
          schema:
            type: string
            enum:
              - with
              - without
              - true
              - false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaginatedAccountingEntries'
        '400':
          $ref: 1ab40f01-bc1b-40d7-9cb5-0b17d8431ff7
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
    PerPage:
      name: per_page
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    AccountingEntrySort:
      name: sort
      in: query
      description: >
        Sort field for accounting entries (pairs with **`direction`**). Default
        **`created_at`**. **`payment_date`** aliases **`paid_at`**.
        **`sent_to_accounting`** and **`accounting_sent_at`** alias
        **`sent_to_accounting_at`**.
      schema:
        type: string
        enum:
          - created_at
          - paid_at
          - payment_date
          - sent_to_accounting_at
          - sent_to_accounting
          - accounting_sent_at
        default: created_at
    AccountingEntrySortDirection:
      name: direction
      in: query
      description: >-
        Sort direction for **`GET /api/v1/accounting/entries`**.
        Case-insensitive. Omit for **`desc`**.
      schema:
        type: string
        enum:
          - asc
          - desc
        default: desc
  schemas:
    PaginatedAccountingEntries:
      type: object
      required:
        - items
        - total
        - current_page
        - per_page
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingEntryPublic'
        total:
          type: integer
        current_page:
          type: integer
        per_page:
          type: integer
    AccountingEntryPublic:
      type: object
      required:
        - id
        - activity_report_id
        - type
        - status
        - amount_excl_vat
        - vat_amount
        - amount_incl_vat
        - currency
        - invoice_number
        - file_name
        - freelancer
        - paid_at
        - sent_to_accounting_at
        - created_at
        - project_codes
      properties:
        id:
          type: string
          format: uuid
        activity_report_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - invoice
            - expenses
        status:
          type: string
          enum:
            - waiting_payment
            - paid
        amount_excl_vat:
          type: number
        vat_amount:
          type: number
        amount_incl_vat:
          type: number
        currency:
          type: string
          description: >-
            ISO 4217 currency code of the entry's amounts, fixed at entry
            creation (e.g. `EUR`, `USD`). Defaults to `EUR`.
        invoice_number:
          type: string
          nullable: true
          description: >-
            Freelancer invoice number when **`type`** is **`invoice`**; null for
            **`expenses`** or if unset.
        file_name:
          type: string
          nullable: true
          description: >
            Uploaded invoice file name (`invoice`) or generated expense summary
            PDF name (`expenses`, `note-de-frais-{activity_report_id}.pdf`).
        freelancer:
          $ref: '#/components/schemas/ActivityReportFreelancerPublic'
        paid_at:
          type: string
          format: date-time
          nullable: true
        sent_to_accounting_at:
          type: string
          format: date-time
          nullable: true
          description: >
            Timestamp when the entry was sent to the team accounting tool (email
            export). `null` if not yet sent.
        created_at:
          type: string
          format: date-time
        project_codes:
          type: array
          description: >
            For **`type: invoice`**, invoice amount excl. VAT split by project
            code (same rules as activity reports). Empty for **`type:
            expenses`** entries.
          items:
            $ref: '#/components/schemas/ProjectCodeAmountPublic'
    PublicError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: integer
              description: Same as HTTP status; use `message` and `details` to narrow.
              enum:
                - 400
                - 401
                - 403
                - 404
                - 429
                - 500
              example: 401
            message:
              type: string
            request_id:
              type: string
              format: uuid
              description: Correlates with the X-Request-Id response header.
            details:
              $ref: '#/components/schemas/PublicErrorDetails'
    ActivityReportFreelancerPublic:
      type: object
      nullable: true
      description: >
        Assigned freelancer; null if missing. `referent` matches the team
        referent on mission payloads (see `MissionFreelancerPublic`).
      properties:
        id:
          type: string
          format: uuid
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
        external_id:
          type: string
          description: >
            External identifier for integrations. Uses the team-stored value
            when set; otherwise computed from lowercased `first_name` +
            `last_name` with spaces and Latin diacritics stripped (e.g. Clément
            Balea → `clementbalea`). German `ß` becomes `ss`. Empty string if
            both names are missing and no stored value.
        siren:
          type: string
          nullable: true
          description: >
            Freelancer company SIREN (9 digits, no spaces); null when unset or
            fewer than 9 digits.
        referent:
          type: object
          nullable: true
          description: Team referent (id, name, email); null if none.
          allOf:
            - $ref: '#/components/schemas/PartnerFreelancerReferentPublic'
    ProjectCodeAmountPublic:
      type: object
      required:
        - id
        - name
        - external_id
        - amount_excl_vat
      description: >-
        Project code with invoice amount excl. VAT (excludes expense
        refacturation).
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        external_id:
          type: string
          nullable: true
        amount_excl_vat:
          type: number
          description: >-
            Invoice amount excl. VAT attributed to this project code for the
            activity report or invoice accounting entry.
    PublicErrorDetails:
      type: object
      description: Optional structured hints (validation, scope, rate limit).
      additionalProperties: true
      properties:
        reason:
          $ref: '#/components/schemas/PartnerValidationErrorReason'
        field:
          type: string
          description: JSON body field name when applicable (e.g. `name`).
          example: name
        requiredScope:
          type: string
          description: >-
            Required OAuth-like scope string when `code` is 403 (insufficient
            scope).
          example: tags:write
        retryAfterSeconds:
          type: integer
          minimum: 0
          description: Hint when `code` is 429.
    PartnerFreelancerReferentPublic:
      type: object
      description: Team referent (id, first name, last name, email).
      required:
        - id
        - first_name
        - last_name
        - email
      properties:
        id:
          type: string
          format: uuid
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
    PartnerValidationErrorReason:
      type: string
      description: >-
        Machine-readable validation subtype (HTTP 400) for create tag / project
        code.
      enum:
        - invalid_json
        - required_field
        - duplicate_name
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
    ForbiddenError:
      description: Insufficient scope or forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
    RateLimited:
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
    InternalError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use `Authorization: Bearer <your_api_key>`'
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key

````