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

# Update an ExpenseTempItem by id

> Update a temporary expense item by its identifier.



## OpenAPI

````yaml /openapi-specs/cleemy-expenses-v3.yaml put /api/v3/expenseTempItems/{expenseTempItemId}
openapi: 3.1.0
info:
  title: Lucca Expenses
  version: '1.0'
  description: |
    Welcome on the documentation for the Lucca Expenses API.
  contact:
    name: API Support
    url: https://support.lucca.fr
    email: contact@luccasoftware.com
  license:
    name: Unlicensed
    url: https://www.luccasoftware.com
servers:
  - url: https://{host}
    description: Your Lucca account URL.
    variables:
      host:
        default: example.ilucca.net
        description: >-
          The URL of your dedicated Lucca account: `{account}.{env}.{region}`.


          Account reflects your company name. Env indicates the environment.
          Region depends on your server location.


          **Please, use your test or sandbox environments (and not your
          production env.) for testing purposes.**


          Environments:

          - `ilucca`: production environment for customers.

          - `ilucca-test`: test environment for customers.

          - `ilucca-demo`: demo environment for prospects.


          Regions:

          - `.ch` for Swiss located accounts.

          - `.net` for the others.


          Regarding sandboxes, the pattern differs:
          `https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com`,
          where:

          - `{sandboxName}` is automatically generated upon creation.

          - `{server}` may be "eu1", "eu2" or "ch1".
security: []
tags:
  - name: ExpenseTempItems
    description: Singular expenses.
  - name: ExpenseClaims
    description: Collection of expenses submitted for approval.
  - name: ExpenseClaimItems
    description: Expenses included in an expenseClaim
  - name: CreateExpenseAccountingExport
    description: Service used to create an export and retrieve the exported entry lines.
paths:
  /api/v3/expenseTempItems/{expenseTempItemId}:
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - schema:
          type: integer
        name: expenseTempItemId
        in: path
        required: true
        description: Unique identifier of the ExpenseTempItem.
    put:
      tags:
        - ExpenseTempItems
      summary: Update an ExpenseTempItem by id
      description: Update a temporary expense item by its identifier.
      operationId: put-api-v3-expenseTempItems-expenseTempItemId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseTempItem'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ExpenseTempItem'
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '403':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
components:
  parameters:
    Authorization:
      name: Authorization
      required: true
      description: 'API key. Value must be formatted like so: `lucca application={api_key}`.'
      in: header
      schema:
        type: string
  schemas:
    ExpenseTempItem:
      type: object
      x-examples:
        example-1:
          id: 11022
          purchasedOn: '2016-06-08T00:00:00'
          originalTransaction:
            grossAmount: 45.26
            currencyId: GBP
            currency:
              id: GBP
              symbol: £
            isExpenseAbroad: false
          processedAmounts:
            amount: 57.9
            reimbursedAmount: 57.9
            grossAmount: 57.9
            currencyId: EUR
            currency:
              id: EUR
              name: Euro
              url: https://lucca.ilucca.net/api/v3/currencies/EUR
            netAmount: 57.9
            vatBases:
              - countryVatRateId: 2
                countryVatRate:
                  id: 2
                  name: null
                  url: https://lucca.ilucca.net/api/v3/countryvatrates/2
                vatAmount: 0
                amountExcludingVat: 57.9
                isDeprecatedVat: false
          expenseNatureId: 1
          mileage:
            distance: null
            power: null
            waypoints: null
          quantity: 1
          effectiveQuantity: 3
          attendees:
            internal:
              - id: 338
                displayName: Catteau Bruno
            external:
              - id: 46
                displayName: Test Corp / Test TS
          axisSections:
            - id: 658
              code: RDEV
              name: Recherche & Développement
              axisId: 4
          customFields:
            '1':
              code: 'false'
              name: Non
          merchant: Pub The Wellington
          comment: Exemple dépense
          originalReceipt: null
          receiptPreview: null
          warnings:
            dayOff: false
            isConstrained: false
            showDayOffWarning: false
            isAboveWarningLimit: false
            isAbsoluteLimitOverridden: false
          authorizedActions:
            isCancellable: true
            isEditable: true
          source:
            value: 6
            id: 6
            code: Api
            name: API
          ownerId: 361
          paymentMethod:
            value: 0
            id: 0
            code: User
            name: Collaborateur
          status:
            value: 2
            id: 2
            code: Valid
            name: Valide
      examples: []
      title: The ExpenseTempItem Resource
      description: >-
        The `ExpenseTempItem`, or "temporary expense" is an expense that has not
        yet been declared (within an expense report) by its owner (the user who
        made the expense). Once submitted within an expense report, the expense
        turns into an `ExpenseClaimItem`.
      x-tags:
        - ExpenseTempItems
      properties:
        id:
          type: integer
          minimum: 1
          readOnly: true
        purchasedOn:
          type: string
          format: date
          description: Day the expense was made.
        originalTransaction:
          type: object
          required:
            - grossAmount
            - currencyId
          description: Expense amount in original currency.
          properties:
            grossAmount:
              type: number
              multipleOf: 0.01
            currencyId:
              $ref: '#/components/schemas/CurrencyId'
            isExpenseAbroad:
              type: boolean
              default: false
              description: >-
                Whether the expense was made in a different country than the
                owner establishment's.
        processedAmounts:
          type: object
          description: Various amounts in the establishment's currency.
          required:
            - grossAmount
            - currencyId
          properties:
            grossAmount:
              type: number
              multipleOf: 0.01
              description: >-
                Original transaction amount converted into the establishment's
                currency.
            currencyId:
              $ref: '#/components/schemas/CurrencyId'
            currency:
              allOf:
                - $ref: '#/components/schemas/Currency'
                - readOnly: true
            netAmount:
              type: number
              multipleOf: 0.01
              description: The converted amount after the expense policy has been applied.
              readOnly: true
            vatBases:
              type: array
              readOnly: true
              items:
                type: object
                properties:
                  countryVatRateId:
                    type: integer
                    minimum: 1
                  countryVatRate:
                    type: object
                    description: Applicable VAT rate for this amount.
                    properties:
                      id:
                        type: integer
                        minimum: 1
                      name:
                        type: string
                      url:
                        type: string
                        format: uri
                  vatAmount:
                    type: number
                    multipleOf: 0.01
                  amountExcludingVat:
                    type: number
                    multipleOf: 0.01
        expenseNatureId:
          type: integer
          description: >-
            Nature of the expense: Meals, Train, Taxi, Hotels, Taxi, Mileage...
            List depends on the app configuration.
          minimum: 1
        mileage:
          type:
            - object
            - 'null'
          description: Additional information when the expense type is mileage.
          properties:
            distance:
              type: number
              description: Distance where the unit depends on the establishment.
            power:
              type: number
              description: Tax horsepower of the vehicle.
            waypoints:
              type: array
              description: The collection of waypoints including intermediate waypoints.
              items: {}
        quantity:
          type: integer
          description: The quantity when the expense type is 'Quantity'.
          minimum: 1
          default: 1
        effectiveQuantity:
          type: integer
          minimum: 1
          description: >-
            Calculated quantity when the expense type is 'Quantity' or
            'Invitations' (number of attendees).
          readOnly: true
        attendees:
          type:
            - object
            - 'null'
          description: Additional information when the expense type is 'Invitation'.
          properties:
            internal:
              type: array
              description: 'Attendees who work for the company (ie: Users in the system).'
              items:
                $ref: '#/components/schemas/SimpleUser'
            external:
              type: array
              description: 'External attendees (eg: clients, candidates).'
              items:
                type: object
                description: Id of the custom field.
                properties:
                  id:
                    type: integer
                    minimum: 1
                  displayName:
                    type: string
        axisSections:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/AxisSection'
        customFields:
          description: Values for custom fields.
          type:
            - object
            - 'null'
          additionalProperties:
            type: object
            properties:
              code:
                type: string
                description: Value inputted by the user.
              name:
                type: string
                description: >-
                  Label corresponding to the input value based on the
                  configuration (eg: 'Yes' for checkbox).
                readOnly: true
        merchant:
          type:
            - string
            - 'null'
          description: Merchant of the expense.
        comment:
          type:
            - string
            - 'null'
        expenseReceipts:
          type:
            - array
            - 'null'
          description: >-
            The expense receipts (PDF file, image, ...) attached to this
            expense. Technically, there could be more than one, but in reality,
            there’s usually just one.


            **Important**: to attach a receipt when creating or updating an
            expense, you must first upload the file via `POST
            /lucca-files/api/uploads`, then create an `ExpenseReceipt` via `POST
            /api/v3/expenseReceipts` (providing the `uploadId`), and finally
            reference the receipt by its `id` here. Passing the file upload ID
            directly will result in a `403 Forbidden` error. See the [Attaching
            receipts
            guide](/api-reference/legacy/cleemy-expenses/guides/attaching-receipts).
          items:
            $ref: '#/components/schemas/ExpenseReceipt'
        authorizedActions:
          type: object
          description: Authorized actions on the expense for the current user.
          properties:
            isCancellable:
              type: boolean
              description: Expense can be deleted by the current authenticated user.
            isEditable:
              type: boolean
              description: Expense can be edited by the current authenticated user.
          readOnly: true
        sourceId:
          $ref: '#/components/schemas/SourceId'
        source:
          $ref: '#/components/schemas/Enum'
        ownerId:
          type: integer
          description: Unique identifier of the user that made this expense.
        paymentMethodId:
          $ref: '#/components/schemas/PaymentMethodId'
        paymentMethod:
          $ref: '#/components/schemas/Enum'
        statusId:
          $ref: '#/components/schemas/StatusId'
        status:
          $ref: '#/components/schemas/Enum'
        deviceId:
          type: string
          const: Web
      required:
        - id
        - purchasedOn
        - paymentMethodId
        - expenseNatureId
        - ownerId
        - deviceId
        - quantity
        - originalTransaction
        - processedAmounts
    CurrencyId:
      title: CurrencyId
      description: 'ISO code of the currency (eg: ''EUR'', ''USD'', ''GBP'', ...).'
      type: string
    Currency:
      title: Currency
      type: object
      properties:
        id:
          $ref: '#/components/schemas/CurrencyId'
        name:
          type: string
          description: 'Label of the currency (eg: Pound sterling).'
        url:
          type: string
          format: uri
      description: ''
    SimpleUser:
      description: ''
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          minLength: 1
        url:
          type: string
          minLength: 1
        displayName:
          type: string
          minLength: 1
        modifiedOn:
          type: string
          minLength: 1
        lastName:
          type: string
          minLength: 1
        firstName:
          type: string
          minLength: 1
        login:
          type: string
          minLength: 1
        mail:
          type: string
          minLength: 1
        dtContractStart:
          type: string
          minLength: 1
        dtContractEnd: {}
        birthDate:
          type: string
          minLength: 1
        employeeNumber:
          type: string
          minLength: 1
        calendar:
          type: object
          properties:
            id:
              type: number
            url:
              type: string
              minLength: 1
            name:
              type: string
              minLength: 1
          required:
            - id
            - url
            - name
        culture:
          type: object
          properties:
            id:
              type: number
            name:
              type: string
              minLength: 1
            url:
              type: string
              minLength: 1
          required:
            - id
            - name
            - url
        picture:
          type: object
          properties:
            id:
              type: string
              minLength: 1
            url:
              type: string
              minLength: 1
            name:
              type: string
              minLength: 1
          required:
            - id
            - url
            - name
        applicationData:
          type: object
          properties:
            profile_figgo:
              type: object
              properties:
                id:
                  type: number
                name:
                  type: string
                  minLength: 1
                url:
                  type: string
                  minLength: 1
              required:
                - id
                - name
                - url
            profile_utime:
              type: object
              properties:
                id:
                  type: number
                name:
                  type: string
                  minLength: 1
                url:
                  type: string
                  minLength: 1
              required:
                - id
                - name
                - url
          required:
            - profile_figgo
            - profile_utime
        legalEntity:
          type: object
          properties:
            id:
              type: number
            name:
              type: string
              minLength: 1
            url:
              type: string
              minLength: 1
          required:
            - id
            - name
            - url
        department:
          type: object
          properties:
            id:
              type: number
            name:
              type: string
              minLength: 1
            url:
              type: string
              minLength: 1
          required:
            - id
            - name
            - url
        manager:
          type: object
          properties:
            id:
              type: number
            name:
              type: string
              minLength: 1
            url:
              type: string
              minLength: 1
          required:
            - id
            - name
            - url
        rolePrincipal:
          type: object
          properties:
            id:
              type: number
            name:
              type: string
              minLength: 1
            url:
              type: string
              minLength: 1
          required:
            - id
            - name
            - url
        habilitedRoles:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            required:
              - id
              - name
              - url
            properties:
              id:
                type: number
              name:
                type: string
                minLength: 1
              url:
                type: string
                minLength: 1
        userWorkCycles:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            required:
              - Id
              - OwnerID
              - WorkCycleID
              - StartsOn
              - EndsOn
            properties:
              Id:
                type: number
              OwnerID:
                type: number
              WorkCycleID:
                type: number
              StartsOn:
                type: string
                minLength: 1
              EndsOn:
                type: string
                minLength: 1
      required:
        - id
        - name
        - url
        - displayName
        - modifiedOn
        - lastName
        - firstName
        - login
        - mail
        - dtContractStart
        - birthDate
        - employeeNumber
        - calendar
        - culture
        - picture
        - applicationData
        - legalEntity
        - department
        - manager
        - rolePrincipal
        - habilitedRoles
        - userWorkCycles
      x-examples:
        example-1:
          id: 416
          name: John Doe
          url: http://lucca.test/api/users/1
          displayName: Doe John
          modifiedOn: '2015-09-07T10:20:06.583'
          lastName: DOE
          firstName: John
          login: jdoe
          mail: no-reply@lucca.fr
          dtContractStart: '2014-09-01T00:00:00'
          dtContractEnd: null
          birthDate: '1989-12-22T00:00:00'
          employeeNumber: '00057'
          calendar:
            id: 1
            url: http://lucca.test/api/v3/publicHolidayCalendars/1
            name: Jours fériés en France
          culture:
            id: 1036
            name: français (France)
            url: http://lucca.test/api/v3/cultures/1036
          picture:
            id: 74d381db-dd4d-4f64-bc1e-582d806e58a8
            url: >-
              http://lucca.test/api/v3/files/74d381db-dd4d-4f64-bc1e-582d806e58a8
            name: jdoe.png
          applicationData:
            profile_figgo:
              id: 1
              name: Cadre (218 jours)
              url: https://lucca.local.dev/api/v3/leaveprofiles/1
            profile_utime:
              id: 1
              name: Lucca
              url: >-
                https://lucca.local.dev/api/v3/utimeprofile_ede6d6bb22bcb47bf5b839d5f653fc7e41122f0eea37a7786ea9e095537a705c/1
          legalEntity:
            id: 1
            name: Lucca
            url: http://lucca.test/api/v3/legalEntities/1
          department:
            id: 13
            name: BU Timmi/Lucca
            url: http://lucca.test/api/v3/departments/13
          manager:
            id: 383
            name: Roger Smith
            url: http://lucca.test/api/v3/users/383
          rolePrincipal:
            id: 55
            name: User
            url: http://lucca.test/api/v3/roles/55
          habilitedRoles:
            - id: 59
              name: Employee +
              url: http://lucca.test/api/v3/roles/59
            - id: 63
              name: Analytics access
              url: http://lucca.test/api/roles/63
          userWorkCycles:
            - Id: 288
              OwnerID: 416
              WorkCycleID: 6
              StartsOn: '1900-01-01T00:00:00'
              EndsOn: '2015-03-09T00:00:00'
            - Id: 289
              OwnerID: 416
              WorkCycleID: 9
              StartsOn: '2015-03-10T00:00:00'
              EndsOn: '2015-10-13T00:00:00'
            - Id: 317
              OwnerID: 416
              WorkCycleID: 14
              StartsOn: '2015-10-13T00:00:00'
              EndsOn: '9999-12-31T00:00:00'
      title: User
    AxisSection:
      title: The Axis Section resource
      type: object
      properties:
        id:
          type: integer
          minimum: 1
        code:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        multilingualName:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
        ownerId:
          type: integer
          minimum: 1
          readOnly: true
        startOn:
          type: string
          format: date-time
          readOnly: true
        endOn:
          type: string
          format: date-time
          readOnly: true
        active:
          type: boolean
          readOnly: true
        axisId:
          type: integer
          readOnly: true
        parentAxisSections:
          type: array
          items:
            type: object
            description: Axis-section objects
          readOnly: true
        childrenAxisSections:
          type: array
          items:
            type: object
            description: Axis-section objects
          readOnly: true
      description: >-
        You can [read more about this resource
        here](/api-reference/legacy/organization/axis-sections/get-started).
    ExpenseReceipt:
      title: ExpenseReceipt
      type: object
      description: >-
        An expense's receipt. Can be downloaded, either as an original or
        preview file, by following the `href` link. Please note that a 302
        Redirect may be returned, in which case you have to follow the URL
        returned in the `Location` HTTP header.
      properties:
        id:
          type: string
          format: uuid
          description: The ID of this expense receipt.
          example: f0d01fd0-5f27-4061-8dca-bee6318b0103
        originalReceipt:
          description: The original file.
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: The ID of the expense receipt file.
              example: cb0aae89-56c9-48db-9052-48981660e0f7
            name:
              type: string
              example: receipt-f0d01fd0-5f27-4061-8dca-bee6318b0103.pdf
            href:
              type: string
              format: uri
              description: Follow this link to download this expense receipt original file.
              example: >-
                https://example.ilucca.net/api/v3/ExpenseReceipts/f0d01fd0-5f27-4061-8dca-bee6318b0103/originalReceiptFile
            extension:
              type: string
              description: >-
                Suffix to the name of a file (e.g., .txt, .pdf, .jppg) that
                indicates its content type or its intended use.
              example: .pdf
        receiptPreview:
          description: >-
            Lower resolution (i.e. thumbnail) file of the original expense
            receipt.
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: The ID of the expense receipt file (same as original).
              example: cb0aae89-56c9-48db-9052-48981660e0f7
            name:
              type: string
              example: receipt-f0d01fd0-5f27-4061-8dca-bee6318b0103-preview.pdf
            href:
              type: string
              format: uri
              description: >-
                Follow this link to download this expense receipt preview image
                (i.e. thumbnail), even if the original file is not an image
                (e.g. PDF).


                Image size can be negotiated via the `?imageSize` query
                parameter. Available sizes are: `Small | Medium | Large | Full`
                (e.g.: `?imageSize=Small`).


                If the original file is a PDF, then you may request any given
                page (default is the first) by adding the `?pageNumber` query
                parameter (takes an integer that starts at 1).
              example: >-
                https://example.ilucca.net/api/v3/ExpenseReceipts/f0d01fd0-5f27-4061-8dca-bee6318b0103/receiptPreviewFile
            extension:
              type: string
              description: >-
                Suffix to the name of a file (e.g., .txt, .pdf, .jppg) that
                indicates its content type or its intended use.
              example: .pdf
    SourceId:
      title: SourceId
      type: object
      properties:
        id:
          type: string
      description: |-
        The source describes how the expense was created:
        - 0: Legacy
        - 1: OldImport
        - 2: ImportByCb
        - 3: ImportByNature
        - 4: Anytime
        - 5: BudgetInsight
        - 6: Api
        - 7: Ocr
        - 8: Reconciliation
        - 9: InvoiceAggregator
        - 10: EmailAttachments
        - 11: FtpStatementImport
        - 12: CleemyPayment
    Enum:
      title: Enum
      type: object
      description: ''
      properties:
        id:
          type: number
        name:
          type: string
          readOnly: true
        code:
          type: string
    PaymentMethodId:
      title: PaymentMethodId
      description: >-
        How this expense was made: the owner used his money, an enterprise debit
        card, or a Cleemy card:

        - 0: User

        - 1: CorporateCard

        - 3: Cleemy Card
      type: integer
      enum:
        - 0
        - 1
        - 3
    StatusId:
      title: StatusId
      type: object
      description: >-
        Status of the expense.

        - 0: the expense is not valid.

        - 1: the expense has been completed by the system and review is still
        pending

        - 2: the expense has been completed and reviewed and it can be declared.
      properties:
        id:
          type: number
          enum:
            - 0
            - 1
            - 2
  responses:
    ResponseProblem:
      description: Problem
      content:
        application/json:
          schema:
            type: object
            properties:
              Status:
                type: integer
                description: HTTP status code.
                example: 401
              Message:
                type: string
                description: Human readable error message.
                example: Unauthorized

````