Skip to main content
POST
/
v2
/
voucher-groups
Create a new voucher group
curl --request POST \
  --url https://api.spirii.com/v2/voucher-groups \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Premium Voucher Group",
  "pricing": {
    "tariffId": "2606f342-2c3e-4f7b-9034-dbaac5e62c82"
  },
  "customerId": 2001,
  "notes": "This is a comment.",
  "deletedAt": "2023-11-07T05:31:56Z"
}
'
{
  "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"
}

Body

application/json

The voucher group to be created.

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.

customerId
number
required

Customer the voucher group will be created for. 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

Response

201 - application/json

The voucher group has been successfully created.

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