Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Go-live checklist

    Eight checks, in order, that you can run against the API before your software works on a real period.

    Each item below is something you can run and read back. Do them in order: a later one assumes the earlier ones passed.

    1. The token works

      Request a token with your client credentials and the scope etva.access, then call listPeriods. A 200 means the token is accepted. unauthorized (401) means the token is missing, not valid or has ended; forbidden (403) means it gives no access to this data. See Authentication.

    2. The base address is the right one

      Your configuration holds RDC_BASE_URL and RDC_TOKEN for the environment you are going live in, and every path starts with /etva/v1. Read a period back from that address before you continue. See Sandbox and live.

    3. One period compared end to end

      Open one period with openPeriod, send importPrefilled and importPostings, then read the four rows with listRows. Check each yours against your own books. Your software must handle rows_do_not_add_up, unsupported_rate, empty_import and duplicate_posting: all are 422 and nothing is imported. See Compare with your return.

    4. The limits are set

      Read limits on the period. The defaults are 100.00 lei and 5.00 percent. If your company needs other values, send updateLimits and read the rows again: the marked rows can change. See Return rows.

    5. A subscription is registered and a delivery checked

      Register an HTTPS endpoint with createSubscription and keep the whsec_ secret of the answer: it is returned once. Then change a period, for example explain a difference, and read listDeliveries: the delivery has to be delivered, with an attempt answered 200 within 10 seconds. Your endpoint checks the signature of the raw body and compares aggregateRevision with the revision you hold. A delivery is tried six times: at once, then after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. After the sixth failure it is parked; replayDelivery sends it again. See Subscriptions and Verify signatures.

    6. The approver is a second person

      The file is approved by someone other than preparedBy. Send approveFile once with the preparer’s name as approvedBy and read same_person (409), then with the second person’s name. A period with a row to_review answers rows_to_review (409). See Reasons and explanations.

    7. The exports are read

      Call getExport with rows, differences and explanation-file. The file is the text in content, a CSV with a header line. Parse it in your software and compare the rows with what listRows returned.

    8. The errors are handled

      Every change carries a new operationId and the expectedRevision you read. After a timeout, repeat the same request with the same operationId; read a change you are unsure of with getOperation. The table below lists the refusals a normal run meets. See Errors and Idempotency.

    Refused withCodeWhat your software does
    409revision_conflictReads the period again and decides whether the change still applies.
    409operation_reusedChooses a new operationId for a different change.
    409file_lockedWithdraws the approval first, or leaves a filed file as it is.
    409wrong_file_stateReads the file and uses the operation that fits its state.
    422reason_not_allowedTakes a reason from the reasons of the difference.
    404difference_not_foundLists the differences again: the data changed.

    curl

    curl "$RDC_BASE_URL/etva/v1/periods?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods?limit=20`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods?limit=20');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/periods?limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "items": [
        {
          "id": "79509f60-565a-40eb-a4c3-709e5d49e517",
          "companyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
          "month": "2026-09",
          "scheme": "standard",
          "prefilledOn": "2026-11-04",
          "postingsSource": "ledger",
          "limits": {
            "amountLimit": "100.00",
            "percentLimit": "5.00"
          },
          "summary": {
            "aligned": 1,
            "explained": 1,
            "toReview": 2
          },
          "file": {
            "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
            "state": "draft",
            "preparedBy": "ioana-marin",
            "approvedBy": null,
            "approvedAt": null,
            "filedAt": null,
            "explained": 3,
            "toReview": 2,
            "canApprove": false,
            "revision": 1
          },
          "revision": 1
        },
        {
          "id": "a74ab6a1-ddd9-4d10-a422-7e5468e3b58d",
          "companyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
          "month": "2026-08",
          "scheme": "standard",
          "prefilledOn": "2026-10-02",
          "postingsSource": "ledger",
          "limits": {
            "amountLimit": "100.00",
            "percentLimit": "5.00"
          },
          "summary": {
            "aligned": 3,
            "explained": 1,
            "toReview": 0
          },
          "file": {
            "periodId": "a74ab6a1-ddd9-4d10-a422-7e5468e3b58d",
            "state": "filed",
            "preparedBy": "ioana-marin",
            "approvedBy": "ana-rusu",
            "approvedAt": "2026-10-22T08:40:00Z",
            "filedAt": "2026-10-22T08:52:00Z",
            "explained": 1,
            "toReview": 0,
            "canApprove": false,
            "revision": 1
          },
          "revision": 1
        }
      ],
      "nextCursor": null
    }