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

# Accounting of an expense on an expense report

> Returns the accounting rows of an expense on the report, and for the given recipient whether that accounting was set by hand. The report detail dialog shows this when an administrator edits the accounting of an expense.

The report must belong to the organization and must not be deleted, and the expense must be on the report and must not be deleted.

Supports the external id of the organization in `organizationId`.




## OpenAPI

````yaml /openapi/findity-admin-api.json get /organizations/{organizationId}/reports/{reportId}/expenses/{expenseId}/accounting
openapi: 3.1.0
info:
  title: Findity Admin API
  description: Findity Admin API
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api/v1/admin
  - url: https://api.findity.com/api/v1/admin
security:
  - bearerAuth: []
paths:
  /organizations/{organizationId}/reports/{reportId}/expenses/{expenseId}/accounting:
    get:
      tags:
        - Expense Reports
      summary: Accounting of an expense on an expense report
      description: >
        Returns the accounting rows of an expense on the report, and for the
        given recipient whether that accounting was set by hand. The report
        detail dialog shows this when an administrator edits the accounting of
        an expense.


        The report must belong to the organization and must not be deleted, and
        the expense must be on the report and must not be deleted.


        Supports the external id of the organization in `organizationId`.
      operationId: getOrganizationExpenseReportExpenseAccounting
      parameters:
        - $ref: '#/components/parameters/organizationIdOrExternalIdInPath'
        - $ref: '#/components/parameters/expenseReportId'
        - $ref: '#/components/parameters/expenseId'
        - $ref: '#/components/parameters/accountingRecipientId'
        - $ref: '#/components/parameters/accountingIncludeBenefitsData'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseAccounting'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Error'
              examples:
                recipientNotInOrganization:
                  summary: The recipient belongs to another organization
                  value:
                    result: error
                    code: INVALID_PARAMETER
                    description: >-
                      Recipient 3f2b1a0c9d8e7f6a5b4c3d2e1f0a9b8c does not belong
                      to organization 05b8daba9ba14a49846fe77883248cf0
        '401':
          description: >
            The caller lacks the `adminApiExpenseReports:getExpenseAccounting`
            permission. A caller who has the permission but no access to the
            organization gets 404 `ORGANIZATION_NOT_FOUND` instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401Error'
              examples:
                unauthorized:
                  summary: The caller lacks the permission the endpoint requires
                  value:
                    result: unauthorized
        '404':
          description: >-
            The organization, the report or the expense was not found, or the
            caller has no access to it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Error'
              examples:
                organizationNotFound:
                  summary: Organization not found
                  value:
                    result: error
                    code: ORGANIZATION_NOT_FOUND
                    description: Organization not found
                expenseReportNotFound:
                  summary: >-
                    The report does not exist, is deleted or belongs to another
                    organization
                  value:
                    result: error
                    code: EXPENSE_REPORT_NOT_FOUND
                    description: Expense report not found
                expenseNotFound:
                  summary: The expense is not on the report or is deleted
                  value:
                    result: error
                    code: EXPENSE_RECORD_NOT_FOUND
                    description: Expense not found
components:
  parameters:
    organizationIdOrExternalIdInPath:
      in: path
      name: organizationId
      required: true
      description: >-
        Unique identifier of the organization. String in UUID without dashes
        (32-character hex string) if access is done via values from Findity
        system otherwise, id of external system can be used
      schema:
        type: string
      examples:
        Findity unique id:
          value: 05b8daba9ba14a49846fe77883248cf0
        External system unique id:
          value: a31a7372-3397-3924-ffcd-b7b4795e42eb
    expenseReportId:
      in: path
      name: reportId
      required: true
      description: >-
        The unique identifier of the expense report. String, UUID format
        (32-character hexadecimal). Required.
      schema:
        $ref: '#/components/schemas/Uuid'
      example: f328e47d595c40ad80f27f52626c5b92
    expenseId:
      in: path
      name: expenseId
      required: true
      description: >-
        The unique identifier of the expense on the expense report. String, UUID
        format (32-character hexadecimal). Required.
      schema:
        $ref: '#/components/schemas/Uuid'
      example: 7c1f0a3b9d2e4f5a8b6c0d1e2f3a4b5c
    accountingRecipientId:
      name: recipientId
      in: query
      description: >
        The recipient (accounting or payment integration of the organization) to
        return the accounting for. String, UUID format (32-character
        hexadecimal). Optional: without it, the accounting for every recipient
        is returned and `recipientInformation` is null. A recipient that was
        disconnected from the organization is accepted. A recipient that does
        not belong to the organization is rejected with 400.
      required: false
      schema:
        $ref: '#/components/schemas/Uuid'
      example: 3f2b1a0c9d8e7f6a5b4c3d2e1f0a9b8c
    accountingIncludeBenefitsData:
      name: includeBenefitsData
      in: query
      description: >
        When true, the accounting rows of benefits (food, fuel and congestion
        benefits) are returned too. When false, they are left out. Boolean.
        Optional, defaults to false.
      required: false
      schema:
        type: boolean
        default: false
      example: true
  schemas:
    ExpenseAccounting:
      type: object
      required:
        - accounting
        - recipientInformation
      properties:
        accounting:
          type: array
          description: >-
            The accounting rows of the expense, sorted by account text. Benefit
            rows are left out.
          items:
            type: object
            required:
              - id
              - accountingNumber
              - amount
              - type
              - dimensionValues
            properties:
              id:
                $ref: '#/components/schemas/Uuid'
              accountingNumber:
                type: object
                description: The account the row is booked on.
                required:
                  - id
                  - number
                  - text
                properties:
                  id:
                    $ref: '#/components/schemas/Uuid'
                  number:
                    type: string
                    description: Account number.
                  text:
                    type: string
                    description: Account name.
                  visible:
                    type: boolean
                    description: Whether the account is shown to users.
                  type:
                    type: string
                    description: Kind of account, for example ACCOUNTING_NUMBER.
              amount:
                type: number
                description: Amount of the row in the currency of the organization.
              taxAmount:
                type: number
                description: Tax part of the amount, 0 when there is none.
              quantity:
                type:
                  - number
                  - 'null'
                description: Quantity of the row.
              type:
                type: string
                description: DEBIT or CREDIT.
              group:
                type:
                  - string
                  - 'null'
                description: Accounting group of the row, for example NORMAL or VAT.
              detailedGroup:
                type:
                  - string
                  - 'null'
                description: More detailed accounting group of the row.
              unit:
                type:
                  - string
                  - 'null'
                description: Unit of the quantity, for example PCS.
              dimensionValues:
                type: array
                description: The dimension values (cost center, project, ...) on the row.
                items:
                  type: object
                  properties:
                    definitionId:
                      type: string
                      description: External id of the dimension definition.
                    definitionDescription:
                      type: string
                      description: Name of the dimension.
                    definitionExternalSourceId:
                      type:
                        - string
                        - 'null'
                      description: Id of the dimension in the external system.
                    value:
                      type: string
                      description: Value of the dimension.
                    text:
                      type:
                        - string
                        - 'null'
                      description: Name of the value.
                    tag:
                      type:
                        - string
                        - 'null'
                      description: Tag of the value.
              recipientId:
                type:
                  - string
                  - 'null'
                description: Id of the recipient the row is for.
        recipientInformation:
          type:
            - object
            - 'null'
          description: >-
            How the expense is accounted for the given recipient. Null when
            `recipientId` is not given or nothing is stored for the recipient.
          required:
            - expenseRecordId
            - recipientId
            - overrideAutomaticAccounting
          properties:
            expenseRecordId:
              type: string
              description: Id of the expense.
            recipientId:
              type: string
              description: Id of the recipient.
            lastAccounting:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                When the accounting for the recipient was last calculated
                automatically or set by hand. While
                `overrideAutomaticAccounting` is true, it is the time of the
                last manual change.
            overrideAutomaticAccounting:
              type: boolean
              description: >-
                True when the accounting was set by hand instead of calculated
                automatically.
            includeInRecipient:
              type: boolean
              description: Whether the expense is sent to the recipient.
            accountingFailed:
              type: boolean
              description: True when the automatic accounting failed.
            manuallyAccountedByPersonId:
              type:
                - string
                - 'null'
              description: Id of the person who set the accounting by hand.
            disableManualAccounting:
              type: boolean
              description: >-
                True when the recipient does not allow setting the accounting by
                hand.
      example:
        accounting:
          - id: 8a1b2c3d4e5f60718293a4b5c6d7e8f9
            accountingNumber:
              id: 1a2b3c4d5e6f708192a3b4c5d6e7f809
              number: '5800'
              text: Travel
              visible: true
              type: ACCOUNTING_NUMBER
            amount: 1000
            taxAmount: 0
            quantity: 1
            type: DEBIT
            group: NORMAL
            detailedGroup: null
            unit: PCS
            dimensionValues:
              - definitionId: COST_CENTER
                definitionDescription: Cost center
                definitionExternalSourceId: null
                value: '100'
                text: Sales
                tag: null
            recipientId: 3f2b1a0c9d8e7f6a5b4c3d2e1f0a9b8c
        recipientInformation:
          expenseRecordId: 7c1f0a3b9d2e4f5a8b6c0d1e2f3a4b5c
          recipientId: 3f2b1a0c9d8e7f6a5b4c3d2e1f0a9b8c
          lastAccounting: '2026-10-12T08:15:00Z'
          overrideAutomaticAccounting: true
          includeInRecipient: true
          accountingFailed: false
          manuallyAccountedByPersonId: 05b8daba9ba14a49846fe77883248cf0
          disableManualAccounting: false
    400Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
    401Error:
      type: object
      properties:
        result:
          type: string
      example:
        result: unauthorized
    404Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
      example:
        result: error
        code: ORGANIZATION_NOT_FOUND
        description: 'Failed to get organization for id: {orgId}'
    Uuid:
      type: string
      pattern: ^[0-9a-fA-F]{32}$
      description: UUID without dashes (32-character hex string)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````