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

# Update an existing reimbursement rate



## OpenAPI

````yaml /openapi/reimbursement/rates/openapi.yaml patch /v1/{id}
openapi: 3.0.3
info:
  title: Reimbursement Rates
  description: API for managing reimbursement rates.
  version: '0.1'
servers:
  - url: https://api.spirii.com/reimbursement/rates
security:
  - BearerAuth: []
tags:
  - name: Reimbursement Rates
    description: Operations related to reimbursement rates.
paths:
  /v1/{id}:
    patch:
      tags:
        - Reimbursement Rates
      summary: Update an existing reimbursement rate
      operationId: updateReimbursementRate
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the reimbursement rate to update.
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReimbursementRateDto'
      responses:
        '200':
          description: Successfully updated the reimbursement rate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReimbursementRateDto'
        '400':
          description: Invalid request body.
        '401':
          description: Missing or invalid authorization token.
        '403':
          description: Access to the requested location or rate is not permitted.
        '404':
          description: Reimbursement rate not found.
components:
  schemas:
    UpdateReimbursementRateDto:
      type: object
      minProperties: 1
      properties:
        pricePerKwh:
          type: number
          format: float
          minimum: 0.0001
          description: Price per kilowatt-hour.
        currency:
          $ref: '#/components/schemas/Currency'
        validFrom:
          type: string
          format: date-time
          description: Start date of validity.
        validUntil:
          type: string
          format: date-time
          description: End date of validity.
          nullable: true
    ReimbursementRateDto:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the reimbursement rate.
        locationId:
          type: integer
          description: ID of the location.
        pricePerKwh:
          type: number
          format: float
          description: Price per kilowatt-hour.
        currency:
          $ref: '#/components/schemas/Currency'
        validFrom:
          type: string
          format: date-time
          description: Start date of validity.
        validUntil:
          type: string
          format: date-time
          description: End date of validity.
          nullable: true
        lockedBy:
          type: string
          description: >-
            Only set if the rate is locked. Contains reference to locking
            business entity, e.g. expense report id.
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the rate was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the rate was last updated.
      required:
        - id
        - locationId
        - pricePerKwh
        - currency
        - validFrom
        - createdAt
        - updatedAt
    Currency:
      type: string
      enum:
        - CHF
        - CZK
        - DKK
        - EUR
        - GBP
        - NOK
        - PLN
        - SEK
        - USD
      description: ISO 4217 currency code.
      example: EUR
  securitySchemes:
    BearerAuth:
      scheme: bearer
      bearerFormat: JWT
      description: Authorization via a JWT bearer token.
      type: http

````