Skip to main content
POST
/
v1
Create a new reimbursement rate
curl --request POST \
  --url https://api.spirii.com/reimbursement/rates/v1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form locationId=123 \
  --form pricePerKwh=1.0001 \
  --form currency=EUR \
  --form validFrom=2023-11-07T05:31:56Z \
  --form validUntil=2023-11-07T05:31:56Z \
  --form 'files=<string>' \
  --form files.0.items='@example-file' \
  --form files.1.items='@example-file'
{
  "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.

Body

multipart/form-data
locationId
integer
required

ID of the location.

pricePerKwh
number<float>
required

Price per kilowatt-hour.

Required range: x >= 0.0001
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.

validUntil
string<date-time> | null

End date of validity.

files
file[] | null

File attachments associated with the rate.

Response

Successfully created 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.