Client-side
Track Custom Event (client-side)
To track a custom event, you create an event object.
The event object must be linked to the customer who performs the action. If a customer doesn't exist in Voucherify, the customer will be created.
post/client/v1/events
Headers
originstring hostname required
Indicates the origin (scheme, hostname, and port).
Request body
Example request
{
"referral": {
"referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
},
"loyalty": {
"code": "L-CARD-BUHuH6g"
}
}Response
Returns the event type if the event was received by the application.
Example response
{
"customer": {
"id": "cust_CSnYd37MXmrbS19XCrghjBsv"
}
}