Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    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

    FieldMeaningRule
    nameWhat is transported, as you declare it.Required, at most 200 characters.
    codeYour own code for the item.Optional.
    tariffCodeThe Combined Nomenclature code of the goods.4, 6 or 8 digits. Required unless the operation type is DIN or DIE.
    purposeCodeWhy the goods travel.One of the purposes the operation type accepts. See Operation types and required fields.
    quantityHow many units.A decimal string with at most two decimals, above zero.
    unitThe 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).
    netMassNet mass of the whole line, in kilograms.A decimal string, above zero. Required unless the type is DIN or DIE.
    grossMassGross mass of the whole line, in kilograms: the goods and the packaging they travel in.Required, above zero, not below the net mass.
    valueValue 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 declaredTariff codeQuantityUnitNet kgGross kgValue lei
    Cartofi albi, sac de 25 kg0701906XBG150.00151.80330.00
    Ceapă galbenă, plasă de 10 kg0703104XBG40.0040.60112.00
    Morcovi, sac de 10 kg0706104XBG40.0040.60128.00
    Mere Golden, ladă de 12 kg0808108XCR96.00103.20384.00
    Apă minerală plată, 2 l, set de 622011010XPK120.00127.00150.00
    Băutură carbogazoasă îndulcită, 2 l, set de 62202103XPK36.0038.1072.00
    Total482.00501.301176.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();

    Response 202

    {
      "operationId": "43fafee2-5fd5-48e0-bbc3-765225141b69",
      "status": "accepted",
      "aggregateId": "1cf74abb-68ce-4948-b2e5-3ddace415443",
      "aggregateRevision": 2
    }