cURL
Example
curl --request POST \ --url https://{cluster}.voucherify.io/v1/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-App-Id: <api-key>' \ --header 'X-App-Token: <api-key>' \ --data '{ "event": "event-name", "customer": { "source_id": "referee-source_id" }, "referral": { "code": "voucher-code", "referrer_id": "referrer-source_id" }}'
{ "object": "event", "type": "cart_abandoned", "customer": { "id": "cust_ypePCF6IU6fnUvec6RMXZuH4", "name": "John Doe", "email": "john@voucherify.io", "source_id": "source_customer_event", "metadata": { "prop": "value" }, "object": "customer" }, "referral": null, "loyalty": null }
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.
1 - 300
Show child attributes
event
Was this page helpful?