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

# Get expense

## Field support per integration

<AccordionGroup>
  <Accordion title="Exact Online" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/exact.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=afa1af7a261b22f843ac73ee60896ede" width="24" height="24" data-path="logo/exact.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
    </Note>

    Support rawData: `true`

    <br />

    Supported Response Fields:

    <ResponseField name="id" type="string" />

    <ResponseField name="createdDate" type="string" />

    <ResponseField name="currency" type="enum">
      Available options (3-letter ISO 4217):
      `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EEK`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GQE`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZM`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VEB`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XDR`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMK`, `ZWR`
    </ResponseField>

    <ResponseField name="description" type="string" />

    <ResponseField name="documentId" type="string">
      The `documentId` is the ID of the document that is attached to the expense.
    </ResponseField>

    <ResponseField name="exchangeRate" type="string" />

    <ResponseField name="expenseLines" type="JournalLineItem[]">
      <Expandable title="properties">
        <ResponseField name="id" type="string" />

        <ResponseField name="accountId" type="string" />

        <ResponseField name="description" type="string" />

        <ResponseField name="dimensions" type="Dimension">
          <Expandable title="properties">
            <ResponseField name="id" type="string" />

            <ResponseField name="name" type="string" />
          </Expandable>
        </ResponseField>

        <ResponseField name="taxRate " type="taxRate">
          <Expandable title="properties">
            <ResponseField name="code" type="string" />

            <ResponseField name="taxRatePercentage" type="string" />
          </Expandable>
        </ResponseField>

        <ResponseField name="totalGrossAmount" type="number" />
      </Expandable>
    </ResponseField>

    <ResponseField name="journalCode" type="string" />

    <ResponseField name="paymentTermId" type="string" />

    <ResponseField name="paymentType" type="string">
      Available options:
      `CASH`, `COLLECTION`, `CREDIT`
    </ResponseField>

    <ResponseField name="supplierId" type="string" />

    <ResponseField name="type" type="string">
      Available options:
      `EXPENSE`
    </ResponseField>

    <ResponseField name="totalGrossAmount" type="number" />

    <ResponseField name="totalTaxAmount" type="number" />

    <ResponseField name="transactionDate" type="string" />

    <ResponseField name="updatedDate" type="string" />
  </Accordion>

  <Accordion title="Twinfield" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/twinfield.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=aacf76ab75d30aabd615bc761d08f405" width="24" height="24" data-path="logo/twinfield.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
    </Note>

    <Note>
      Make sure the query parameter `journalCode` is correctly populated.
      In order to get the `journalCode` you can use the `GET Journals` endpoint available under the Accounting section.
    </Note>

    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="accountNumber" type="number" />

    <ResponseField name="customerId" type="string" />

    <ResponseField name="documentId" type="string" />

    <ResponseField name="expenseLines" type="JournalLineItem[]">
      <Expandable title="properties">
        <ResponseField name="accountNumber" type="number" />

        <ResponseField name="description" type="string" />

        <ResponseField name="documentNumber" type="string" />

        <ResponseField name="exchangeRate" type="number" />

        <ResponseField name="taxRate " type="taxRate">
          <Expandable title="properties">
            <ResponseField name="code" type="string" />
          </Expandable>
        </ResponseField>

        <ResponseField name="totalGrossAmount" type="number" />

        <ResponseField name="totalNetAmount" type="number" />
      </Expandable>
    </ResponseField>

    <ResponseField name="journalCode" type="string" />
  </Accordion>

  <Accordion title="Xero" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/xero.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=4496b21aab750469b3d5e96a1588d9f0" width="45" height="46" data-path="logo/xero.svg">
    Support rawData: `true`

    <br />

    Supported Response Fields:

    <ResponseField name="id" type="string" />

    <ResponseField name="accountCode" type="string" />

    <ResponseField name="accountId" type="string" />

    <ResponseField name="createdDate" type="string" />

    <ResponseField name="currency" type="enum">
      Available options (3-letter ISO 4217):
      `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EEK`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GQE`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZM`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VEB`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XDR`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMK`, `ZWR`
    </ResponseField>

    <ResponseField name="customerId" type="string" />

    <ResponseField name="exchangeRate" type="string" />

    <ResponseField name="expenseLines" type="JournalLineItem[]">
      <Expandable title="properties">
        <ResponseField name="id" type="string" />

        <ResponseField name="accountCode" type="string" />

        <ResponseField name="description" type="string" />

        <ResponseField name="dimensions" type="Dimension">
          <Expandable title="properties">
            <ResponseField name="id" type="string" />

            <ResponseField name="name" type="string" />
          </Expandable>
        </ResponseField>

        <ResponseField name="itemId" type="string" />

        <ResponseField name="taxRate " type="taxRate">
          <Expandable title="properties">
            <ResponseField name="name" type="string" />
          </Expandable>
        </ResponseField>

        <ResponseField name="totalGrossAmount" type="number" />

        <ResponseField name="totalNetAmount" type="number" />
      </Expandable>
    </ResponseField>

    <ResponseField name="note" type="string" />

    <ResponseField name="supplierId" type="enum" />

    <ResponseField name="type" type="string">
      Available options:
      `EXPENSE`, `REFUND`
    </ResponseField>

    <ResponseField name="totalGrossAmount" type="number" />

    <ResponseField name="totalNetAmount" type="number" />

    <ResponseField name="totalTaxAmount" type="number" />

    <ResponseField name="transactionDate " type="string" />

    <ResponseField name="updatedDate" type="string" />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml get /accounting/expenses/{expenseId}
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/expenses/{expenseId}:
    get:
      tags:
        - accounting
      operationId: getExpenses
      parameters:
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: rawData
          required: false
          in: query
          schema:
            type: boolean
        - name: expenseId
          required: true
          in: path
          schema:
            type: string
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
            example: example value
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
            example: example value
          required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExpenseResponseDto'
components:
  schemas:
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    ExpenseResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 9dea18d2-748e-4bda-9f4c-02b08a9622cd
        'accountCode ':
          type: string
          example: '200'
        'accountId ':
          type: string
          example: 6527a18d2-748e-4bda-9f4c-02b08a9622cd
        'accountNumber ':
          type: number
          example: 70000
        createdDate:
          type: string
          example: '2025-07-15T00:00:00Z'
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        customerId:
          type: string
          example: 8a32de4f-55cc-4962-b000-a2a20662b821
        description:
          type: string
          example: Expense_07/25 for business trip
        documentId:
          type: string
          example: c77fbedb-1ff3-4fed-8716-4d3e3fc85ccf
        exchangeRate:
          type: string
          example: '1'
        expenseLines:
          type: array
          items:
            $ref: '#/components/schemas/expenseLineItem'
        files:
          type: array
          items:
            type: string
            example: file1.pdf
        journalCode:
          type: string
          example: '60'
        ledgerName:
          type: string
          example: Payroll
        note:
          type: string
          example: Gasoline for business trip
        paymentTermId:
          type: string
          example: d2f3e4b5-6a7b-8c9d-0e1f-2g3h4i5j6k7l
        paymentType:
          type: string
          enum:
            - CASH
            - CHECK
            - CREDIT_CARD
            - CREDIT
            - COLLECTION
          example: CASH
        supplierId:
          type: string
          example: 52c049b9-91b7-4828-b346-e1eeadfa31dd
        'taskId ':
          type: string
          example: ADB4457839PXTC2220
        type:
          type: string
          enum:
            - EXPENSE
            - REFUND
          example: EXPENSE
        totalGrossAmount:
          type: number
          example: 119
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        transactionDate:
          type: string
          example: '2025-07-15T00:00:00Z'
        updatedDate:
          type: string
          example: '2025-07-15T00:00:00Z'
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    expenseLineItem:
      type: object
      properties:
        id:
          type: string
          example: b9dade6b-2b69-42c9-bcd4-841960f6cd9f
        accountCode:
          type: string
          example: '200'
        accountId:
          type: string
          example: 56dec6c2-b14c-43ea-87bb-cc67b0ba2545
        accountNumber:
          type: number
          example: 4900
        'createdDate ':
          type: string
          example: '2025-07-15T00:00:00Z'
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        description:
          type: string
          example: Gasoline for business trip
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/dimension'
        documentNumber:
          type: string
          example: EXP-12345
        exchangeRate:
          type: number
          example: 1
        itemId:
          type: string
          example: 9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        taxRate:
          $ref: '#/components/schemas/taxRate'
          type: object
        totalGrossAmount:
          type: number
          example: 119
        totalNetAmount:
          type: number
          example: 100
        updatedDate:
          type: string
          example: '2025-07-15T00:00:00Z'
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3
    dimension:
      type: object
      properties:
        id:
          type: string
          example: efa82f42-fd85-11e1-a21f-0800200c9a33
        categoryName:
          type: string
          example: CostCenter
        name:
          type: string
          example: Material/Waren
    taxRate:
      type: object
      properties:
        id:
          type: string
          example: 1895b05b-38a6-4a6a-9653-166389894350
        code:
          type: string
          example: '03'
        name:
          type: string
          example: Tax19
        taxRatePercentage:
          type: string
          example: '19'

````