/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
memberfield is optional but recommended for user-level targeting - The
eventobject must contain atype, optionalsubType, adateTime, and any additionalpayloadortags - Events are used for behavioral triggers and may be linked to loyalty campaigns or communication rules
Request Details
Method & URL
POST /event
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | API key for authentication |
x-source-type | string | Yes | Origin of the event (e.g., POS, Web) |
x-source-name | string | Yes | Name of the client or integration system |
x-pos-id | string | Yes | POS terminal identifier |
x-branch-id | string | Yes | Branch 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
| Field | Type | Description |
|---|---|---|
member.phoneNumber | string | Optional. Phone number of the associated member |
event.type | string | Required. The primary type of the event (e.g., signup, visit) |
event.subType | string | Optional. More specific classification of the event |
event.dateTime | string | Required. ISO timestamp of when the event occurred |
event.payload | object | Optional. Additional data about the event |
event.tags | array | Optional. Tags to classify or filter the event |
Related Use Cases
- Logging behavioral actions such as
opened_app,completed_tutorial, orvisited_store - Triggering loyalty rules or point issuance based on custom events
- Segmenting members for campaigns using external interaction data