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]"
}
}
Key | Type | Description |
---|---|---|
specversion | string | The CloudEvent spec version of the event. |
type | string | The type of event that occurred. |
source | string, URI-Reference | The context in which the event occurred, usually the API endpoint that produced the event. |
subject | string | The subject of the event found in the data attribute. |
id | string | The unique identifier of the event. |
time | string, RFC3339 | The time of occurrence. |
merchant | string | The merchant of the event. |
datacontenttype | string | The 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. |
data | JSON | The event payload, usually a Slope object such as a Customer or Order. The value type may change depending on the datacontenttype . |
Updated 8 months ago