Events API
The Events API is designed to facilitate the submission and processing of events in a loyalty system. This API provides flexible functionality to support various event types, including standard and custom events, while accommodating both single and bulk submissions.
Key Features
REST-Like Behavior
The API follows REST principles but has variations in the payload format depending on the event type.
The
custom-eventsendpoint supports bulk submissions, making it ideal for handling multiple events in one request.
Event Submission
custom-eventEndpoint:Accepts a single custom event.
Fully compliant with REST standards.
Best suited for cases where individual event submission is required.
custom-eventsEndpoint:Accepts an array of custom events, supporting bulk submission.
Payload size can be up to 1GB. However, it is recommended to keep the payload under 1MB to maintain optimal performance.
Ordered and Unordered Modes
The API can operate in two modes:
Ordered Mode: Ensures that all events associated with the same member (
memberExternalIdormemberInternalId) are processed in the order they were submitted.If
memberInternalIdis missing, the system performs a lookup to resolvememberExternalIdtomemberInternalId. This process blocks event execution until the lookup is completed.
Unordered Mode: Events are processed as they arrive, and there is no guarantee of sequential processing.
Multi-System Support
The
spaceIdparameter allows the API to address specific loyalty spaces.This enables the coexistence of multiple loyalty systems within the same infrastructure, ensuring clear separation and targeted event handling.
Authentication and Communication
The API uses HTTP/HTTPS as the communication protocol.
Requests are authenticated via ApiKey, ensuring secure access to the endpoint.