Errors and warnings
The checks that run before a declaration is sent, how a blocking check is answered, and what the authority’s nok looks like.
On this page
The gateway applies before sending the rules that it can apply without asking the authority. The checks run on a draft and on the result of a correction. They are never stored: read them when you need them.
Read the checks
getDeclarationChecks runs the checks on the declaration as it is now and returns what fails. Each failing check has an id, a severity, the field it concerns, the line of the goods or the document it is about, the rule behind it and a message. canSend says whether sending would be accepted.
curl
curl "$RDC_BASE_URL/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443/checks" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443/checks`, {
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/1cf74abb-68ce-4948-b2e5-3ddace415443/checks',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/1cf74abb-68ce-4948-b2e5-3ddace415443/checks');
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/1cf74abb-68ce-4948-b2e5-3ddace415443/checks");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"declarationId": "1cf74abb-68ce-4948-b2e5-3ddace415443",
"revision": 1,
"canSend": false,
"blocking": 1,
"checks": [
{
"id": "tariff_code",
"severity": "error",
"field": "goods.tariffCode",
"line": 4,
"rule": "BR-034 BR-206",
"message": "The tariff code of the line is missing or not valid: 4, 6 or 8 digits."
}
]
} {
"declarationId": "1cf74abb-68ce-4948-b2e5-3ddace415443",
"revision": 1,
"canSend": false,
"blocking": 1,
"checks": [
{
"id": "tariff_code",
"severity": "error",
"field": "goods.tariffCode",
"line": 4,
"rule": "BR-034 BR-206",
"message": "The tariff code of the line is missing or not valid: 4, 6 or 8 digits."
}
]
} listValidationRules returns the catalogue below as data.
Errors block, warnings do not
A check of severity error blocks sendDeclaration and correctDeclaration: the request is refused with blocked_by_checks (422) and nothing is uploaded. Correct what the checks name and send again. A warning does not block.
The checks
| `id` | What it checks | Rule | Severity |
|---|---|---|---|
partner_country | The partner of a transport within Romania is in Romania; of an import or an export, outside the Union; of any other operation, in another member state. | BR-004 BR-005 BR-006 | error |
partner_code | For a transport within Romania the partner has a valid tax code, or PF. | BR-007 | error |
partner_name | The partner has a name, required, of at most 200 characters. | Rule | error |
transporter_country | The transporter has a country, as a two-letter code. | Rule | error |
transporter_code | A transporter in Romania has a valid tax code (PF is accepted for a transport within Romania). | BR-043 BR-209 | error |
transporter_name | The transporter has a name, required, of at most 200 characters. | Rule | error |
vehicle | The plate has 2 to 20 characters, capital letters and digits only. | BR-031 | error |
trailer | A trailer plate follows the same rule as the vehicle plate. | BR-032 BR-033 | error |
route_start | The start is exactly one of a border crossing, a customs office or an address. | BR-210 | error |
route_end | The end is exactly one of a border crossing, a customs office or an address. | BR-211 | error |
route_start_border | A supply, an export, a transport within Romania and the outbound operations start inside Romania. | BR-212 | error |
route_end_border | An import, an inbound operation and a transport within Romania end inside Romania. | BR-213 | error |
no_goods | At least one goods line. | Rule | error |
purpose | Each operation type accepts its own purposes; most accept only “same as the operation”. | BR-CL-005 BR-205 | error |
tariff_code | A tariff code of 4, 6 or 8 digits, required except for the two transit operations. | BR-034 BR-206 | error |
name | The goods have a name of at most 200 characters. | Rule | error |
quantity | The quantity is above zero, with at most two decimals. | BR-027 BR-035 | error |
unit | A unit code of 2 or 3 capital letters and digits. | BR-CL-003 | error |
net_mass | A net mass above zero, required except for the two transit operations. | BR-028 BR-207 | error |
gross_mass | A gross mass above zero on every line. | BR-029 BR-218 | error |
mass_order | The gross mass is at least the net mass. | BR-020 | error |
value | A value in lei without VAT, zero or more, required except for the two transit operations. | BR-030 BR-208 | error |
no_documents | At least one transport document. | Rule | error |
document_remarks | A document of the type other carries a remark. | BR-026 | error |
start_date | The declared start date is a calendar date. | Rule | error |
start_too_early | The declared start date is at most 3 calendar days after the day of the declaration. | Rule | error |
reference_length | Your own reference has at most 50 characters. | Rule | error |
below_thresholds | A warning: a load is monitored above 500 kg of gross mass or above 10,000 lei. | Rule | warning |
The rules named BR-… are the identifiers the authority gives its own validation rules.
The warning about the thresholds
Vehicles with a maximum technically permissible mass of 2.5 tonnes or more are monitored when they carry goods with a total gross mass above 500 kg or a total value above 10,000 lei. below_thresholds is raised when the goods weigh 500 kg or less and are worth 10,000 lei or less, at the same time. Exactly on a threshold is not above it. The warning does not block: the gateway sends what you send, and whether a transport is in scope is for you to decide. The gross mass of a lot counts the net mass of the goods and the mass of the packaging needed to sell and carry them. The value of the goods is stated without VAT; for a transaction settled in a foreign currency it is converted into lei at the rate of the National Bank of Romania of the day the transport is declared.
What the authority’s nok looks like
When the authority refuses a declaration or a message, the status is rejected and the words of the authority are on the history entry and on the message, exactly as it wrote them, in Romanian. They are text for a person: do not parse them. Two examples: “Nu aveti drept in SPV pentru CIF=…” (an upload the authority refused at once, which has no upload index) and “UIT-ul nu poate fi identificat.”. If a change is refused, reconcile your records with the authority’s list.