Event Schema

All events follow the CloudEvent spec and the JSON Event Format.

{
  "specversion": "1.0",
  "type": "so.slope.customer.created",
  "source": "https://api.slope.so/v3/customers",
  "subject": "cust_29b9nYY3UDuU4Et564Oii5mzJof",
  "id": "ev_29b9X1tg7KdBNQOU0U9Ld0ARcb4",
  "time": "2021-04-05T17:31:00Z",
  "merchant": "mch_29b9X1tg7KdBNQOU0U9Ld0ARcb4",
  "datacontenttype": "application/json",
  "data": {
    "id": "cust_29b9nYY3UDuU4Et564Oii5mzJof",
    "email": "[email protected]"
  }
}
KeyTypeDescription
specversionstringThe CloudEvent spec version of the event.
typestringThe type of event that occurred.
sourcestring, URI-ReferenceThe context in which the event occurred, usually the API endpoint that produced the event.
subjectstringThe subject of the event found in the data attribute.
idstringThe unique identifier of the event.
timestring, RFC3339The time of occurrence.
merchantstringThe merchant of the event.
datacontenttypestringThe content type of the data attribute. application/json is the only possible value today but other content types may be introduced in the future. Always verify the value before consuming the data attribute.
dataJSONThe event payload, usually a Slope object such as a Customer or Order. The value type may change depending on the datacontenttype.