Skip to main content
PUT
/
voucher-groups
/
{id}
Update a voucher group
curl --request PUT \
  --url https://api.spirii.com/voucher-groups/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "4545",
  "notes": "Voucher group notes",
  "perKwh": 3,
  "currency": "DKK",
  "isSpotPriceBased": false,
  "spotPriceMargin": 26,
  "spotPriceMarginPct": 10,
  "spotPriceMinimum": 24
}
'
{
  "id": 24,
  "name": "AKB2022",
  "perKwh": 2.5,
  "currency": "DKK",
  "isSpotPriceBased": false,
  "spotPriceMargin": null,
  "spotPriceMarginPct": null,
  "spotPriceMinimum": 0.5,
  "createdAt": "2021-01-07T09:21:43.000Z",
  "updatedAt": "2022-11-07T05:56:18.000Z",
  "voucherCount": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Voucher Group ID

Body

application/json

Voucher group update data

name
string

name

Example:

"Kokbjerg"

notes
string
Example:

"notes"

perKwh
number | null

price per kwh

Example:

3

currency
string | null

pricing currency

Example:

"DKK"

isSpotPriceBased
boolean
Example:

false

spotPriceMargin
number | null
Example:

0.5

spotPriceMarginPct
number | null
Example:

0.5

spotPriceMinimum
number | null
Example:

0.5

Response

Voucher Group update response

id
integer
required

id

Example:

1

name
string
required

name

Example:

"Kokbjerg"

perKwh
number | null
required

price per kwh

Example:

3

currency
string | null
required

pricing currency

Example:

"DKK"

isSpotPriceBased
boolean
required
Example:

false

spotPriceMargin
number | null
required
Example:

0.5

spotPriceMarginPct
number | null
required
Example:

0.5

spotPriceMinimum
number | null
required
Example:

0.5

createdAt
string<timestamp>
required

Created date

Example:

"2021-04-20T14:38:20.000Z"

updatedAt
string<timestamp>
required

Updated date

Example:

"2021-04-20T14:38:20.000Z"

voucherCount
integer
required
Example:

1