When the authority is unavailable
What happens when the authority does not answer an upload, how to send it again safely, and how to declare after an outage of its system.
On this page
If the authority does not answer an upload, the gateway cannot know whether the declaration arrived. It does not guess. The declaration moves to manual_review and waits for a person, because sending it again blindly could declare the same transport twice.
{
"event": "manual_review",
"at": "2026-11-23T07:10:21Z",
"uploadIndex": null,
"uit": null,
"message": null,
"code": "unknown-outcome"
} The entry has the code unknown-outcome. The declaration has no upload index, because the gateway never saw one, and no UIT code.
What to do
Find the declarations
List the declarations of the company with
statusset tomanual_review.Check whether it arrived
Compare with the list of the authority. If the transport is there as an
unknowncode, adopt that record: the gateway then holds the declaration the authority holds, as a new declaration. Do not send the one inmanual_reviewagain; it stays as the record of the upload whose outcome was unknown.Send it again
If it did not arrive, send the declaration again. It is queued again and uploaded, and it gets its upload index.
curl
curl -X POST "$RDC_BASE_URL/etransport/v1/declarations/8088e3f2-9e6b-4d2a-a9b6-cc9fbb3b3b12/resend" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "41b89b64-8075-4311-b273-2217509bcb10",
"expectedRevision": 5
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/8088e3f2-9e6b-4d2a-a9b6-cc9fbb3b3b12/resend`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "41b89b64-8075-4311-b273-2217509bcb10",
"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/8088e3f2-9e6b-4d2a-a9b6-cc9fbb3b3b12/resend',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '41b89b64-8075-4311-b273-2217509bcb10',
'expectedRevision': 5,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "41b89b64-8075-4311-b273-2217509bcb10",
"expectedRevision": 5
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/8088e3f2-9e6b-4d2a-a9b6-cc9fbb3b3b12/resend');
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/8088e3f2-9e6b-4d2a-a9b6-cc9fbb3b3b12/resend");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "41b89b64-8075-4311-b273-2217509bcb10",
"expectedRevision": 5
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "41b89b64-8075-4311-b273-2217509bcb10",
"status": "accepted",
"aggregateId": "8088e3f2-9e6b-4d2a-a9b6-cc9fbb3b3b12",
"aggregateRevision": 6
} - Only a declaration in
manual_reviewcan be sent again. Any other status answersinvalid_status. - The request is refused with
authorisation_not_in_forcewhen the access of the company is not in force.
Declarations already uploaded
A declaration that is submitted or processing has an upload index, so the gateway knows the authority has it. It keeps its status until the authority answers: read it again later, ask the authority with refreshDeclaration or wait for the event. Do not send it again.
Declaring after an outage
Set afterOutage to true on a declaration made after an outage of the authority’s system, when you create it or while it is a draft, and the gateway sends it to the authority as a declaration made after an outage. Leave it out for any other declaration.
curl
curl -X PATCH "$RDC_BASE_URL/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "43fafee2-5fd5-48e0-bbc3-765225141b69",
"expectedRevision": 1,
"goods": [
{
"code": "CA-0010",
"name": "Cartofi albi, sac de 25 kg",
"tariffCode": "070190",
"purposeCode": 704,
"quantity": "40",
"unit": "XBG",
"netMass": "1000.00",
"grossMass": "1012.00",
"value": "2200.00"
},
{
"code": "ME-0307",
"name": "Mere Golden, ladă de 12 kg",
"tariffCode": "080810",
"purposeCode": 704,
"quantity": "30",
"unit": "XCR",
"netMass": "360.00",
"grossMass": "387.00",
"value": "1440.00"
},
{
"code": "AP-0412",
"name": "Apă minerală plată, 2 l, set de 6",
"tariffCode": "220110",
"purposeCode": 704,
"quantity": "80",
"unit": "XPK",
"netMass": "960.00",
"grossMass": "1016.00",
"value": "1200.00"
},
{
"code": "SU-0518",
"name": "Băutură carbogazoasă îndulcită, 2 l, set de 6",
"tariffCode": "220210",
"purposeCode": 704,
"quantity": "36",
"unit": "XPK",
"netMass": "432.00",
"grossMass": "457.20",
"value": "864.00"
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "43fafee2-5fd5-48e0-bbc3-765225141b69",
"expectedRevision": 1,
"goods": [
{
"code": "CA-0010",
"name": "Cartofi albi, sac de 25 kg",
"tariffCode": "070190",
"purposeCode": 704,
"quantity": "40",
"unit": "XBG",
"netMass": "1000.00",
"grossMass": "1012.00",
"value": "2200.00"
},
{
"code": "ME-0307",
"name": "Mere Golden, ladă de 12 kg",
"tariffCode": "080810",
"purposeCode": 704,
"quantity": "30",
"unit": "XCR",
"netMass": "360.00",
"grossMass": "387.00",
"value": "1440.00"
},
{
"code": "AP-0412",
"name": "Apă minerală plată, 2 l, set de 6",
"tariffCode": "220110",
"purposeCode": 704,
"quantity": "80",
"unit": "XPK",
"netMass": "960.00",
"grossMass": "1016.00",
"value": "1200.00"
},
{
"code": "SU-0518",
"name": "Băutură carbogazoasă îndulcită, 2 l, set de 6",
"tariffCode": "220210",
"purposeCode": 704,
"quantity": "36",
"unit": "XPK",
"netMass": "432.00",
"grossMass": "457.20",
"value": "864.00"
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'PATCH',
f'{os.environ["RDC_BASE_URL"]}/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '43fafee2-5fd5-48e0-bbc3-765225141b69',
'expectedRevision': 1,
'goods': [
{
'code': 'CA-0010',
'name': 'Cartofi albi, sac de 25 kg',
'tariffCode': '070190',
'purposeCode': 704,
'quantity': '40',
'unit': 'XBG',
'netMass': '1000.00',
'grossMass': '1012.00',
'value': '2200.00',
},
{
'code': 'ME-0307',
'name': 'Mere Golden, ladă de 12 kg',
'tariffCode': '080810',
'purposeCode': 704,
'quantity': '30',
'unit': 'XCR',
'netMass': '360.00',
'grossMass': '387.00',
'value': '1440.00',
},
{
'code': 'AP-0412',
'name': 'Apă minerală plată, 2 l, set de 6',
'tariffCode': '220110',
'purposeCode': 704,
'quantity': '80',
'unit': 'XPK',
'netMass': '960.00',
'grossMass': '1016.00',
'value': '1200.00',
},
{
'code': 'SU-0518',
'name': 'Băutură carbogazoasă îndulcită, 2 l, set de 6',
'tariffCode': '220210',
'purposeCode': 704,
'quantity': '36',
'unit': 'XPK',
'netMass': '432.00',
'grossMass': '457.20',
'value': '864.00',
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "43fafee2-5fd5-48e0-bbc3-765225141b69",
"expectedRevision": 1,
"goods": [
{
"code": "CA-0010",
"name": "Cartofi albi, sac de 25 kg",
"tariffCode": "070190",
"purposeCode": 704,
"quantity": "40",
"unit": "XBG",
"netMass": "1000.00",
"grossMass": "1012.00",
"value": "2200.00"
},
{
"code": "ME-0307",
"name": "Mere Golden, ladă de 12 kg",
"tariffCode": "080810",
"purposeCode": 704,
"quantity": "30",
"unit": "XCR",
"netMass": "360.00",
"grossMass": "387.00",
"value": "1440.00"
},
{
"code": "AP-0412",
"name": "Apă minerală plată, 2 l, set de 6",
"tariffCode": "220110",
"purposeCode": 704,
"quantity": "80",
"unit": "XPK",
"netMass": "960.00",
"grossMass": "1016.00",
"value": "1200.00"
},
{
"code": "SU-0518",
"name": "Băutură carbogazoasă îndulcită, 2 l, set de 6",
"tariffCode": "220210",
"purposeCode": 704,
"quantity": "36",
"unit": "XPK",
"netMass": "432.00",
"grossMass": "457.20",
"value": "864.00"
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
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.Patch, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "43fafee2-5fd5-48e0-bbc3-765225141b69",
"expectedRevision": 1,
"goods": [
{
"code": "CA-0010",
"name": "Cartofi albi, sac de 25 kg",
"tariffCode": "070190",
"purposeCode": 704,
"quantity": "40",
"unit": "XBG",
"netMass": "1000.00",
"grossMass": "1012.00",
"value": "2200.00"
},
{
"code": "ME-0307",
"name": "Mere Golden, ladă de 12 kg",
"tariffCode": "080810",
"purposeCode": 704,
"quantity": "30",
"unit": "XCR",
"netMass": "360.00",
"grossMass": "387.00",
"value": "1440.00"
},
{
"code": "AP-0412",
"name": "Apă minerală plată, 2 l, set de 6",
"tariffCode": "220110",
"purposeCode": 704,
"quantity": "80",
"unit": "XPK",
"netMass": "960.00",
"grossMass": "1016.00",
"value": "1200.00"
},
{
"code": "SU-0518",
"name": "Băutură carbogazoasă îndulcită, 2 l, set de 6",
"tariffCode": "220210",
"purposeCode": 704,
"quantity": "36",
"unit": "XPK",
"netMass": "432.00",
"grossMass": "457.20",
"value": "864.00"
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "43fafee2-5fd5-48e0-bbc3-765225141b69",
"status": "accepted",
"aggregateId": "1cf74abb-68ce-4948-b2e5-3ddace415443",
"aggregateRevision": 2
}