Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Authentication

    Get client credentials, request a token and call the e‑Transport Gateway API with it.

    On this page

    Client credentials, your base address and a test company are issued with your account. Accounts are opened by our team: ask for one through the contact form and we set it up with you.

    Request an account

    Request a token

    The API uses OAuth 2.0 with the client credentials flow. Your client asks the sign-in service for a token with the scope etransport.access and sends it as a bearer token on every request.

    Token request

    curl -X POST "$RDC_TOKEN_URL" \
      -d "grant_type=client_credentials" \
      -d "client_id=$RDC_CLIENT_ID" \
      -d "client_secret=$RDC_CLIENT_SECRET" \
      -d "scope=etransport.access"

    The answer carries these fields.

    FieldMeaning
    access_tokenThe token. Send it as Authorization: Bearer $RDC_TOKEN.
    token_typeAlways Bearer.
    expires_inSeconds until the token ends. Reuse the token until then and ask for a new one before it ends. Never ask for a token per request.

    Call the API

    Every request carries the token. The sample lists records and shows the header in each language.

    curl

    curl "$RDC_BASE_URL/etransport/v1/declarations?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&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?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&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?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&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?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "items": [
        {
          "id": "b0bc421b-5e82-4bc2-9416-a33bd20bf92e",
          "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
          "reference": "PO-8862",
          "operationType": "AIC",
          "status": "processing",
          "uit": null,
          "uploadIndex": "1000131",
          "startDate": "2026-11-24",
          "lastValidDay": "2026-12-08",
          "validity": null,
          "partner": {
            "country": "HU",
            "code": "",
            "name": "Tisza Pack Kft."
          },
          "transporter": {
            "country": "RO",
            "code": "62049137",
            "name": "Transbistrița Logistic SRL"
          },
          "vehicle": "ZZ41TBL",
          "trailers": [
            "ZZ42TBL"
          ],
          "from": {
            "kind": "border_crossing",
            "crossing": 2
          },
          "to": {
            "kind": "address",
            "county": 27,
            "locality": "Piatra-Neamț",
            "street": "Str. Depozitelor",
            "number": null,
            "notes": "Rampa 4"
          },
          "goods": [
            {
              "line": 1,
              "code": null,
              "name": "Cutii de carton ondulat, 40 de paleți",
              "tariffCode": "481910",
              "purposeCode": 101,
              "quantity": "40",
              "unit": "XPX",
              "netMass": "1180.00",
              "grossMass": "1240.00",
              "value": "18400.00"
            }
          ],
          "documents": [
            {
              "type": "cmr",
              "number": "CMR-HU-55812",
              "date": "2026-11-23",
              "remarks": null
            },
            {
              "type": "invoice",
              "number": "TP-30918",
              "date": "2026-11-22",
              "remarks": null
            }
          ],
          "totals": {
            "lines": 1,
            "netMass": "1180.00",
            "grossMass": "1240.00",
            "value": "18400.00"
          },
          "departedAt": null,
          "confirmation": null,
          "vehicleChanges": [],
          "correctionOf": null,
          "afterOutage": false,
          "source": "gateway",
          "revision": 6
        },
        {
          "id": "15699075-5c6a-4a8b-a225-166309ad1b48",
          "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
          "reference": "LIV-2026-01839",
          "operationType": "TTN",
          "status": "accepted",
          "uit": "75LXQY50R5NU4243",
          "uploadIndex": "1000121",
          "startDate": "2026-11-23",
          "lastValidDay": "2026-11-27",
          "validity": "valid",
          "partner": {
            "country": "RO",
            "code": "39172614",
            "name": "Cofetăria Vălul Alb SRL"
          },
          "transporter": {
            "country": "RO",
            "code": "48290619",
            "name": "Brumar Distribuție SRL"
          },
          "vehicle": "ZZ24BRM",
          "trailers": [],
          "from": {
            "kind": "address",
            "county": 27,
            "locality": "Piatra-Neamț",
            "street": "Str. Depozitelor",
            "number": null,
            "notes": "Rampa 4"
          },
          "to": {
            "kind": "address",
            "county": 27,
            "locality": "Roman",
            "street": "Str. Principală",
            "number": null,
            "notes": null
          },
          "goods": [
            {
              "line": 1,
              "code": "ME-0307",
              "name": "Mere Golden, ladă de 12 kg",
              "tariffCode": "080810",
              "purposeCode": 101,
              "quantity": "12",
              "unit": "XCR",
              "netMass": "144.00",
              "grossMass": "154.80",
              "value": "576.00"
            },
            {
              "line": 2,
              "code": "NU-0622",
              "name": "Nuci decojite, sac de 5 kg",
              "tariffCode": "080232",
              "purposeCode": 101,
              "quantity": "6",
              "unit": "XBG",
              "netMass": "30.00",
              "grossMass": "30.60",
              "value": "1800.00"
            },
            {
              "line": 3,
              "code": "AP-0412",
              "name": "Apă minerală plată, 2 l, set de 6",
              "tariffCode": "220110",
              "purposeCode": 101,
              "quantity": "6",
              "unit": "XPK",
              "netMass": "72.00",
              "grossMass": "76.20",
              "value": "90.00"
            }
          ],
          "documents": [
            {
              "type": "delivery_note",
              "number": "AV-1039",
              "date": "2026-11-23",
              "remarks": null
            },
            {
              "type": "invoice",
              "number": "BRD-2026-00415",
              "date": "2026-11-23",
              "remarks": null
            }
          ],
          "totals": {
            "lines": 3,
            "netMass": "246.00",
            "grossMass": "261.60",
            "value": "2466.00"
          },
          "departedAt": "2026-11-23T05:48:00Z",
          "confirmation": null,
          "vehicleChanges": [
            {
              "at": "2026-11-23T06:35:00Z",
              "vehicle": "ZZ24BRM",
              "trailers": [],
              "note": "Pană de cauciuc, vehicul înlocuit"
            }
          ],
          "correctionOf": null,
          "afterOutage": false,
          "source": "gateway",
          "revision": 3
        },
        {
          "id": "4533692d-469c-4b70-acdb-d1a9a4a0f54f",
          "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
          "reference": "LIV-2026-01842",
          "operationType": "TTN",
          "status": "accepted",
          "uit": "4F7K2Q9M8X1D6383",
          "uploadIndex": "1000128",
          "startDate": "2026-11-23",
          "lastValidDay": "2026-11-27",
          "validity": "valid",
          "partner": {
            "country": "RO",
            "code": "39172541",
            "name": "Hanul Ozana SRL"
          },
          "transporter": {
            "country": "RO",
            "code": "48290619",
            "name": "Brumar Distribuție SRL"
          },
          "vehicle": "ZZ21BRM",
          "trailers": [],
          "from": {
            "kind": "address",
            "county": 27,
            "locality": "Piatra-Neamț",
            "street": "Str. Depozitelor",
            "number": null,
            "notes": "Rampa 4"
          },
          "to": {
            "kind": "address",
            "county": 27,
            "locality": "Târgu Neamț",
            "street": "Str. Principală",
            "number": null,
            "notes": null
          },
          "goods": [
            {
              "line": 1,
              "code": "CA-0010",
              "name": "Cartofi albi, sac de 25 kg",
              "tariffCode": "070190",
              "purposeCode": 101,
              "quantity": "6",
              "unit": "XBG",
              "netMass": "150.00",
              "grossMass": "151.80",
              "value": "330.00"
            },
            {
              "line": 2,
              "code": "CE-0101",
              "name": "Ceapă galbenă, plasă de 10 kg",
              "tariffCode": "070310",
              "purposeCode": 101,
              "quantity": "4",
              "unit": "XBG",
              "netMass": "40.00",
              "grossMass": "40.60",
              "value": "112.00"
            },
            {
              "line": 3,
              "code": "MO-0201",
              "name": "Morcovi, sac de 10 kg",
              "tariffCode": "070610",
              "purposeCode": 101,
              "quantity": "4",
              "unit": "XBG",
              "netMass": "40.00",
              "grossMass": "40.60",
              "value": "128.00"
            },
            {
              "line": 4,
              "code": "ME-0307",
              "name": "Mere Golden, ladă de 12 kg",
              "tariffCode": "080810",
              "purposeCode": 101,
              "quantity": "8",
              "unit": "XCR",
              "netMass": "96.00",
              "grossMass": "103.20",
              "value": "384.00"
            },
            {
              "line": 5,
              "code": "AP-0412",
              "name": "Apă minerală plată, 2 l, set de 6",
              "tariffCode": "220110",
              "purposeCode": 101,
              "quantity": "10",
              "unit": "XPK",
              "netMass": "120.00",
              "grossMass": "127.00",
              "value": "150.00"
            },
            {
              "line": 6,
              "code": "SU-0518",
              "name": "Băutură carbogazoasă îndulcită, 2 l, set de 6",
              "tariffCode": "220210",
              "purposeCode": 101,
              "quantity": "3",
              "unit": "XPK",
              "netMass": "36.00",
              "grossMass": "38.10",
              "value": "72.00"
            }
          ],
          "documents": [
            {
              "type": "delivery_note",
              "number": "AV-1042",
              "date": "2026-11-23",
              "remarks": null
            },
            {
              "type": "invoice",
              "number": "BRD-2026-00418",
              "date": "2026-11-23",
              "remarks": null
            }
          ],
          "totals": {
            "lines": 6,
            "netMass": "482.00",
            "grossMass": "501.30",
            "value": "1176.00"
          },
          "departedAt": null,
          "confirmation": null,
          "vehicleChanges": [],
          "correctionOf": null,
          "afterOutage": false,
          "source": "gateway",
          "revision": 1
        }
      ],
      "nextCursor": null
    }

    Refused requests

    StatusCodeCauseWhat to do
    401unauthorizedNo token, or a token that is not valid or has ended.Ask for a new token, then repeat the request.
    403forbiddenA valid token without the scope etransport.access, or a request for data outside your account.Do not repeat it. Check the scope and the company.

    Build against the test company first. Read Sandbox and live.

    The full rule: Developer guide