Skip to main content
PATCH
/
v1
/
{id}
Update an existing reimbursement rate
curl --request PATCH \
  --url https://api.spirii.com/reimbursement/rates/v1/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pricePerKwh": 1.0001,
  "currency": "EUR",
  "validFrom": "2023-11-07T05:31:56Z",
  "validUntil": "2023-11-07T05:31:56Z"
}
'
{
  "id": 123,
  "locationId": 123,
  "pricePerKwh": 123,
  "currency": "EUR",
  "validFrom": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "validUntil": "2023-11-07T05:31:56Z",
  "lockedBy": "<string>"
}

Authorizations

Authorization
string
header
required

Authorization via a JWT bearer token.

Path Parameters

id
integer
required

The ID of the reimbursement rate to update.

Body

application/json
pricePerKwh
number<float>

Price per kilowatt-hour.

Required range: x >= 0.0001
currency
enum<string>

ISO 4217 currency code.

Available options:
CHF,
CZK,
DKK,
EUR,
GBP,
NOK,
PLN,
SEK,
USD
Example:

"EUR"

validFrom
string<date-time>

Start date of validity.

validUntil
string<date-time> | null

End date of validity.

Response

Successfully updated the reimbursement rate.

id
integer
required

Unique identifier of the reimbursement rate.

locationId
integer
required

ID of the location.

pricePerKwh
number<float>
required

Price per kilowatt-hour.

currency
enum<string>
required

ISO 4217 currency code.

Available options:
CHF,
CZK,
DKK,
EUR,
GBP,
NOK,
PLN,
SEK,
USD
Example:

"EUR"

validFrom
string<date-time>
required

Start date of validity.

createdAt
string<date-time>
required

Timestamp when the rate was created.

updatedAt
string<date-time>
required

Timestamp when the rate was last updated.

validUntil
string<date-time> | null

End date of validity.

lockedBy
string | null

Only set if the rate is locked. Contains reference to locking business entity, e.g. expense report id.