Event-driven operating model
Purpose | Agents v2 located in restaurants can send events to White Server. White Server can forward events to aggregators using https Post callback. To receive callbacks, the aggregator must have a web server. In particular, agents can track changes in r_keeper orders. |
|---|---|
| Supported agent version | v2 |
Receiving events by the aggregator
To subscribe to events, the aggregator needs to tell the White Server team:
- Address of its callback recipient server — multiple URLs can be specified
- List of events to receive.
White Server sends events using Post requests:
- Body — in the form of a json request
- Headers — a Signature field has been added here to check the hash code of the body content, verifying the sender.
Event types:
The aggregator receives all events of the specified type for the specified callback from all restaurants to which the aggregator has access under the license.
Body format
JSON
|
Response contains the model, its description in particular for Order can be found in a separate article.
Parameter | Type | Mandatory | Description |
|---|---|---|---|
| agentGuid | guid | yes | Restaurant Agent ID |
| dateTimeServerReceiveEventFromAgent | string dateTime | yes | Date and time of receiving the White Server event from the agent. The time of sending the event to the aggregator by callback may differ and be slightly longer |
| eventGuid | guid | yes | Unique event identifier generated by the agent |
| eventType | string enum | yes | Event type, options available: |
| objectId | int | yes | Restaurant code in the licensing system |
Example of an event
Example Headers:
JSON
|
Example Body:
JSON
|