Create a voucher

Create a voucher and attribute it to a specific membership.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

pidstringRequiredformat: "uuid"
Loyalty Program ID

Request

This endpoint expects an object.
rewardIdstringRequiredformat: "uuid"
Reward id
codestringOptional<=128 characters
Code generated to attribute reward to a contact
contactIdlongOptional
Contact to attribute the reward
expirationDatestringOptional
Reward expiration date
loyaltySubscriptionIdstringOptional
One of contactId or loyaltySubscriptionId is required
metamap from strings to anyOptional

Offer meta information (key/value object)

valuedoubleOptional
Value of the selected reward config

Response

Voucher successfully created
codestring or null
Generated code
consumedAtstring or null
Timestamp for when this reward was consumed
contactIdlong or null
Id of the contact that attributed the reward
createdAtdatetime or null
Timestamp for when this reward was created
expirationDatedatetime or null
Expiration date of the reward
idstring or nullformat: "uuid"
Unique identifier
loyaltyProgramIdstring or null
Loyalty Program Id to which attributed reward belongs
metamap from strings to any or null
Additional data to define the reward
rewardIdstring or null
Unique identifier for the reward
updatedAtdatetime or null
Timestamp for when this reward was updated
valuedouble or null
Value of the selected reward config

Errors