Skip to main content
PATCH
/
v2
/
voucher-groups
/
{id}
Update an existing voucher group
curl --request PATCH \
  --url https://api.spirii.com/v2/voucher-groups/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Premium Voucher Group",
  "notes": "This is a comment.",
  "customerId": 2001,
  "pricing": {
    "tariffId": "2606f342-2c3e-4f7b-9034-dbaac5e62c82"
  }
}
'
{
  "id": 1,
  "name": "Premium Voucher Group",
  "pricing": {
    "tariffId": "2606f342-2c3e-4f7b-9034-dbaac5e62c82"
  },
  "createdAt": "2025-06-03T12:00:00.000Z",
  "updatedAt": "2025-06-03T12:00:00.000Z",
  "companyId": 2001,
  "operatorId": 2001,
  "notes": "This is a comment.",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Path Parameters

id
number
required

Used to identify the voucher group throughout the Spirii system

Body

application/json

The voucher group data to update.

name
string

The voucher group name.

Maximum string length: 30
Example:

"Premium Voucher Group"

notes
string

Optional comment about the voucher.

Maximum string length: 30
Example:

"This is a comment."

customerId
number

Customer the voucher group will be created for. If not provided, the voucher group is owned directly by the operator.

Example:

2001

pricing
object

Pricing configuration. On update you may send only the fields you want to change.

Response

The voucher group has been successfully updated.

id
number
required

Unique identifier for the voucher group.

Example:

1

name
string
required

The voucher group name.

Maximum string length: 30
Example:

"Premium Voucher Group"

pricing
object
required

With a voucher applied, the drivers charges at a lowered price overwriting the standard tariff on the location.

createdAt
string<date-time>
required

The date and time when the voucher group was created.

Example:

"2025-06-03T12:00:00.000Z"

updatedAt
string<date-time>
required

The date and time when the voucher group was last updated.

Example:

"2025-06-03T12:00:00.000Z"

companyId
number

The owner of the group that the associated vouchers will belong to. If not provided, the voucher group is owned directly by the operator.

Example:

2001

operatorId
number

The owner of the group that the associated vouchers will belong to. If not provided, the voucher group is owned directly by the operator.

Example:

2001

notes
string

Optional comment about the voucher.

Maximum string length: 30
Example:

"This is a comment."

deletedAt
string<date-time> | null