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

# Mark Accounting Entry as Paid

> Marks the accounting entry as paid.



## OpenAPI

````yaml /openapi.yaml patch /api/v1/accounting/entries/{id}
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/{id}:
    patch:
      tags:
        - Accounting
      summary: Mark Accounting Entry as Paid
      description: Marks the accounting entry as paid.
      operationId: patchAccountingEntryMarkPaid
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingEntryMarkPaidRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - entry
                    properties:
                      entry:
                        $ref: '#/components/schemas/AccountingEntryPublic'
        '400':
          description: Validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    AccountingEntryMarkPaidRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - paid
          description: Must be **`paid`** (only marking as paid is supported via this API).
    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

````