Send and follow
Send a draft to the authority, then follow it from the upload index to ok or nok and read the UIT code.
On this page
Sending is one request. The gateway does the rest and your software follows the result. This is the whole path of a declaration up to its UIT code, as its history shows it.
Send
Send the draft with the revision you read. In one operation the gateway passes validated, authorized and queued, uploads the declaration and takes the upload index the authority returns. The declaration is then submitted.
curl
curl -X POST "$RDC_BASE_URL/etransport/v1/declarations/0776bc3f-c5ed-4aa8-8f25-40152eee2b42/send" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "6256604e-3b85-4790-bca3-20628a474b86",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/0776bc3f-c5ed-4aa8-8f25-40152eee2b42/send`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "6256604e-3b85-4790-bca3-20628a474b86",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/etransport/v1/declarations/0776bc3f-c5ed-4aa8-8f25-40152eee2b42/send',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '6256604e-3b85-4790-bca3-20628a474b86',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "6256604e-3b85-4790-bca3-20628a474b86",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/0776bc3f-c5ed-4aa8-8f25-40152eee2b42/send');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/declarations/0776bc3f-c5ed-4aa8-8f25-40152eee2b42/send");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "6256604e-3b85-4790-bca3-20628a474b86",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "6256604e-3b85-4790-bca3-20628a474b86",
"status": "accepted",
"aggregateId": "0776bc3f-c5ed-4aa8-8f25-40152eee2b42",
"aggregateRevision": 2
} Read the checks first when you want to know what would block the send. The request is refused, and nothing is uploaded, in these cases:
| Refused with | Code | Why |
|---|---|---|
422 | blocked_by_checks | A blocking check fails. The declaration stays a draft. |
409 | authorisation_not_in_force | The access the company gave the gateway is not in force. Ask its representative to authorise it again. |
409 | revision_conflict | The declaration changed after you read it. |
409 | invalid_status | The declaration is not a draft. |
Follow the answer
After the upload the authority checks the declaration. It is processing (în prelucrare) while it does, and ends accepted (ok) or rejected (nok). Three ways to follow it.
Events
The gateway sends
declaration.submitted,declaration.acceptedanddeclaration.rejectedto your endpoint. See the event catalogue.Read the declaration
status,uploadIndexanduitof the declaration are always current.Ask the authority now
Read the answer of the authority at once, without waiting for the event.
curl
curl -X POST "$RDC_BASE_URL/etransport/v1/declarations/b0bc421b-5e82-4bc2-9416-a33bd20bf92e/refresh" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "7dcc00ba-98ef-4f14-a52f-14a3ab2eaf7d",
"expectedRevision": 6
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/b0bc421b-5e82-4bc2-9416-a33bd20bf92e/refresh`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "7dcc00ba-98ef-4f14-a52f-14a3ab2eaf7d",
"expectedRevision": 6
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/etransport/v1/declarations/b0bc421b-5e82-4bc2-9416-a33bd20bf92e/refresh',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '7dcc00ba-98ef-4f14-a52f-14a3ab2eaf7d',
'expectedRevision': 6,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "7dcc00ba-98ef-4f14-a52f-14a3ab2eaf7d",
"expectedRevision": 6
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/b0bc421b-5e82-4bc2-9416-a33bd20bf92e/refresh');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/declarations/b0bc421b-5e82-4bc2-9416-a33bd20bf92e/refresh");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "7dcc00ba-98ef-4f14-a52f-14a3ab2eaf7d",
"expectedRevision": 6
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "7dcc00ba-98ef-4f14-a52f-14a3ab2eaf7d",
"status": "accepted",
"aggregateId": "b0bc421b-5e82-4bc2-9416-a33bd20bf92e",
"aggregateRevision": 7
} A message moves one step with each request: from submitted to processing, then to accepted or rejected. refreshDeclaration is refused with nothing_pending when no message waits for the authority: read the declaration instead.
When the authority says ok
The declaration is accepted and takes its uit: the code the driver carries. The uploadIndex stays on the declaration, and the code is valid from the declared start date for a number of days that depends on the operation type: see UIT validity and timing. The history lists every step, oldest first; the entry of submitted carries the uploadIndex and the entry of accepted the uit.
curl
curl "$RDC_BASE_URL/etransport/v1/declarations/4533692d-469c-4b70-acdb-d1a9a4a0f54f/history?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/4533692d-469c-4b70-acdb-d1a9a4a0f54f/history?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"]}/etransport/v1/declarations/4533692d-469c-4b70-acdb-d1a9a4a0f54f/history?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/4533692d-469c-4b70-acdb-d1a9a4a0f54f/history?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")}/etransport/v1/declarations/4533692d-469c-4b70-acdb-d1a9a4a0f54f/history?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"event": "created",
"at": "2026-11-23T07:02:10Z",
"uploadIndex": null,
"uit": null,
"message": null
},
{
"event": "validated",
"at": "2026-11-23T07:04:31Z",
"uploadIndex": null,
"uit": null,
"message": null
},
{
"event": "authorized",
"at": "2026-11-23T07:04:31Z",
"uploadIndex": null,
"uit": null,
"message": null
},
{
"event": "queued",
"at": "2026-11-23T07:04:32Z",
"uploadIndex": null,
"uit": null,
"message": null
},
{
"event": "submitted",
"at": "2026-11-23T07:04:35Z",
"uploadIndex": "1000128",
"uit": null,
"message": null
},
{
"event": "processing",
"at": "2026-11-23T07:05:05Z",
"uploadIndex": "1000128",
"uit": null,
"message": null
},
{
"event": "accepted",
"at": "2026-11-23T07:05:41Z",
"uploadIndex": "1000128",
"uit": "4F7K2Q9M8X1D6383",
"message": null
}
],
"nextCursor": null
} When the authority says nok
The declaration is rejected and the entry of the history carries the words of the authority exactly as it wrote them, in Romanian. One case has no upload index: the authority no longer holds the access of the company, refuses the upload at once and the gateway marks the access as lapsed.
{
"event": "rejected",
"at": "2026-11-12T07:04:50Z",
"uploadIndex": null,
"uit": null,
"message": "Nu aveti drept in SPV pentru CIF=48290619"
} rejected is final: it never changes. Write a new draft from it with reopenDeclaration: the draft has the same fields and names the rejected one in correctionOf. The result carries the new draft in aggregateId. A second request is refused with already_reopened.
curl
curl -X POST "$RDC_BASE_URL/etransport/v1/declarations/ffe03a6e-e050-4a07-8043-dec108572aa9/reopen" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "7cca047a-05fc-48e7-860e-2a77dbeb2aca",
"expectedRevision": 5
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/ffe03a6e-e050-4a07-8043-dec108572aa9/reopen`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "7cca047a-05fc-48e7-860e-2a77dbeb2aca",
"expectedRevision": 5
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/etransport/v1/declarations/ffe03a6e-e050-4a07-8043-dec108572aa9/reopen',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '7cca047a-05fc-48e7-860e-2a77dbeb2aca',
'expectedRevision': 5,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "7cca047a-05fc-48e7-860e-2a77dbeb2aca",
"expectedRevision": 5
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/ffe03a6e-e050-4a07-8043-dec108572aa9/reopen');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/declarations/ffe03a6e-e050-4a07-8043-dec108572aa9/reopen");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "7cca047a-05fc-48e7-860e-2a77dbeb2aca",
"expectedRevision": 5
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "7cca047a-05fc-48e7-860e-2a77dbeb2aca",
"status": "accepted",
"aggregateId": "0776bc3f-c5ed-4aa8-8f25-40152eee2b42",
"aggregateRevision": 1
} When the outcome is unknown
If the gateway cannot tell whether the authority received the upload, the declaration is manual_review and the history entry has the code unknown-outcome. See When the authority is unavailable.
{
"event": "manual_review",
"at": "2026-11-23T07:10:21Z",
"uploadIndex": null,
"uit": null,
"message": null,
"code": "unknown-outcome"
}