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
Request
- Base URLhttps://api.voucherify.io
- URLhttps://api.voucherify.io/client/v1/events
- Auth
- API key in header X-Client-Application-Id and API key in header X-Client-Token
- or OAuth 2Implicit: https://api.voucherify.io/v1/oauth/tokenScopes: client_api, client_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"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.