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

# Create expense report (fields format of expense report)

> Creates an expense report from a fields-format payload — the same field-builder envelope returned by `GET /me/organizations/{id}/expensereports/fields`. Validation errors are returned in the same fields-format shape so the client can merge them back into the form fields.



## OpenAPI

````yaml openapi/findity-expense-api.json POST /expensereports?format=fields
openapi: 3.0.3
info:
  title: Findity Expense API
  description: Findity Expense API
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api/v1/expense
  - url: https://api.findity.com/api/v1/expense
security:
  - bearerAuth: []
paths:
  /expensereports?format=fields:
    post:
      tags:
        - Fields
      summary: Create expense report (fields format of expense report)
      description: >-
        Creates an expense report from a fields-format payload — the same
        field-builder envelope returned by `GET
        /me/organizations/{id}/expensereports/fields`. Validation errors are
        returned in the same fields-format shape so the client can merge them
        back into the form fields.
      operationId: createExpenseReportUsingFieldsFormat
      parameters:
        - $ref: '#/components/parameters/organizationIdRequiredInQuery'
        - $ref: '#/components/parameters/formatFields'
        - $ref: '#/components/parameters/forceSave'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseReportFieldsResponse'
            examples:
              Expense report example:
                value:
                  fields:
                    - name: Id
                      property: id
                      controlType: TEXT
                      mandatory: false
                      visible: false
                      value: null
                      errorText: null
                      error: null
                      custom: false
                    - name: null
                      property: version
                      controlType: INTEGER
                      mandatory: false
                      visible: false
                      value: null
                      errorText: null
                      error: null
                      custom: false
                    - name: Name
                      property: name
                      controlType: TEXT
                      mandatory: false
                      visible: true
                      value: Example Report Name
                      errorText: null
                      error: null
                      custom: false
                    - name: Description
                      property: description
                      controlType: MULTI_LINE_TEXT
                      mandatory: false
                      visible: true
                      value: Example expense report description
                      errorText: null
                      error: null
                      custom: false
                    - name: Recipients
                      property: recipientList
                      controlType: RECIPIENT_LIST
                      mandatory: false
                      visible: false
                      value:
                        - email: test.user@findity.com
                      errorText: null
                      error: null
                      custom: false
                    - name: Preview
                      property: previewURL
                      controlType: URL
                      mandatory: false
                      visible: true
                      value: >-
                        https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2
                      errorText: null
                      error: null
                      custom: false
                    - name: Testlista rapport
                      property: 8ab28c4e833655d4018336d471cf0134
                      controlType: LIST
                      mandatory: false
                      visible: true
                      value: null
                      errorText: null
                      error: null
                      custom: true
                      url: >-
                        /me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b
                    - name: FEP-1021 Test
                      property: 8ab28c4f746e90720174718de8460504
                      controlType: LIST
                      mandatory: false
                      visible: false
                      value: null
                      errorText: null
                      error: null
                      custom: true
                      url: >-
                        /me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b
                  meta:
                    capabilities: null
                    sections: null
                    summary: null
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseReport'
        '400':
          description: Error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ExpenseReportFieldsResponse'
                  - $ref: '#/components/schemas/400Error'
              examples:
                Validation error (fields format):
                  value:
                    fields:
                      - name: Id
                        property: id
                        controlType: TEXT
                        mandatory: false
                        visible: false
                        value: null
                        errorText: null
                        error: null
                        custom: false
                      - name: Name
                        property: name
                        controlType: TEXT
                        mandatory: false
                        visible: true
                        value: null
                        errorText: null
                        error: null
                        custom: false
                      - name: Description
                        property: description
                        controlType: MULTI_LINE_TEXT
                        mandatory: false
                        visible: true
                        value: Description
                        errorText: null
                        error: null
                        custom: false
                      - name: Recipients
                        property: recipientList
                        controlType: MULTI_VALUE
                        mandatory: false
                        visible: true
                        value: []
                        errorText: null
                        error: null
                        custom: false
                      - name: Expense records list
                        property: expenseRecords
                        controlType: LIST
                        multiSelect: true
                        mandatory: false
                        visible: true
                        value:
                          - 28897169ff6444c6957f362812fb9cc8
                          - c99a0ead61344fa48657e8814737a524
                        errorText: Expense record not found
                        error: EXPENSE_RECORD_NOT_FOUND
                        custom: false
                      - name: Hello World
                        property: 8ab28c4e7294727001729806a19d0055
                        controlType: LIST
                        mandatory: false
                        visible: false
                        value: null
                        errorText: null
                        error: null
                        custom: true
                        url: >-
                          /me/organizations/8ab28c4f6fd37d39016fd6fee0470003/lists/CUSTOM_DIMENSIONS_866bd40e084b48e88f93bd51644fa054_8ab28c4f6fd37d39016fd6fee0470003
                    meta:
                      capabilities:
                        canBeDeleted: true
                        canBeSentIn: true
                        canBeRetracted: false
                      previewUrl: null
                      summary: null
                Generic error (invalid ID):
                  value:
                    result: error
                    requestId: 47b17d6f18b84c5b8c9460c55d98c108
                    description: >-
                      Id can not be specified when creating expense report, use
                      PUT on /expensereports/{id}
                    code: INVALID_ID
components:
  parameters:
    organizationIdRequiredInQuery:
      in: query
      name: organizationId
      required: true
      description: The id of the organization of the user
      schema:
        $ref: '#/components/schemas/Uuid'
      example: 05b8daba9ba14a49846fe77883248cf0
    formatFields:
      in: query
      name: format
      description: Info about the structure passed in the body of request
      required: true
      schema:
        type: string
        description: Parameter should be set to 'fields' value
      example: fields
    forceSave:
      in: query
      name: forceSave
      required: false
      description: >-
        When true, saves the report even if non-blocking validation warnings
        exist; validation errors still abort. Defaults to false.
      schema:
        type: boolean
  schemas:
    ExpenseReportFieldsResponse:
      type: object
      description: Fields format of expense report
      properties:
        meta:
          type: object
          description: >-
            Field-builder metadata for the expense report. Contains the summary,
            the caller's capability flags, and a preview URL.
          properties:
            summary:
              $ref: '#/components/schemas/MetaSummarySchema'
            capabilities:
              $ref: '#/components/schemas/ExpenseReportCapabilities'
            previewUrl:
              type: string
              description: >-
                delivers the URL that can be used for the preview of expense
                report
        fields:
          description: >-
            Field-builder array describing the expense report's editable values.
            Each entry pairs a property name with a value and any errors.
          allOf:
            - $ref: '#/components/schemas/FieldsArray'
    ExpenseReport:
      type: object
      properties:
        comment:
          type: string
        dateCreated:
          type: string
          readOnly: true
        emailRecipients:
          type: string
        expenseRecords:
          type: array
          items:
            $ref: '#/components/schemas/ExpenseRecord'
        id:
          type: string
        version:
          type: integer
          format: int64
          description: >-
            Optimistic-lock counter, incremented on every update. Echo this
            value back in the request body of a PUT to detect if the report was
            changed by someone else since it was read; a mismatch returns 409.
        lastUpdated:
          type: string
        meta:
          type: object
          properties:
            abbreviation:
              $ref: '#/components/schemas/ExpenseReportAbbreviation'
            violations:
              $ref: '#/components/schemas/ExpenseReportViolations'
            approval:
              $ref: '#/components/schemas/ExpenseReportApproval'
            requirements:
              $ref: '#/components/schemas/ExpenseReportRequirements'
            messages:
              $ref: '#/components/schemas/ExpenseReportMessages'
            invoice:
              $ref: '#/components/schemas/ExpenseReportInvoice'
            capabilities:
              $ref: '#/components/schemas/ExpenseReportCapabilities'
        name:
          type: string
        organizationId:
          $ref: '#/components/schemas/Uuid'
        personId:
          $ref: '#/components/schemas/Uuid'
        previewUrl:
          type: string
          readOnly: true
        reportNumber:
          type: string
        sent:
          type: string
          readOnly: true
        status:
          type: string
          enum:
            - APPROVAL
            - APPROVED
            - READY_TO_SEND
            - BULK_TRANSFER
            - ERROR
            - NEW
            - NORMAL
            - PAID
            - REJECTED
            - SEND
            - SENT
            - TRANSFER
            - TRANSFER_TO_RECIPIENT
          readOnly: true
        processStatus:
          type: string
          enum:
            - DRAFT
            - PROCESSING
            - PROCESSED
            - REJECTED
          readOnly: true
        reimbursement:
          type: number
          readOnly: true
        reimbursementCurrency:
          type: string
          readOnly: true
        approvalChainId:
          type: string
          readOnly: true
        type:
          type: string
          enum:
            - AUTOMATIC
            - MANUAL
            - COMPANY_CARD
          readOnly: true
        customFields:
          $ref: '#/components/schemas/ArrayOfCustomFields'
    400Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
    Uuid:
      type: string
      pattern: ^[0-9a-fA-F]{32}$
      description: UUID without dashes (32-character hex string)
    MetaSummarySchema:
      type: array
      description: Contains summarised information about report
      items:
        type: object
        properties:
          property:
            type: string
            description: Name of property
          type:
            type: string
            description: >-
              One of the following types will be provided [property_type,
              header, separator, image]
          value:
            type: string
            description: Value assigned to the property
    ExpenseReportCapabilities:
      type: object
      properties:
        canBeDeleted:
          type: boolean
          description: Indicates if the expense report could be deleted or not
          example: true
        canBeRetracted:
          type: boolean
          description: >-
            Indicates if the expense report can be retracted. A report can only
            be retracted if it is in APPROVAL status and no expense records or
            approval chain instances have been approved yet
          example: false
        canBeSentIn:
          type: boolean
          description: Indicates if the expense report can be sent in by end user
          example: true
        canBeEdited:
          type: boolean
          description: Indicates if the expense report can be edited in by end user
          example: true
        canRemoveExpenses:
          type: boolean
          description: >-
            Indicates if expense records that are attached to/included in the
            report can be removed. This is set to false if the report is in
            processStatus = REJECTED or if it is corporate card expense report
        canAddExpenses:
          type: boolean
          description: >-
            Indicates if expense records that are not attached to/excluded from
            the report can be added. This is set to false if the report is in
            processStatus = REJECTED or if it is corporate card expense report
    FieldsArray:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            description: >-
              A translated name of the field, can be used to present to to the
              user
          property:
            type: string
            description: >
              Identifier of the field. Contains the path to the property in the
              expense API, for example verification.amount, cardLiability.
              Expense record and expense report fields include a hidden
              (`visible: false`) `version` field (controlType INTEGER) holding
              the optimistic-lock version of the stored object (`null` for a new
              object). Send it back unchanged in the fields of the update
              request; if the object has been modified since it was read, the
              update is rejected with 409 CONCURRENT_MODIFICATION.
          controlType:
            type: string
            enum:
              - TEXT
              - MULTI_LINE_TEXT
              - DOUBLE
              - INTEGER
              - SWITCH
              - DATE
              - DATE_TIME
              - LIST
              - CONTENT_HOLDER
              - GUEST_LIST
              - FIELD_GROUP
              - LOCAL_DATE_TIME
              - INFORMATION
          mandatory:
            type: boolean
            description: The field is required
          visible:
            type: boolean
            description: Only fields with visible = true should be shown
          requiresUpdate:
            type: boolean
            description: >-
              Tells the client that if this field is changed, the client must
              call the API again with the fields data
          url:
            type: string
            description: >-
              If controlType is LIST this property contains an url to the
              selectable values for this field
          custom:
            type: boolean
            description: >-
              Indicates if this is a custom field not part of the standard
              fields
          scannable:
            type: boolean
            description: >-
              Indicates if this field is part of the data extracted by the
              receipt scanning
          qrCodeSupported:
            type: boolean
            description: >
              Set on the `verification.receiptAttachment` (CONTENT_HOLDER) field
              when the organization's booking country uses fiscal QR codes on
              receipts (currently Portugal). When `true`, clients should offer a
              QR-scan step in the receipt capture flow and, on success, send the
              decoded string as the `qrScan` header on `POST /content`. Absent
              when not applicable.
          value:
            type: object
            description: >-
              The value of the field, this is dynamic based on the control type.
              For example if the control type is DOUBLE the value property must
              have a double type. For SubsistenceAllowance and property =
              verification.specification[x].date1 or date2, this value is
              set/delivered in format "yyyy-MM-dd HH:mm" where the date is at
              UTC date time
          data:
            type: object
            description: >-
              When calling the fields-endpoint initially, this may contain a
              list object for fields with control type LIST. This way the client
              does not have to make a call to the list endpoint to fetch the
              value. This has the same structure as the result in the list.
            properties:
              id:
                type: string
                description: Represents the id of the value that is set in this Field
              name:
                type: string
                description: Representable text for chosen list item for set id
              section:
                type: integer
              iconUrl:
                type: string
          allowFutureDate:
            type: boolean
            description: >-
              If controlType is DATE or DATE_TIME or LOCAL_DATE_TIME, this
              property is set. Default value is false. If the value is false,
              then date picker shouldn't allow setting date to value higher than
              today's date.
          error:
            type: string
            description: >-
              A string that represents the error. This property is not empty
              when there is some error related to the specific field.
          errorText:
            type: string
            description: >-
              Human readable description of value returned in error property.
              This property is not empty when there is some error related to the
              specific field.
          disabled:
            type: boolean
            description: >-
              Indicates if property should be enabled or disabled for editing.
              In Approval flow, this property is always set to "true".
          fields:
            type: array
            description: >-
              This property is populated when controlType="FIELD_GROUP" and it
              has the same structure as this array of objects. The list of
              objects represents all fields that are related to the specific
              field group.
          deletable:
            type: boolean
            description: >-
              This property is used for removable fields, for example on the
              FIELD_GROUP for a specification in allowance
          deleteCommand:
            allOf:
              - $ref: '#/components/schemas/FieldsCommandSchema'
          informationType:
            type: string
            enum:
              - normal
              - information
              - warning
              - error
              - success
            description: >-
              This property is set when controlType=INFORMATION and it should
              indicate which type of information the field is
          dismissible:
            type: boolean
            description: >-
              This property is set when controlType=INFORMATION to indicate if
              the information is dismissible or not
          multiSelect:
            type: boolean
            description: >-
              This property is going in combination with controlType=LIST to
              indicate that multiple values can be selected from the list
          listItemType:
            type: string
            description: >-
              This property is set when there is controlType=LIST &
              multiSelect=true to indicate which type of item is list made of
          accessorIconUrl:
            type: string
            description: >-
              This property is set by the URL value for the icon which can
              indicate access to different provided commands. It is usually
              provided within the field of controlType=FIELD_GROUP
          accessorText:
            type: string
            description: >-
              This property represents the text that can be set as replacement
              for all the fields behind the defined FIELD_GROUP. It can be used
              as display for accessor to the list of the fields provided in the
              FIELD_GORUP
          numberOfDecimals:
            type: integer
            description: >-
              The maximum number of decimals this field can present, uses
              current currency. only set for fields with an amount in value.
          summary:
            allOf:
              - $ref: '#/components/schemas/MetaSummarySchema'
          commands:
            type: array
            description: >-
              This property contains the list of possible commands that can be
              performed on the specific field
            items:
              allOf:
                - $ref: '#/components/schemas/FieldsCommandSchema'
    ExpenseRecord:
      type: object
      description: ExpenseRecord format
      properties:
        id:
          type: string
          readOnly: true
        status:
          type: string
          enum:
            - NEW
            - NORMAL
            - APPROVAL
            - APPROVED
            - REJECTED
          readOnly: true
        personId:
          $ref: '#/components/schemas/Uuid'
          readOnly: true
        dateCreated:
          type: string
          readOnly: true
        lastUpdated:
          type: string
          readOnly: true
        version:
          type: integer
          format: int64
          description: >-
            Optimistic-lock counter, incremented on every update. On PUT, echo
            back the value from the last GET/PUT response to detect if the
            expense was changed by someone else since it was read; a mismatch
            returns 409. Optional; omit to skip this check.
        expenseDate:
          type: string
          readOnly: true
          description: >-
            Date that the user has selected for the expense. For receipt
            expenses it is purchase date. For mileages it is travel date and for
            per diems it is the first travel date.
        organizationId:
          $ref: '#/components/schemas/Uuid'
        categoryId:
          $ref: '#/components/schemas/Uuid'
        rejectComment:
          type: string
          readOnly: true
        reimbursement:
          type: number
          readOnly: true
        reimbursementCurrency:
          type: string
          readOnly: true
        meta:
          type: object
          readOnly: true
          properties:
            categoryIconUrl:
              type: string
              example: >-
                https://expense.findity.com/api/resources/8a5f867e9b204742a8cc2ca2b6c57358
            person:
              type: object
              properties:
                firstName:
                  type: string
                  example: Anna
                lastName:
                  type: string
                  example: Andersson
                email:
                  type: string
                  example: anna.andersson@example.com
            abbreviation:
              oneOf:
                - $ref: '#/components/schemas/ReceiptVerificationAbbreviation'
                - $ref: '#/components/schemas/CarSpecificationAbbreviation'
                - $ref: '#/components/schemas/SubsistenceAllowanceAbbreviation'
                - $ref: '#/components/schemas/FoodBenefitsSpecificationAbbreviation'
              discriminator:
                propertyName: expenseType
            capabilities:
              $ref: '#/components/schemas/Capabilities'
            cardTransaction:
              $ref: '#/components/schemas/CardTransactionMeta'
        verification:
          description: >-
            The expense-type-specific payload — receipt details, mileage
            details, per-diem details, or food-benefit details. Shape selected
            by the nested `type` discriminator.
          oneOf:
            - $ref: '#/components/schemas/ReceiptVerification'
            - $ref: '#/components/schemas/CarSpecification'
            - $ref: '#/components/schemas/SubsistenceAllowance'
            - $ref: '#/components/schemas/FoodBenefitsSpecification'
          discriminator:
            propertyName: type
        expenseReportId:
          $ref: '#/components/schemas/Uuid'
    ExpenseReportAbbreviation:
      type: object
      properties:
        alert:
          type: boolean
          description: >-
            If the report is rejected or contains expenses that has validation
            errors
        approvalComment:
          type: string
        dateDescription:
          type: string
        sortDescription:
          type: string
        iconUrl:
          type: string
        reimbursementDescription:
          type: string
          example: 44.5 SEK
          description: >-
            Reimbursement amount and currency formatted according to users
            locale
        userDescription:
          type: string
        labels:
          type: array
          description: List of labels for the expense report
          items:
            $ref: '#/components/schemas/ExpenseLabel'
    ExpenseReportViolations:
      type: array
      items:
        type: object
        properties:
          type:
            type: string
            enum:
              - DUPLICATE
          level:
            type: string
            enum:
              - INFO
              - WARNING
              - BLOCKER
          handledComment:
            type: string
          violatedExpenseIds:
            type: array
            description: List of expense record ids
            items:
              type: string
    ExpenseReportApproval:
      type: object
      properties:
        rejectedExpenseRecordIds:
          type: array
          description: List of expense record ids
          items:
            type: string
    ExpenseReportRequirements:
      type: object
      properties:
        approval:
          $ref: '#/components/schemas/ExpenseReportApprovalRequirements'
    ExpenseReportMessages:
      type: array
      items:
        type: object
        properties:
          message:
            type: string
          date:
            type: string
    ExpenseReportInvoice:
      type: object
      properties:
        cardIconUrl:
          type: string
        invoiceRef:
          type: string
        invoiceNumber:
          type: string
        bank:
          type: string
        dueDate:
          type: string
        invoiceDate:
          type: string
        liability:
          type: string
          enum:
            - corporate
    ArrayOfCustomFields:
      type: array
      items:
        type: object
        properties:
          fieldDefinitionId:
            $ref: '#/components/schemas/Uuid'
          value:
            $ref: '#/components/schemas/AnyValue'
    FieldsCommandSchema:
      type: object
      description: >-
        This property is used to define the command available on the filed of
        controlType=FIELD_GROUP
      properties:
        text:
          type: string
          description: This property contains the text for the command to be displayed
        confirmationRequired:
          type: boolean
          description: >-
            This property indicates if the client should display a dialog with
            confirmation as result of it
        confirmation:
          type: string
          description: >-
            This property contains the text that should be displayed in case
            that confirmationRequired=true and client decided to perform the
            command/action
        command:
          type: string
          description: >-
            This property contains the command that can be executed by
            performing the PUT request with it on the fields endpoint
    ReceiptVerificationAbbreviation:
      type: object
      properties:
        iconUrl:
          type: string
          example: >-
            https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b
        dateDescription:
          type: string
          example: June 2, 2023
          description: Date formatted according to users locale
        sortDescription:
          type: string
          example: June 1, 2023
          description: Description of the value used for sorting
        userDescription:
          type: string
          example: Pens and erasers
        expenseDescription:
          type: string
          example: Office supplies
          description: Description which contains the name of category
        reimbursementDescription:
          type: string
          example: 44.5 SEK
          description: >-
            Reimbursement amount and currency formatted according to users
            locale
        totalReimbursementDescription:
          type: string
          example: 44.5 SEK
          description: >-
            Total reimbursement amount and currency formatted according to users
            locale, only included if requesting meta.splits and the expense is
            the parent
        alert:
          type: boolean
          description: >-
            If the report is rejected or contains expenses that has validation
            errors
        isComplete:
          type: boolean
          description: >-
            If the expense is complete and ready to be sent, can contain
            warnings.
        expenseType:
          type: string
          example: ReceiptVerification
        expenseTypeDescription:
          type: string
          description: description of expenseType property translated to the users language
    CarSpecificationAbbreviation:
      type: object
      properties:
        iconUrl:
          type: string
          example: >-
            https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b
        dateDescription:
          type: string
          example: June 2, 2023
          description: Date formatted according to users locale
        sortDescription:
          type: string
          example: June 1, 2023
          description: Description of the value used for sorting
        userDescription:
          type: string
          example: Trip to Ludvika
        expenseDescription:
          type: string
          example: Mileage - 273.0 km
          description: Description which contains the name of category
        alert:
          type: boolean
          description: >-
            If the report is rejected or contains expenses that has validation
            errors
        isComplete:
          type: boolean
          description: >-
            If the expense is complete and ready to be sent, can contain
            warnings.
        expenseType:
          type: string
          example: CarSpecification
        expenseTypeDescription:
          type: string
          description: >-
            description of expenseType property translated in the specific
            language
    SubsistenceAllowanceAbbreviation:
      type: object
      properties:
        iconUrl:
          type: string
          example: >-
            https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b
        dateDescription:
          type: string
          example: June 2, 2023
          description: Date formatted according to users locale
        sortDescription:
          type: string
          example: June 1, 2023
          description: Description of the value used for sorting
        userDescription:
          type: string
          example: Trip to Stockholm
        expenseDescription:
          type: string
          example: Domestic Subsistence Allowance
          description: Description which contains the name of category
        alert:
          type: boolean
          description: >-
            If the report is rejected or contains expenses that has validation
            errors
        isComplete:
          type: boolean
          description: >-
            If the expense is complete and ready to be sent, can contain
            warnings.
        expenseType:
          type: string
          example: SubsistenceAllowance
        expenseTypeDescription:
          type: string
          description: description of expenseType property translated to the users language
    FoodBenefitsSpecificationAbbreviation:
      type: object
      properties:
        iconUrl:
          type: string
          example: >-
            https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b
        dateDescription:
          type: string
          example: June 2, 2023
          description: Date formatted according to users locale
        sortDescription:
          type: string
          example: June 1, 2023
          description: Description of the value used for sorting
        userDescription:
          type: string
          example: Food benefit
        expenseDescription:
          type: string
          example: Food Benefits Specification
          description: Description which contains the name of category
        alert:
          type: boolean
          description: >-
            If the report is rejected or contains expenses that has validation
            errors
        isComplete:
          type: boolean
          description: >-
            If the expense is complete and ready to be sent, can contain
            warnings.
        expenseType:
          type: string
          example: FoodBenefitsSpecification
        expenseTypeDescription:
          type: string
          description: description of expenseType property translated to the users language
    Capabilities:
      type: object
      properties:
        canBeAddedToReport:
          type: boolean
          description: Indicates if the expense record can be added to a report
          example: false
        canBeRemovedFromReport:
          type: boolean
          description: Indicates if the expense record can be removed from a report
          example: false
        canBeDeleted:
          type: boolean
          description: Indicates if the expense record can be deleted
          example: true
        canBeSentIn:
          type: boolean
          example: true
          description: true if the expense record can be sent in directly without report
        canBeSplit:
          type: boolean
          description: Indicates if the expense record can be split
          example: false
        canBeEdited:
          type: boolean
          description: Indicates if the expense record can be edited
          example: true
        canBeMerged:
          type: boolean
          description: >-
            Indicates if the expense record can be merged with another expense
            record. Will only be true for expense records that are based on card
            transaction, has not been split and is editable by end user.
          example: false
        canAddBreakfast:
          type: boolean
          description: >-
            ONLY PART OF FoodBenefitsSpecifications! Indicates if breakfast is
            available for meal benefits.
          example: false
        canAddLunch:
          type: boolean
          description: >-
            ONLY PART OF FoodBenefitsSpecifications! Indicates if lunch is
            available for meal benefits.
          example: false
        canAddDinner:
          type: boolean
          description: >-
            ONLY PART OF FoodBenefitsSpecifications! Indicates if dinner is
            available for meal benefits.
          example: false
    CardTransactionMeta:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
          example: 4a17f93476ce4bf2832236be26743853
        amount:
          type: number
          format: double
          example: 120
        name:
          type: string
          example: Bank name
        cardNumber:
          type: string
          example: xxxxxxxxxxxx1234
    ReceiptVerification:
      allOf:
        - $ref: '#/components/schemas/Voucher'
        - type: object
          properties:
            type:
              type: string
              enum:
                - ReceiptVerification
            amount:
              type: number
            taxAmount:
              type: number
            tip:
              type: number
              format: double
              minimum: 0
              description: >
                The tip amount for the receipt, expressed as a non-negative
                decimal number in the receipt's currency. This is the canonical
                location for tip. For backwards compatibility the value is also
                mirrored on the deprecated `representation.tip` property.
            exchangeRate:
              type: number
            currency:
              type: string
            description:
              type: string
            purchaseDate:
              type: string
              format: date-time
            dateCreated:
              type: string
            lastUpdated:
              type: string
            storeName:
              type: string
            verificationNumber:
              type: string
            paymentTypeId:
              type: string
            cardTransactionId:
              type: string
            eventType:
              type: string
              enum:
                - AUTHORIZATION_ACCEPTED
                - AUTHORIZATION_REJECTED
                - AUTHORIZATION_REVERSAL
                - CAPTURE
                - REFUND
            receiptAttachment:
              $ref: '#/components/schemas/Content'
            representation:
              $ref: '#/components/schemas/Representation'
            attachments:
              type: array
              items:
                $ref: '#/components/schemas/Content'
            customFields:
              $ref: '#/components/schemas/ArrayOfCustomFields'
            taxRates:
              $ref: '#/components/schemas/ArrayOfTaxRates'
    CarSpecification:
      allOf:
        - $ref: '#/components/schemas/BusinessTrip'
        - type: object
          properties:
            carType:
              $ref: '#/components/schemas/CarTypeEnum'
            destination:
              type: string
              readOnly: true
            manualDistance:
              type: boolean
            tripDetails:
              type: object
              properties:
                distanceInTransport:
                  type: number
                distanceOnGravel:
                  type: number
                numberOfPassengers:
                  type: integer
                distanceWithTrailer:
                  type: number
                distanceWithCaravan:
                  type: number
                distanceWithHeavyCaravan:
                  type: number
                distanceWithDog:
                  type: number
                tollCost:
                  type: number
            relatedTrips:
              type: array
              items:
                type: object
                properties:
                  fleetManagementTripId:
                    $ref: '#/components/schemas/Uuid'
            tollCostFuelType:
              type: string
              enum:
                - PETROL
                - DIESEL
                - ELECTRIC
                - HYBRID
                - HYDROGEN
            tollCostData:
              type: object
              properties:
                returnDiscountedPrice:
                  type: number
                discountedPrice:
                  type: number
                price:
                  type: number
                returnPrice:
                  type: number
            passengers:
              type: array
              items:
                $ref: '#/components/schemas/Passenger'
            attachments:
              type: array
              items:
                $ref: '#/components/schemas/Content'
    SubsistenceAllowance:
      allOf:
        - $ref: '#/components/schemas/Voucher'
        - type: object
          properties:
            type:
              type: string
              enum:
                - SubsistenceAllowance
            amount:
              type: number
            taxAmount:
              type: number
            tip:
              type: number
            exchangeRate:
              type: number
            currency:
              type: string
            description:
              type: string
            purchaseDate:
              type: string
              format: date-time
            dateCreated:
              type: string
            lastUpdated:
              type: string
            storeName:
              type: string
            verificationNumber:
              type: string
            paymentTypeId:
              type: string
            cardTransactionId:
              type: string
            eventType:
              type: string
              enum:
                - AUTHORIZATION_ACCEPTED
                - AUTHORIZATION_REJECTED
                - AUTHORIZATION_REVERSAL
                - CAPTURE
                - REFUND
            receiptAttachment:
              $ref: '#/components/schemas/Content'
            representation:
              $ref: '#/components/schemas/Representation'
            attachments:
              type: array
              items:
                $ref: '#/components/schemas/Content'
            customFields:
              $ref: '#/components/schemas/ArrayOfCustomFields'
    FoodBenefitsSpecification:
      allOf:
        - $ref: '#/components/schemas/Voucher'
        - type: object
          properties:
            type:
              type: string
              enum:
                - FoodBenefitsSpecification
            description:
              type: string
            breakfast:
              type: boolean
            lunch:
              type: boolean
            dinner:
              type: boolean
            customFields:
              $ref: '#/components/schemas/ArrayOfCustomFields'
    ExpenseLabel:
      type: object
      description: Label for an expense or expense report
      properties:
        property:
          type: string
          description: The property this label relates to
          example: label.autoApproval
        text:
          type: string
          description: The label text to display
          example: Auto-approved
        priority:
          type: string
          enum:
            - NORMAL
            - IMPORTANT
            - CRITICAL
          description: Priority level of the label
          example: NORMAL
        type:
          type: string
          enum:
            - NORMAL
            - SUCCESS
            - INFORMATION
            - WARNING
            - ERROR
          description: Type of label indicating its semantic meaning
          example: SUCCESS
        iconUrl:
          type: string
          description: Optional URL to an icon for the label
          example: https://expense.findity.com/api/resources/ic_ai_sparkles.svg
    ExpenseReportApprovalRequirements:
      type: object
      properties:
        requireNextStepApprovers:
          type: boolean
          readOnly: true
        nextStepApprovers:
          type: string
          nullable: true
          readOnly: true
    AnyValue:
      description: 'Can be: string, number, integer, date, boolean'
    Voucher:
      allOf:
        - $ref: '#/components/schemas/Document'
        - type: object
          properties:
            reimbursement:
              type: number
            comment:
              type: string
    Content:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
        personId:
          $ref: '#/components/schemas/Uuid'
        contentType:
          type: string
        isTemporary:
          type: boolean
        signatureType:
          type: string
          enum:
            - EU
        signatureUrl:
          type: string
        name:
          type: string
        description:
          type: string
        qrScan:
          type: string
          description: >-
            Decoded fiscal QR string as sent in the `qrScan` request header on
            POST. Omitted when the resource has no QR data attached. Currently
            populated for Portuguese receipts.
        scanResult:
          type: object
          readOnly: true
          properties:
            id:
              $ref: '#/components/schemas/Uuid'
            amount:
              type: number
              format: double
            taxAmount:
              type: number
              format: double
            currency:
              type: string
            purchaseDate:
              type: string
            categoryIds:
              type: array
              items:
                $ref: '#/components/schemas/Uuid'
            categoryId:
              $ref: '#/components/schemas/Uuid'
      example:
        id: 62bfaa54dc9341819cd6f4ff4ae39f44
        personId: 063ee3c7fa4b4728b418097299447f9d
        contentType: application/pdf
        isTemporary: true
        signatureType: null
        signatureUrl: null
        name: receipt-photo.jpg
        description: Receipt photo
        qrScan: >-
          A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111
          26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116
        scanResult:
          id: a185160800524ac68cbf0a18ad59649b
          amount: 135
          taxAmount: 23
          currency: SEK
          purchaseDate: '2023-04-20'
          categoryIds:
            - 575ba2572de74f38b947a07df93a2909
            - 350dadb020694421aebc1d9473fa64a9
          categoryId: 575ba2572de74f38b947a07df93a2909
    Representation:
      type: object
      properties:
        type:
          type: string
        guestListAttached:
          type: boolean
          default: false
        includesLiquor:
          type: boolean
          default: false
        numberOfGuests:
          type: integer
        numberOfExternalGuests:
          type: integer
        place:
          type: string
        tip:
          type: number
          format: double
          minimum: 0
          deprecated: true
          description: >
            Deprecated. Tip is now a root receipt verification property (`tip`).
            A non-negative decimal number in the receipt's currency. This
            property is kept for backwards compatibility and mirrors the root
            value.
        guestListAttachment:
          $ref: '#/components/schemas/Content'
        guests:
          type: array
          items:
            $ref: '#/components/schemas/Guest'
    ArrayOfTaxRates:
      type: array
      items:
        type: object
        properties:
          taxRateId:
            $ref: '#/components/schemas/Uuid'
          rate:
            type: number
            format: double
          taxAmount:
            type: number
            format: double
    BusinessTrip:
      allOf:
        - $ref: '#/components/schemas/Voucher'
        - type: object
          properties:
            type:
              type: string
              enum:
                - CarSpecification
            distance:
              type: number
            distanceUnit:
              type: string
              enum:
                - KM
                - MILES
              readOnly: true
            travelDate:
              type: string
              format: date-time
            description:
              type: string
            roundTrip:
              type: boolean
            route:
              type: array
              items:
                $ref: '#/components/schemas/PlaceWithCoords'
            customFields:
              $ref: '#/components/schemas/ArrayOfCustomFields'
    CarTypeEnum:
      type: string
      enum:
        - PRIVATE_CAR
        - COMPANY_CAR
        - COMPANY_CAR_DIESEL
        - COMPANY_CAR_OTHER
        - COMPANY_CAR_ELECTRICITY
        - COMPANY_CAR_ELECTRICITY_HOME
        - COMPANY_CAR_ELECTRICITY_PUBLIC
        - COMPANY_CAR_LTE_1400CC_PETROL
        - COMPANY_CAR_LTE_1400CC_LPG
        - COMPANY_CAR_LTE_1600CC_DIESEL
        - COMPANY_CAR_1401_2000CC_PETROL
        - COMPANY_CAR_1401_2000CC_LPG
        - COMPANY_CAR_1601_2000CC_DIESEL
        - COMPANY_CAR_GT_2000CC_PETROL
        - COMPANY_CAR_GT_2000CC_LPG
        - COMPANY_CAR_GT_2000CC_DIESEL
        - MOTOR_CYCLE
        - MOTOR_CYCLE_GT_125CC
        - MOTOR_CYCLE_LTE_125CC
        - MOPED
        - ALL_TERRAIN_VEHICLE
        - SNOW_MOBILE
        - BOAT_WITH_ENGINE
        - BOAT_WITH_ENGINE_GT_50HK
        - BOAT_WITH_ENGINE_LTE_50HK
        - PRIVATE_CAR_OR_MOTOR_CYCLE
        - PRIVATE_CYCLE_OR_MOPED
        - OTHER_VEHICLE
        - MOPED_OR_SCOOTER
        - CYCLE_OR_WALKING
        - PUBLIC_TRANSPORTATION
        - PRIVATE_CAR_3HP_LESS
        - PRIVATE_CAR_4HP
        - PRIVATE_CAR_5HP
        - PRIVATE_CAR_6HP
        - PRIVATE_CAR_7HP_MORE
        - MOTOR_CYCLE_1_2HP
        - MOTOR_CYCLE_3_5HP
        - MOTOR_CYCLE_5HP_MORE
        - PRIVATE_CAR_COMMUTER_HOME
    Passenger:
      type: object
      properties:
        name:
          type: string
        distance:
          type: number
          format: double
    Document:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
          readOnly: true
    Guest:
      type: object
      properties:
        name:
          type: string
        company:
          type: string
    PlaceWithCoords:
      type: object
      properties:
        place:
          type: string
          example: Ludvika, Sverige
        latitude:
          type: string
          example: '60.1523510'
        longitude:
          type: string
          example: '15.1919879'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````