Skip to main content
POST
/
v2
/
vouchers
/
{id}
/
tokens
/
{tokenId}
Associate a token to a voucher
curl --request POST \
  --url https://api.spirii.com/v2/vouchers/{id}/tokens/{tokenId}
{
  "voucherId": 67890,
  "createdAt": "2025-06-03T12:00:00.000Z",
  "id": 67890,
  "customerId": 67890,
  "idTagId": 67890
}

Path Parameters

id
number
required

Used to identify the voucher throughout the Spirii system

tokenId
number
required

Used to identify the token throughout the Spirii system

Response

The token has been successfully associated with a voucher.

voucherId
number<integer>
required

Used to identify the voucher (not to be confused with token/charge key) throughout the Spirii system.

Example:

67890

createdAt
string<date-time>
required

The date and time when the voucher was created.

Example:

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

id
number<integer>

Used to identify the voucher link to customers and tokens.

Example:

67890

customerId
number<integer> | null

Used to identify the customer throughout the Spirii system.

Example:

67890

idTagId
number<integer> | null

Used to identify the id tag (token/charge key) throughout the Spirii system.

Example:

67890