Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Event catalogue

    The six events of a period, when each one is sent, what its data holds and which operation causes it.

    On this page

    An event is sent when a period changes in a way a system next to e‑TVA Check would want to know. All six have the same envelope: aggregateType is period, aggregateId is the id of the period and legalCompanyId is the company. The type and data say what happened. An event states a change; read the period, the rows or the differences for the rest.

    TypeOperationSent when
    com.rdcopilot.etva.period.compared.v1importPrefilled, importPostings, linkDocument, unlinkDocument, updateLimitsThe comparison of the period is computed again, after an import (importPrefilled, importPostings), a link, an unlink or a change of the limits. data.summary counts the rows by status.
    com.rdcopilot.etva.row.status_changed.v1importPrefilled, importPostings, explainDifference, reopenDifference, linkDocument, unlinkDocument, updateLimitsA row moves between aligned, explained and to_review. One event per row that moves. An import recomputes the comparison, so it can move rows too.
    com.rdcopilot.etva.difference.explained.v1explainDifferenceA person gives a difference a reason and a note.
    com.rdcopilot.etva.difference.reopened.v1reopenDifferenceThe explanation of a difference is withdrawn.
    com.rdcopilot.etva.file.approved.v1approveFileA second person approves the explanation file.
    com.rdcopilot.etva.file.filed.v1markFiledThe approved file is marked as filed. The period stays as it is from then on.

    withdrawApproval returns the file to draft and moves the revision; it has no event of its own. After it the period takes changes again, and the next explanation, link or import sends its events as usual.

    What data holds

    TypeFields of dataMeaning
    com.rdcopilot.etva.period.compared.v1summaryaligned, explained and toReview: the number of rows in each status.
    com.rdcopilot.etva.row.status_changed.v1rowId, from, to, differenceThe row, its status before and after, and its difference after the change: base, vat and percent, yours minus pre-filled.
    com.rdcopilot.etva.difference.explained.v1differenceId, kind, reason, rowIds, vatThe difference, its kind, the reason given, the rows it touches and its VAT effect as a decimal string in lei.
    com.rdcopilot.etva.difference.reopened.v1differenceId, kind, rowIds, vatThe difference that has no explanation again, its kind, the rows it touches and its VAT effect as a decimal string in lei.
    com.rdcopilot.etva.file.approved.v1approvedBy, explainedThe person who approved and the number of differences that had an explanation.
    com.rdcopilot.etva.file.filed.v1approvedBy, filedAtThe person who approved the file and the moment it was filed.

    The September period

    In the September period of Brumar Distribuție SRL, the revision is 1. explainDifference on the document AC-004563 of Ambalaje Carpatin carries expectedRevision 1 and the reason not_yet_posted. The change is applied, the revision becomes 2 and this event is sent. causationId is the operationId of the request.

    com.rdcopilot.etva.difference.explained.v1

    {
      "specversion": "1.0",
      "id": "0ba90135-022b-42b7-b936-f2199037334d",
      "type": "com.rdcopilot.etva.difference.explained.v1",
      "source": "/etva/v1",
      "time": "2026-11-23T07:12:00Z",
      "customerOrgId": "27729512-c99f-47e6-9933-b08a74826a8f",
      "legalCompanyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
      "aggregateType": "period",
      "aggregateId": "79509f60-565a-40eb-a4c3-709e5d49e517",
      "aggregateRevision": 2,
      "correlationId": "f9233826-2066-4ae4-a59a-7d5a33dc79d2",
      "causationId": "3b01ddcf-38da-4d6e-93cd-ccabd05f8018",
      "actor": {
        "serviceId": "etva"
      },
      "data": {
        "differenceId": "46735209-a528-4647-ba66-da4a8e7373ee",
        "kind": "not-posted",
        "reason": "not_yet_posted",
        "rowIds": [
          "purchases-standard"
        ],
        "vat": "-1928.75"
      }
    }

    The other events of the period carry these data objects.

    com.rdcopilot.etva.period.compared.v1

    {"summary":{"aligned":1,"explained":1,"toReview":2}}

    com.rdcopilot.etva.row.status_changed.v1

    {"rowId":"sales-standard","from":"to_review","to":"explained","difference":{"base":"-3456.48","vat":"-725.86","percent":"-26.12"}}

    com.rdcopilot.etva.file.approved.v1

    {"approvedBy":"ana-rusu","explained":5}

    com.rdcopilot.etva.difference.reopened.v1

    {"differenceId":"50ad54ee-d206-4a82-a336-193ccffdc407","kind":"rate","rowIds":["purchases-standard","purchases-reduced"],"vat":"3198.40"}

    com.rdcopilot.etva.file.filed.v1

    {"approvedBy":"ana-rusu","filedAt":"2026-11-23T07:12:00Z"}

    Read the revision

    aggregateRevision is the revision of the period after the change. It is the expectedRevision your next change must send, and it orders the events of one period.

    • Keep the highest revision you have applied for each period.
    • An event with a revision equal to or lower than yours is already applied: ignore it. Deliveries can arrive twice or out of order.
    • When the revision jumps over a number, read the period instead of waiting: getPeriod returns the state as it is.
    • A change sent with an older revision is refused with revision_conflict. See Errors.

    How an event arrives

    An event is delivered as a POST with the envelope as the body, signed with the secret of the subscription. The header webhook-id is the id of the event and stays the same on every attempt; webhook-timestamp is the second of the attempt; webhook-signature holds v1, and the signature.

    Headers of a delivery

    webhook-id: 0ba90135-022b-42b7-b936-f2199037334d
    webhook-timestamp: 1795417920
    webhook-signature: v1,<signature>

    Check the signature before you read the event: see Verify signatures.

    Register an endpoint to receive these events: see Subscriptions. Failed deliveries are in Delivery and retries.