---
title: "Event envelope | Docs | Accounting by R&D Copilot"
description: "Every Accounting event has the same envelope; only data changes with the type of the event."
canonical: "https://accounting.rdcopilot.com/docs/events/event-envelope/"
language: en
updated: 2026-11-22
---

# Event envelope

Every Accounting event has the same envelope; only `data` changes with the type of the event.

The `type` has the form `com.rdcopilot.accounting.<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

JSON

```json
{
  "specversion": "1.0",
  "id": "e2193e5c-aea8-48f3-8128-572f833b0383",
  "type": "com.rdcopilot.accounting.posting.posted.v1",
  "source": "urn:rdcopilot:service:accounting",
  "time": "2026-11-23T07:12:00Z",
  "datacontenttype": "application/json",
  "customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
  "legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
  "aggregateType": "posting-request",
  "aggregateId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
  "aggregateRevision": 2,
  "correlationId": "811cc88c-f3d0-41c4-a870-89e162b010f4",
  "causationId": "32a34b30-2203-436d-897c-707b3c3770bd",
  "actor": {
    "serviceId": "accounting"
  },
  "data": {
    "status": "posted",
    "journalEntryId": "d75fc649-ee06-4dfb-ab83-94b5f1209aa8",
    "number": "JE-2026-10-0008",
    "entryDate": "2026-10-21",
    "totalDebit": "4995.73"
  }
}
```

Deliveries can repeat. Use `id` to skip an event you already handled. [Delivery and retries](https://accounting.rdcopilot.com/docs/events/delivery-and-retries/) says when an event is sent again.

The full rule: [Developer guide](https://rdcopilot.com/docs/events/)
