Event envelope
Every Payroll event has the same envelope; only data changes with the type of the event.
On this page
The type has the form com.rdcopilot.payroll.<event>.v1. The last part is the version of data.
Fields
| Field | Meaning |
|---|---|
specversion | Version of the envelope format. |
id | Identifier of this event. A repeated delivery of the same event has the same id. |
type | What happened, in the form above. |
source | The product that sent the event. |
time | When the event happened, as a date and time with a time zone. |
customerOrgId | Your organisation. |
legalCompanyId | The legal company that the event belongs to, test or live. |
aggregateType | The kind of record that changed. |
aggregateId | The record that changed. |
aggregateRevision | The revision of the record after the change. |
correlationId | Ties together everything that came from one request or one flow. |
causationId | The document or operation that caused this event. |
actor | Who or what made the change. |
data | The content of the event. Its shape depends on type. |
Example
{
"specversion": "1.0",
"id": "f7cc9497-d3fd-4476-9100-000000000010",
"type": "com.rdcopilot.payroll.pay_run.approved.v1",
"source": "/payroll/v1",
"time": "2026-12-02T10:15:00Z",
"customerOrgId": "brumar",
"legalCompanyId": "brumar",
"aggregateType": "pay_run",
"aggregateId": "PR-2026-11",
"aggregateRevision": 6,
"correlationId": "f7cc9497-d3fd-4476-9100-000000000011",
"causationId": "f7cc9497-d3fd-4476-9100-000000000005",
"actor": {
"type": "api_client",
"id": "payroll-client"
},
"data": {
"status": "approved"
}
} Deliveries can repeat. Use id to skip an event you already handled. Delivery and retries says when an event is sent again.
The full rule: Developer guide