Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Vehicles

    Change the vehicle and the trailers of a transport that is on the road, and read the changes.

    On this page

    List the vehicle changes of a declaration

    GET /etransport/v1/declarations/{declarationId}/vehicle-changes

    Returns the changes of vehicle the authority accepted for the declaration, oldest first.

    Parameters

    NameInTypeRequiredMeaning
    declarationId path string (uuid) Yesrequired The declaration.
    limit query integer Nooptional Records per page, from 1 to 500. Default 100 Range 1 – 500
    cursor query string Nooptional The nextCursor of the previous page.

    Responses

    StatusMeaningBody
    200 A page of vehicle changes. VehicleChangePage
    401 The token is missing, has expired or is not ours. Error
    403 The token does not give access to this company or operation. Error
    404 The declaration does not exist in your account. Error
    429 There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. Error
    503 The gateway cannot answer now. Error

    Request

    curl

    curl "$RDC_BASE_URL/etransport/v1/declarations/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes?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/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes?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/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes?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/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes?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

    JSON

    {
      "items": [
        {
          "at": "2026-11-23T06:35:00Z",
          "vehicle": "ZZ24BRM",
          "trailers": [],
          "note": "Pană de cauciuc, vehicul înlocuit",
          "uploadIndex": "1000221"
        }
      ],
      "nextCursor": null
    }

    Change the vehicle

    POST /etransport/v1/declarations/{declarationId}/vehicle-changes

    Sends the new vehicle and trailers of a transport that is on the road. The time of the change is the time the request is received. It is allowed after departure and within the validity of the code.

    Parameters

    NameInTypeRequiredMeaning
    declarationId path string (uuid) Yesrequired The declaration.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A UUID you choose for this change. Send it again to repeat the request.
    expectedRevision integer Yesrequired The revision of the declaration you read.
    vehicle string Yesrequired The plate of the vehicle that carries the goods now.
    trailers string[] Nooptional The plates of the trailers; at most two.
    note string Nooptional A note, at most 200 characters.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. OperationResult
    400 The request cannot be read or breaks the contract: the JSON is malformed, a field is missing or unknown, or a type is wrong. fields names each one. Error
    401 The token is missing, has expired or is not ours. Error
    403 The token does not give access to this company or operation. Error
    404 The declaration does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The declaration changed since the revision you sent. Nothing was applied. invalid_status: The declaration is not in a status that allows this. notification_pending: A message about this declaration is still waiting for the authority’s answer. One message at a time. authorisation_not_in_force: The company’s access to the authority is not in force. Nothing was sent. not_departed: The vehicle did not leave yet. A vehicle change and a confirmation come after departure. uit_expired: The validity of the UIT code ended. The gateway refuses a correction, a vehicle change and a confirmation; a deletion is still accepted. same_vehicle: The vehicle and the trailers are the ones already declared. Error
    422 invalid_vehicle: A plate is not valid: 2 to 20 capital letters and digits, at most two trailers. note_too_long: The note is longer than 200 characters. Error
    429 There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. Error
    503 The gateway cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/etransport/v1/declarations/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "58ccd74e-a566-4307-a4ca-0aac87636ae6",
      "expectedRevision": 3,
      "vehicle": "ZZ21BRM",
      "trailers": [],
      "note": "Vehicul înlocuit după o pană"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/declarations/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "58ccd74e-a566-4307-a4ca-0aac87636ae6",
        "expectedRevision": 3,
        "vehicle": "ZZ21BRM",
        "trailers": [],
        "note": "Vehicul înlocuit după o pană"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/etransport/v1/declarations/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '58ccd74e-a566-4307-a4ca-0aac87636ae6',
            'expectedRevision': 3,
            'vehicle': 'ZZ21BRM',
            'trailers': [],
            'note': 'Vehicul înlocuit după o pană',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "58ccd74e-a566-4307-a4ca-0aac87636ae6",
      "expectedRevision": 3,
      "vehicle": "ZZ21BRM",
      "trailers": [],
      "note": "Vehicul înlocuit după o pană"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/declarations/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes');
    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/15699075-5c6a-4a8b-a225-166309ad1b48/vehicle-changes");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "58ccd74e-a566-4307-a4ca-0aac87636ae6",
      "expectedRevision": 3,
      "vehicle": "ZZ21BRM",
      "trailers": [],
      "note": "Vehicul înlocuit după o pană"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "58ccd74e-a566-4307-a4ca-0aac87636ae6",
      "status": "accepted",
      "aggregateId": "15699075-5c6a-4a8b-a225-166309ad1b48",
      "aggregateRevision": 4
    }