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

# Get an expense for a company



## OpenAPI

````yaml get /expenses/{expenseId}
openapi: 3.0.0
info:
  description: Pleo.io API
  version: 0.0.1
  title: Pleo.io API
servers:
  - url: https://openapi.pleo.io/v1/
    description: Production
  - url: https://openapi.staging.pleo.io/v1/
    description: Staging
security:
  - BearerToken: []
tags: []
paths:
  /expenses/{expenseId}:
    get:
      tags:
        - Expenses
      summary: Get an expense for a company
      operationId: getExpense
      parameters:
        - name: expenseId
          in: path
          required: true
          schema:
            type: string
            example: 0f0e000-000d-0d00-000b-00db0d000fae
          description: Unique UUID of the expense.
      responses:
        '200':
          description: An expense has been returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseResponse'
        '401':
          description: request unauthorized
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/DefaultUnauthorizedResponse'
        '403':
          description: Request forbidden; user has insufficient rights to a resource.
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/DefaultForbiddenResponse'
        '404':
          description: route not found
          content:
            application/json; charset=utf-8:
              example: route not found
        '500':
          description: >-
            Something went wrong. Please contact the administrator if problems
            persist.
          content:
            application/json; charset=utf-8:
              example: >-
                Something went wrong. Please contact the administrator if
                problems persist.
      deprecated: true
components:
  schemas:
    ExpenseResponse:
      type: object
      properties:
        id:
          type: string
          description: The unique UUID identifier of the expense
        employeeId:
          type: string
          description: Unique UUID identifier of the employee that performed the expense
        employeeCode:
          type: string
          description: External identifier of the employee that performed the expense
        departmentId:
          type: string
          description: >-
            Unique UUID identifier of the department for which the employee
            executing the expense belongs to
        performedAt:
          type: string
          description: >-
            The date the expense was performed in the format
            YYYY-MM-DDTHH:mi:ss.SSSZ
          format: date-time
        amountOriginal:
          type: object
          description: The amount and currency the transaction was originally in
          properties:
            value:
              type: number
            currency:
              type: string
              description: 3-Letter currency code
          required:
            - value
            - currency
        amountSettled:
          type: object
          description: The settlement amount and currency
          properties:
            value:
              type: number
            currency:
              type: string
              description: 3-Letter currency code
          required:
            - value
            - currency
        note:
          type: string
          description: >-
            Additional comments on the expense added to enhance the purpose of
            the expense
        type:
          type: string
          description: The type of this expense.
          enum:
            - CARD
            - PERSONAL_TRANSFER
            - BILL_INVOICE
            - LOAD
            - MANUAL
            - MANUAL_TRANSFER
            - PLEO_INVOICE
            - EMPLOYEE_BANK_TRANSFER
            - CASHBACK
        cardTransaction:
          type: object
          description: >-
            This is the card transaction details of this expense specifically
            related CARD expense types.
          properties:
            state:
              type: string
              description: This is the transaction state of this card transaction.
              enum:
                - AUTHORIZATION
                - AUTHORIZATION_REVERSAL
                - CHARGE_BACK
                - CHARGE_BACK_REVERSAL
                - PRESENTMENT
                - SECOND_PRESENTMENT
                - REFUND
                - LOAD
                - UNLOAD
                - FAILED
            authorizedAt:
              type: string
              description: >-
                Date and time the transaction was authorized in the format
                YYYY-MM-DDTHH:mi:ss.SSSZ.
              format: date-time
            settledAt:
              type: string
              description: >-
                Date and time the transaction was settled in the pleo wallet
                currency in the format YYYY-MM-DDTHH:mi:ss.SSSZ.
              format: date-time
            reversedAt:
              type: string
              description: >-
                Date and time the transaction was reversed if the transaction is
                in a reversal state in the format YYYY-MM-DDTHH:mi:ss.SSSZ.
              format: date-time
            merchant:
              type: object
              description: Merchant the transaction was executed at
              properties:
                id:
                  type: string
                  description: Merchant payment processor merchant identifier
                name:
                  type: string
                  description: Name of the merchant
              required:
                - name
          required:
            - state
            - merchant
        accountId:
          type: string
          description: >-
            This is the UUID pleo accounting category identifier for this
            expense, e.g. entertainment, travel etc.
        taxCodeId:
          type: string
          description: This is the UUID tax code identifier for this expense
        tagIds:
          type: array
          description: >-
            These are additional accounting-related information pertaining to
            the expense, these are usually extracted from the external
            accounting system.
          items:
            type: object
            properties:
              id:
                type: string
                description: This is the UUID of the tag attached to the expense
              tagGroupId:
                type: string
                description: UUID for the tag group to which expense tags are attached
        lines:
          type: array
          description: >-
            This is a breakdown of the expense lines for this expense, could
            also be potentially empty for non-card related expenses
          items:
            type: object
            properties:
              amountSettled:
                type: object
                description: >-
                  The breakdown settlement amount and currency for this expense
                  line
                properties:
                  value:
                    type: number
                  currency:
                    type: string
                    description: 3-Letter currency code
                required:
                  - value
                  - currency
              accountId:
                type: string
                description: >-
                  This is the UUID pleo accounting category identifier for this
                  expense line, e.g. entertainment, travel etc.
              taxCodeId:
                type: string
                description: This is the UUID tax code identifier for this expense line
              tagIds:
                type: array
                description: >-
                  These are additional accounting-related information pertaining
                  to the expense, these are usually extracted from the external
                  accounting system.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: This is the UUID of the tag attached to the expense
                    tagGroupId:
                      type: string
                      description: >-
                        UUID for the tag group to which expense tags are
                        attached
            required:
              - amountSettled
        receiptIds:
          type: array
          description: Unique identifiers (UUIDs) for the receipts attached to this expense
          items:
            type: string
        settledExpenseIds:
          type: array
          description: >-
            Unique identifiers (UUIDs) of the related settled Expenses in case
            the expense is a reimbursement of *TRANSFER family
          items:
            type: string
        status:
          type: string
          description: This is related to export status information
          enum:
            - NOT_EXPORTED
            - QUEUED
            - EXPORTING
            - EXPORTED
        supplier:
          type: object
          description: Expense supplier information.
          properties:
            CIF:
              type: string
              description: CIF code of the expense
            documentNumber:
              type: string
              description: Document number of the expense
        createdAt:
          type: string
          description: >-
            Date and time this record was created in the pleo system in the
            format YYYY-MM-DDTHH:mi:ss.SSSZ
          format: date-time
        updatedAt:
          type: string
          description: >-
            Date and time this record was last updated in the pleo system in the
            format YYYY-MM-DDTHH:mi:ss.SSSZ
          format: date-time
        deletedAt:
          type: string
          description: >-
            Date and time this record was deleted in the pleo system in the
            format YYYY-MM-DDTHH:mi:ss.SSSZ
          format: date-time
      required:
        - id
        - performedAt
        - amountOriginal
        - type
        - lines
        - status
        - createdAt
        - updatedAt
    DefaultUnauthorizedResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
          description: http response status code
        error:
          type: string
          example: Forbidden
          description: error type
        message:
          type: string
          example: user_scope_insufficient
          description: error message
    DefaultForbiddenResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
          description: http response status code
        error:
          type: string
          example: Forbidden
          description: error type
        message:
          type: string
          example: user_scope_insufficient
          description: error message
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      description: Open API Bearer token

````