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>=1
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
Generated code
consumedAtstring
Timestamp for when this reward was consumed
contactIdlong
Id of the contact that attributed the reward
createdAtdatetime
Timestamp for when this reward was created
expirationDatedatetime
Expiration date of the reward
idstringformat: "uuid"
Unique identifier
loyaltyProgramIdstring
Loyalty Program Id to which attributed reward belongs
metamap from strings to any
Additional data to define the reward
rewardIdstring
Unique identifier for the reward
updatedAtdatetime
Timestamp for when this reward was updated
valuedouble
Value of the selected reward config

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error