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 required for associating the event with specific users
  • The event object must contain a type, a dateTime and a payload (send {} when there is none), and may add a subType and tags
  • Events are used for behavioral triggers and may be linked to loyalty campaigns or communication rules

Request Details​

Method & URL​

POST /event

See API Servers for the base URL to use in place of {{server}}.

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 Body​

FieldDescriptionTypeMandatory
memberThe member the event belongs toMemberY
event.typePrimary type of the event, e.g. signup, visitstringY
event.subTypeMore specific classificationstringN
event.dateTimeWhen the event happened, ISO 8601stringY
event.payloadEvent data. Send {} when there is noneobjectY
event.tagsTags to classify the eventarrayN

Any other field in the body is rejected with 1001.

Request Example​

curl --location --request POST 'https://{{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​

FieldDescriptionType
statussuccessstring
{
"status": "success"
}

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"
}
}

Error Codes​

CodeDescription
203Member not found
801Invalid event object
803Error publishing event

Field Reference​

FieldTypeDescription
memberobjectRequired. Member identifier (see Member reference)
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.payloadobjectRequired. Event data; send {} when there is none
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