---
title: "Catalogul de evenimente | Documentație | Accounting by R&D Copilot"
description: "Evenimentele pe care Accounting le trimite, când este trimis fiecare și ce conține câmpul data."
canonical: "https://accounting.rdcopilot.com/ro/docs/events/event-catalogue/"
language: ro
updated: 2026-11-22
---

# Catalogul de evenimente

Evenimentele pe care Accounting le trimite, când este trimis fiecare și ce conține câmpul `data`.

Accounting trimite un eveniment când o cerere de înregistrare își schimbă starea, când o notă este stornată și când o perioadă intră în închidere sau este blocată. Fiecare eveniment are [același plic](https://accounting.rdcopilot.com/ro/docs/events/event-envelope/); tipul și `data` spun ce s-a întâmplat. `aggregateId` este `postingRequestId`, nota sau perioada la care se referă evenimentul, iar `aggregateRevision` este revizia ei după modificare.

| Tip | Agregat | Trimis când |
| --- | --- | --- |
| `com.rdcopilot.accounting.posting.accepted.v1` | `posting-request` | O cerere de înregistrare a fost acceptată, o singură dată. |
| `com.rdcopilot.accounting.posting.posted.v1` | `posting-request` | Cererea a fost înregistrată: nota există și este echilibrată. |
| `com.rdcopilot.accounting.posting.rejected.v1` | `posting-request` | Cererea a fost respinsă după ce a fost acceptată: nimic nu a fost înregistrat. |
| `com.rdcopilot.accounting.entry.reversed.v1` | `journal-entry` | A fost înregistrată o stornare pentru o notă. |
| `com.rdcopilot.accounting.period.closing.v1` | `period` | O perioadă a intrat în închidere. |
| `com.rdcopilot.accounting.period.locked.v1` | `period` | O perioadă a fost blocată: nu se mai înregistrează nimic în ea. |

Un eveniment spune că s-a întâmplat ceva, nu tot ce ține de el. Citește cererea de înregistrare sau nota pentru rest. `legalCompanyId` este compania de care ține evenimentul. Declară o adresă ca să primești aceste evenimente: vezi [Abonamente](https://accounting.rdcopilot.com/ro/docs/events/subscriptions/).

## Datele fiecărui eveniment

### posting.accepted

| Câmp din \`data\` | Descriere |
| --- | --- |
| `sourceDocumentId` | Documentul sursă al cererii. |
| `sourceDocumentType` | Tipul documentului sursă. |
| `status` | Întotdeauna `accepted`. |

### posting.posted

| Câmp din \`data\` | Descriere |
| --- | --- |
| `status` | Întotdeauna `posted`. |
| `journalEntryId` | Nota care a fost creată. |
| `number` | Numărul notei. |
| `entryDate` | Data notei. |
| `totalDebit` | Debitul notei, egal cu creditul ei. |

### posting.rejected

| Câmp din \`data\` | Descriere |
| --- | --- |
| `status` | Întotdeauna `rejected`. |
| `code` | Motivul, un cod stabil. |
| `message` | Motivul ca propoziție. |

### entry.reversed

| Câmp din \`data\` | Descriere |
| --- | --- |
| `reversalEntryId` | Nota care o stornează. |
| `number` | Numărul stornării. |
| `reason` | Motivul indicat. |

### period.closing

| Câmp din \`data\` | Descriere |
| --- | --- |
| `period` | Luna, ca `YYYY-MM`. |
| `status` | Întotdeauna `closing`. |

### period.locked

| Câmp din \`data\` | Descriere |
| --- | --- |
| `period` | Luna, ca `YYYY-MM`. |
| `status` | Întotdeauna `locked`. |

## Exemple

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

## Ordine

Evenimentele despre aceeași înregistrare vin în ordinea lui `aggregateRevision`, dar livrările pot ajunge în altă ordine când una dintre ele este reîncercată. Păstrează cea mai mare revizie tratată pentru fiecare `aggregateId` și sari peste o livrare mai veche. Un `posting.posted` poate ajunge înaintea lui `posting.accepted` al aceleiași cereri.
