Goods lines and tariff codes
How to describe the goods of a declaration: tariff code, unit, masses and value of each line, and how the gateway adds them up.
On this page
A declaration carries one or more goods lines in goods. A consignment that holds several kinds of goods gets one line for each kind, and the whole consignment gets one UIT code. The lines you send replace the lines the declaration had.
The fields of a line
| Field | Meaning | Rule |
|---|---|---|
name | What is transported, as you declare it. | Required, at most 200 characters. |
code | Your own code for the item. | Optional. |
tariffCode | The Combined Nomenclature code of the goods. | 4, 6 or 8 digits. Required unless the operation type is DIN or DIE. |
purposeCode | Why the goods travel. | One of the purposes the operation type accepts. See Operation types and required fields. |
quantity | How many units. | A decimal string with at most two decimals, above zero. |
unit | The unit of the quantity. | A UN/ECE code of 2 or 3 characters, for example KGM (kilogram), LTR (litre), XBG (bag), XBO (bottle), XPK (package), XJC (jerrican). |
netMass | Net mass of the whole line, in kilograms. | A decimal string, above zero. Required unless the type is DIN or DIE. |
grossMass | Gross mass of the whole line, in kilograms: the goods and the packaging they travel in. | Required, above zero, not below the net mass. |
value | Value of the whole line in lei, without VAT. | A decimal string, zero allowed. Required unless the type is DIN or DIE. |
Masses and values are for the whole line, not per unit, and are decimal strings with at most two decimals, so no rounding happens on the way.
An example
The delivery of sales order CV-1042 has six lines. The tariff code is given to 6 digits, which the authority accepts.
| Name as declared | Tariff code | Quantity | Unit | Net kg | Gross kg | Value lei |
|---|---|---|---|---|---|---|
| Cartofi albi, sac de 25 kg | 070190 | 6 | XBG | 150.00 | 151.80 | 330.00 |
| Ceapă galbenă, plasă de 10 kg | 070310 | 4 | XBG | 40.00 | 40.60 | 112.00 |
| Morcovi, sac de 10 kg | 070610 | 4 | XBG | 40.00 | 40.60 | 128.00 |
| Mere Golden, ladă de 12 kg | 080810 | 8 | XCR | 96.00 | 103.20 | 384.00 |
| Apă minerală plată, 2 l, set de 6 | 220110 | 10 | XPK | 120.00 | 127.00 | 150.00 |
| Băutură carbogazoasă îndulcită, 2 l, set de 6 | 220210 | 3 | XPK | 36.00 | 38.10 | 72.00 |
| Total | | | 482.00 | 501.30 | 1176.00 |
The thresholds
The gateway adds the lines. Vehicles are monitored when the goods weigh more than 500 kg gross or are worth more than 10,000 lei. Exactly on a threshold is not above it. The delivery above weighs 501.30 kg gross: above the mass threshold, although its value of 1176.00 lei is far below the value threshold.
When both the gross mass and the value are at or under their thresholds, the checks add the warning below_thresholds. A warning does not block sending: the gateway does not decide whether you must declare, and you may declare a transport that is under both. Errors and warnings lists every check.
Change the lines
On a draft, send the whole list of lines with updateDeclaration. Once the declaration has its UIT code, the lines change only through a correction, and only before the vehicle leaves: see Correct and delete.
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
}