Skip to content

Events API ​

Services report events to the cloud with a JSON POST request.

http
POST https://dev.resto.cloud/event
Content-Type: application/json

{ "type": "order.created", "orderId": "42" }

The body can be any JSON object. The cloud stores it and returns its key — the SHA-256 hash of the body:

json
{
  "status": "ok",
  "key": "9f2c…",
  "saved": { "key": "9f2c…", "value": { "type": "order.created", "orderId": "42" } },
  "duplicated": false
}

Sending the same body again does not create a second record: the existing one is returned with the same key. Include something unique (an id or a timestamp) in events that must be stored separately.

On a server error the response is 500 with { "error": "Internal Server Error" }.

Resto Dev Cloud · development environment