Event Structure
All Dayforce events, regardless of the event type follow the same format and are composed of a header and body. Your Webhook will need to consume this structure in order to treat the events.
Events contain the data of the updated or added records in the data section of the body. The data model of this data section depends on the event type.
Headers
| Field |
Description |
| Content-type |
Type of data returned (JSON) |
| ce-specversion |
Version of cloud event standard used |
| ce-correlationid |
Id that links several events to the same originating transaction |
| ce-clientnamespace |
Dayforce Namespace from which the event has been emitted |
| ce-subscriptionxrefcode |
Reference code of the subscription that was subscribed to this event (can help if several subscriptions target the same endpoint) |
| ce-type |
Type of event. |
| ce-dataschema |
null |
| ce-id |
Unique identifier of the event |
| ce-source |
Source of the event |
| ce-time |
Time when the event was generated in Dayforce (UTC) |
| ce-changedfields |
List of fields that have changed during an employee record change. More info under Changefields here |
Example
"headers": {
```
"content-type": "application/cloudevents+json",
"ce-specversion": "1.0",
"ce-correlationid": "ed92a251-b4f7-43a3-9a23-c2a5b1051ad6",
"ce-clientnamespace": "devhrpr73",
"ce-subscriptionxrefcode": "TestSubscription",
"ce-type": "EmployeeMaritalStatus",
"ce-dataschema": "null",
"ce-id": "27aa909e-4edb-4bfd-b409-0b26b8d30a15",
"ce-source": "hr:employee:employeemaritalstatus",
"ce-time": "2022-01-17 16:20:44Z"
}
Body
| Field |
Description |
| specversion |
Version of cloud event standard used |
| correlationid |
Id that links several events to the same originating transaction |
| clientnamespace |
Dayforce Namespace from which the event has been emitted |
| subscriptionxrefcode |
Reference code of the subscription that was subscribed to this event (can help if several subscriptions target the same endpoint) |
| type |
Type of event. |
| data |
Data of the changed record. Only properties selected in the subscription will be sent. |
| datacontenttype |
Type of data returned (JSON) |
| dataschema |
Link to the data schema |
| id |
Unique identifier of the event |
| source |
Source of the event |
| time |
Time when the event was generated in Dayforce (UTC) |
Example
"body": {
"specversion": "1.0",
"correlationid": "ed92a251-b4f7-43a3-9a23-c2a5b1051ad6",
"clientnamespace": "devhrpr73",
"subscriptionxrefcode": "TestSubscription",
"type": "EmployeeMaritalStatus",
"data": {
"MaritalStatus": {
"ShortName": "Married",
"LongName": "Married"
}
},
"datacontenttype": "application/json",
"id": "27aa909e-4edb-4bfd-b409-0b26b8d30a15",
"source": "hr:employee:employeemaritalstatus",
"time": "2022-01-17T16:20:44.2788711Z"
}