How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A Bucharest company that moves goods by road can have a declaration duty before the truck leaves. This page is about the ANAF and Ministry of Finance rules for RO e-Transport and how a custom PHP logistics or order system should carry the declaration data. The author is Mariusz Szatkowski, an independent developer who works from Gdynia, by email and shared documents. I am not a lawyer: scope questions go to your adviser, and I build what the documents describe.

Photograph of the Romanian Athenaeum on Calea Victoriei by Ion Gheban, shared under CC BY-SA 4.0 on Wikimedia Commons.
RO e-Transport is the national system for monitoring the road transport of goods. According to the Ministry of Finance presentation page, it generates a unique registration code for each transport. The ANAF page for RO e-Transport leads to the Ministry of Finance documentation site, and the technical files for developers sit there.
The procedure that governs it is approved by the joint order of the ANAF president and the president of the Romanian Customs Authority, 1,337/1,268/2024, published in Official Gazette 597 of 27 June 2024. It repealed the earlier Order 2,545/6,316/2022. I read the English informative version published by the Ministry of Finance. The legal text is the Romanian one in the gazette.
Under Article 1 of the procedure, the system monitors the international road transport of goods of any kind, and the road transport of goods with high fiscal risk. It covers a laden journey on public roads with a place of departure or entry on the national territory and a point of arrival or exit, on the territory of Romania.
The order sets a threshold in Article 1(4). Vehicles subject to monitoring are those with a technically permissible maximum mass of at least 2.5 tonnes, loaded with goods with a total gross mass of more than 500 kg or a total value of more than 10,000 lei, relating to at least one part of the goods being transported.
Scope still depends on the operation and on who the declaring party is. The procedure points to Emergency Ordinance 41/2022 for the categories and for the users who must declare. The Ministry of Finance lists the amending acts on its legislation page, up to Emergency Ordinance 129/2024 published on 11 November 2024. I read the order and the technical pages, not every amending act. For a given product line, the question “does this shipment need a declaration” goes to your adviser or forwarder, and the answer becomes configuration in the system.
After the data of a transport is transmitted, the system automatically assigns a unique identification number, the UIT. Article 3 sets how many: when a shipment includes several transports that meet the Article 1(4) conditions, one UIT is issued for each transport. For a shipment crossing the border or running within Romania, all transports of the shipment are declared and the system generates a single UIT for them.
The UIT travels with the shipment:
The format is fixed in the ANAF XML schema. A UIT is 16 characters: 14 from the digits and the capital letters except O, I, Z, S, G and B, then two digits. A comment in the schema says the last two digits are the last two digits of the sum of the ASCII codes of the preceding characters. I tested this in PHP against the UIT codes in the ANAF sample files, and both matched:
<?php
declare(strict_types=1);
function uitIsValid(string $uit): bool
{
if (preg_match('/^[0-9ACDEFHJKLMNPQRTUVWXY]{14}[0-9]{2}$/', $uit) !== 1) {
return false;
}
$sum = array_sum(array_map('ord', str_split(substr($uit, 0, 14))));
return substr($uit, 14) === sprintf('%02d', $sum % 100);
}
var_dump(uitIsValid('4L5Y2W6Q0C8K4A05')); // bool(true), from an ANAF sample file
var_dump(uitIsValid('4L5Y2W6Q0C8K4A06')); // bool(false), wrong check digitsA check like this catches a mistyped code in a warehouse screen before it reaches the driver. It does not prove the UIT exists in the ANAF system.
The declaration is an XML file. The Ministry of Finance publishes schema version 2 (dated 26 January 2023), a Schematron file, a field structure sheet and sample files. The root element is eTransport with the attributes codDeclarant and refDeclarant, and it holds exactly one of four children: a notification, a deletion, a confirmation or a vehicle change.
A notification carries:
The operation type is a code: 10, 12, 14, 20, 22, 24, 30, 40, 50, 60 or 70. The list in the API description names them: 10 AIC, 12 LHI, 14 SCI, 20 LIC, 22 LHE, 24 SCE, 30 TTN, 40 IMP, 50 EXP, 60 DIN and 70 DIE. Each operation type allows its own purpose codes in the schema. For a TTN, transport on the national territory, the ANAF sample uses purpose code 101, commercialisation.
Article 3 of the procedure also fixes how the numbers are filled:
These rules belong in one place in code, a mapper from your order and shipping records to the XML, with tests. A rounding difference or a VAT-inclusive total in a warehouse export would otherwise be sent as it is.
The Ministry of Finance publishes a description of the services, last dated 29 July 2024. Authentication is either a digital certificate presented at call time, or OAuth2. The paths differ by host: the certificate variant uses webserviceapl.anaf.ro, the OAuth2 variant uses api.anaf.ro, and each has a test and a prod environment.
| Service | Call | Purpose |
|---|---|---|
| Upload | POST on /ETRANSPORT/ws/v1/upload/ with the standard, the tax code and the version | submits the XML, with Content-Type: application/xml |
| Status | GET on /ETRANSPORT/ws/v1/stareMesaj/ with the upload index | state of a submitted declaration |
| List | GET on /ETRANSPORT/ws/v1/lista/ with days (1 to 60) and the tax code | final states of valid notifications and notifications with errors |
| Info | GET on /ETRANSPORT/ws/v1/info with query parameters | active notifications in which the given tax code is the transport organiser |
The standard value accepted is ETRANSP, the tax code is numeric with at most 13 digits and the version is 1 or 2. The upload index returned at upload is the key for the status call. The same page says the earlier download service was removed from both the test and production environments, and that the list service changed, so a client written from an older description should be rechecked against the current documentation.
The list service returns no intermediate states for valid notifications, and the records are not sorted. The description tells users to sort locally by the creation date field. Each record carries the UIT, the declarant’s reference, the operation type and the transport date.
A minimal upload from PHP with the standard curl functions looks like this. Authentication is left out, because it follows the ANAF method you choose:
<?php
declare(strict_types=1);
function uploadTransport(string $baseUrl, string $cif, string $xml): string|false
{
$ch = curl_init("$baseUrl/ETRANSPORT/ws/v1/upload/ETRANSP/$cif/2");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $xml,
CURLOPT_HTTPHEADER => ['Content-Type: application/xml'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
// add the certificate or OAuth2 authentication ANAF documents
]);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}Here $baseUrl is one of the test or production hosts named above, and the test host comes first in any new build.
A declaration is not a field on an order. It is a record with its own life, and one shipment can have several. A table that works for this keeps:
refDeclarant, your own reference, up to 50 characters in the schema, which the list and info services echo backThe upload does not give the final answer. Article 6(3) says that until validation and storage finish, the data has the status processing. So the code sends the XML in a queued job, stores the upload index, and a second job reads the status until it is final. Printing the delivery note waits for a UIT. A shipment without one is blocked in the warehouse screen with the reason shown.
Validate the XML against the published schema before sending. PHP can do that with DOMDocument::schemaValidate() on the file from the Ministry of Finance, and libxml_use_internal_errors() collects the messages. The Schematron rules are a second layer, and the system’s semantic checks run on ANAF’s side in any case. A failed file is not a submitted declaration, so a retry is a new upload, not a duplicate.
The procedure covers the cases that break a clean flow, and each one should have a path in the code.
A queue-based design keeps these as separate message types: notification, correction, vehicle change, confirmation, deletion. They match the four XML children plus a correction inside the notification. Each message links to the UIT of the shipment, and the history stays in the table.
Most failures follow from the documents above, not from PHP:
The test environment exists for the first four. Run a full cycle there with the sample files from the Ministry of Finance, and then with a few real shipments of your own, before production.
I need read access to the order and shipping data model, and test credentials for the ANAF environment. What I offer for custom PHP work in general is on the PHP developer page.
If your Bucharest company ships goods on Romanian roads and the declarations still go through a web form by hand, send the flow and the operation types through the contact form. A written estimate for the PHP integration costs nothing, and the adviser’s answer on scope comes first.
Examples of my work.
The website strefapremium.pl has been designed as a modern premium portal, dedicated to users seeking exclusive content and services. The site combines high-...
The site weglopex.pl was created as a modern information portal, dedicated to enthusiasts and professionals in the energy industry, with particular focus on ...
QUALITY WATCH is a customer experience and service-quality platform presenting mystery shopping, service audits, customer journey work and B2B consulting services.
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.