---
title: "Event catalogue | Docs | Accounting by R&D Copilot"
description: "The events Accounting sends, when each one is sent and what its data holds."
canonical: "https://accounting.rdcopilot.com/docs/events/event-catalogue/"
language: en
updated: 2026-11-22
---

# Event catalogue

The events Accounting sends, when each one is sent and what its `data` holds.

Accounting sends an event when a posting request changes state, when an entry is reversed and when a period starts closing or is locked. Every event has the [same envelope](https://accounting.rdcopilot.com/docs/events/event-envelope/); the type and `data` say what happened. `aggregateId` is the `postingRequestId`, the entry or the period the event is about, and `aggregateRevision` is its revision after the change.

| Type | Aggregate | Sent when |
| --- | --- | --- |
| `com.rdcopilot.accounting.posting.accepted.v1` | `posting-request` | A posting request was accepted, once. |
| `com.rdcopilot.accounting.posting.posted.v1` | `posting-request` | The request was posted: the entry exists and balances. |
| `com.rdcopilot.accounting.posting.rejected.v1` | `posting-request` | The request was rejected after it was accepted: nothing was posted. |
| `com.rdcopilot.accounting.entry.reversed.v1` | `journal-entry` | A reversal was posted for an entry. |
| `com.rdcopilot.accounting.period.closing.v1` | `period` | A period started closing. |
| `com.rdcopilot.accounting.period.locked.v1` | `period` | A period was locked: nothing is posted into it any more. |

An event says that something happened, not everything about it. Read the posting request or the entry for the rest. `legalCompanyId` is the company the event belongs to. Register an endpoint to receive these events: see [Subscriptions](https://accounting.rdcopilot.com/docs/events/subscriptions/).

## The data of each event

### posting.accepted

| Field of \`data\` | Meaning |
| --- | --- |
| `sourceDocumentId` | The source document of the request. |
| `sourceDocumentType` | The kind of the source document. |
| `status` | Always `accepted`. |

### posting.posted

| Field of \`data\` | Meaning |
| --- | --- |
| `status` | Always `posted`. |
| `journalEntryId` | The entry that was created. |
| `number` | The number of the entry. |
| `entryDate` | The date of the entry. |
| `totalDebit` | Debit of the entry, equal to its credit. |

### posting.rejected

| Field of \`data\` | Meaning |
| --- | --- |
| `status` | Always `rejected`. |
| `code` | The reason, a stable code. |
| `message` | The reason as a sentence. |

### entry.reversed

| Field of \`data\` | Meaning |
| --- | --- |
| `reversalEntryId` | The entry that reverses it. |
| `number` | The number of the reversal. |
| `reason` | The reason that was given. |

### period.closing

| Field of \`data\` | Meaning |
| --- | --- |
| `period` | The month, as `YYYY-MM`. |
| `status` | Always `closing`. |

### period.locked

| Field of \`data\` | Meaning |
| --- | --- |
| `period` | The month, as `YYYY-MM`. |
| `status` | Always `locked`. |

## Examples

posting.posted

```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"
  }
}
```

posting.rejected

```json
{
  "specversion": "1.0",
  "id": "ce4f9927-8556-4c14-8874-06178265bd21",
  "type": "com.rdcopilot.accounting.posting.rejected.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": "eefbc55a-4da9-42d9-8c56-9764421e1fff",
  "aggregateRevision": 2,
  "correlationId": "1b735906-a8e5-46e8-9418-0b2dc7621f92",
  "causationId": "1a68663c-a9b3-48ce-aba4-bd227fb9be5c",
  "actor": {
    "serviceId": "accounting"
  },
  "data": {
    "status": "rejected",
    "code": "unbalanced",
    "message": "Debit and credit of the facts differ by 0.01. Nothing was posted."
  }
}
```

entry.reversed

```json
{
  "specversion": "1.0",
  "id": "ec2ab4f6-918f-4d8c-9804-aa96c2adb0cb",
  "type": "com.rdcopilot.accounting.entry.reversed.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": "journal-entry",
  "aggregateId": "c5a671de-e7b0-42b8-825d-d15c0612ff58",
  "aggregateRevision": 2,
  "correlationId": "1679072a-796c-43f3-8ddf-b330aef37034",
  "causationId": "7676e313-9d1f-42d0-a540-49efc794dfba",
  "actor": {
    "serviceId": "accounting"
  },
  "data": {
    "reversalEntryId": "d6d9657f-3d24-49f8-8912-1c004cba4101",
    "number": "JE-2026-11-0001",
    "reason": "Posted for the wrong supplier"
  }
}
```

## Order

Events about one record arrive in order of `aggregateRevision`, but deliveries can arrive out of order when one of them is retried. Keep the highest revision you handled for each `aggregateId` and skip a delivery that is older. A `posting.posted` can arrive before the `posting.accepted` of the same request has been delivered.
