Skip to main content

/event

Overview

This endpoint is used to send information about external events associated with a member. These events can be used by the loyalty engine to trigger segmentation, automation, and behavior-based rewards.

When to Use This Endpoint

Use this endpoint in the following cases:

  • To report external events such as sign-ups, tutorials, or purchases
  • To initiate workflows or assign loyalty rewards based on actions
  • To enrich member profiles for segmentation purposes

Key Considerations

  • The member field is optional but recommended for user-level targeting
  • The event object must contain a type, optional subType, a dateTime, and any additional payload or tags
  • Events are used for behavioral triggers and may be linked to loyalty campaigns or communication rules

Request Details

Method & URL

POST /event

Headers

HeaderTypeRequiredDescription
x-api-keystringYesAPI key for authentication
x-source-typestringYesOrigin of the event (e.g., POS, Web)
x-source-namestringYesName of the client or integration system
x-pos-idstringYesPOS terminal identifier
x-branch-idstringYesBranch or store location identifier

Request Example

curl --location --request POST '{{server}}/v1/event' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{api-key}}' \
--header 'x-source-type: {{source-type}}' \
--header 'x-source-name: {{source-name}}' \
--header 'x-pos-id: POS001' \
--header 'x-branch-id: BR001' \
--data-raw '{
"member": {
"phoneNumber": "1234567890"
},
"event": {
"type": "signup",
"subType": "web",
"dateTime": "2025-06-23T13:29:39.487Z",
"payload": {
"campaign": "summer2025",
"referrer": "social"
},
"tags": ["web", "referral"]
}
}'

Success Response

{
"status": "success",
"data": {}
}

Error Response Examples

Server Error

{
"status": "error",
"error": {
"code": "500",
"message": "Server error"
}
}

Invalid Phone Number

{
"status": "error",
"error": {
"code": "1001",
"message": "phoneNumber is not allowed",
"path": "body.phoneNumber"
}
}

Field Reference

FieldTypeDescription
member.phoneNumberstringOptional. Phone number of the associated member
event.typestringRequired. The primary type of the event (e.g., signup, visit)
event.subTypestringOptional. More specific classification of the event
event.dateTimestringRequired. ISO timestamp of when the event occurred
event.payloadobjectOptional. Additional data about the event
event.tagsarrayOptional. Tags to classify or filter the event
  • Logging behavioral actions such as opened_app, completed_tutorial, or visited_store
  • Triggering loyalty rules or point issuance based on custom events
  • Segmenting members for campaigns using external interaction data