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

# Create a new reimbursement rate



## OpenAPI

````yaml /openapi/reimbursement/rates/openapi.yaml post /v1
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:
    post:
      tags:
        - Reimbursement Rates
      summary: Create a new reimbursement rate
      operationId: createReimbursementRate
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateReimbursementRateDto'
      responses:
        '201':
          description: Successfully created 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 is not permitted.
        '404':
          description: The requested location does not exist or you do not have access.
components:
  schemas:
    CreateReimbursementRateDto:
      type: object
      properties:
        locationId:
          type: integer
          description: ID of the location.
        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
        files:
          type: array
          items:
            type: string
            format: binary
          description: File attachments associated with the rate.
          nullable: true
      required:
        - locationId
        - pricePerKwh
        - currency
        - validFrom
    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

````