Anaf v1 / e-Transport
Validate declaration
The XSD verdict plus the Schematron rules for a transport notification — including the rules tying the operation code to the declared purpose and the exit point.
POST
https://oneapi.ro/api/anaf/v1/etransport/validate
Request body
The request body is the whole document, sent raw (Content-Type: application/xml) — not an object with fields.
A transport declaration
An intra-community supply
An export
Query parameters
This route accepts no query parameters.
How it behaves
- The document can also be sent as a file:
multipart/form-datawith thefisierfield (curl -F fisier=@document.xml), instead of the raw body. The file content becomes the request body, so the result is identical; options stay in the query string, and any other form field next tofisierreturns422 camp_necunoscut. - Takes the XML of an e-Transport declaration and returns the verdict across two cumulative layers: (1) structure — the official v2 XSD, validated natively; (2) business rules — the official ANAF Schematron v2.0.2, run locally.
- An invalid XML is not a request error: the response is
200withvalid:falseand the list of errors inerrors[], each withcod,mesaj,camp. - Zero retention: the XML received is not written and not logged.
What it is for
- Checking a declaration generated elsewhere, before filing it.
- Debugging a declaration rejected by ANAF, with the Schematron errors made readable.
Response structure
FieldTypeDescription
data.valid
boolean
The cumulative verdict (XSD + Schematron).
data.standard
string
ETRANSP-v2.
data.schema_version
string
The schema/standard used for validation, when available (e.g.
FACT1 or d390_v3.xsd); otherwise null.
data.xsd_checked
boolean
Whether XSD validation ran.
data.schematron_checked
boolean
Whether the official Schematron ran (may be
false if the engine is missing).
data.errors
array
The validation errors
{cod,mesaj,camp}. Empty when valid is true.
data.warnings
array
Non-blocking warnings.
meta.generat_la
string
When the response was built (ISO 8601).
Response examples
body: @etransport.xml
POSThttps://oneapi.ro/api/anaf/v1/etransport/validate
{
"data": {
"valid": true,
"standard": "ETRANSP-v2",
"schema_version": "XSD v2 (2023-01-26) + Schematron v2.0.2",
"xsd_checked": true,
"schematron_checked": true,
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 43+03: 00"
}
}
body: @etransport-lic.xml
POSThttps://oneapi.ro/api/anaf/v1/etransport/validate
{
"data": {
"valid": true,
"standard": "ETRANSP-v2",
"schema_version": "XSD v2 (2023-01-26) + Schematron v2.0.2",
"xsd_checked": true,
"schematron_checked": true,
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 43+03: 00"
}
}
body: @etransport-exp.xml
POSThttps://oneapi.ro/api/anaf/v1/etransport/validate
{
"data": {
"valid": true,
"standard": "ETRANSP-v2",
"schema_version": "XSD v2 (2023-01-26) + Schematron v2.0.2",
"xsd_checked": true,
"schematron_checked": true,
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 43+03: 00"
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 413 | payload_prea_mare | The document exceeds the accepted size limit. |
| 422 | parametru_necunoscut | A query parameter the route does not accept. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
Errors in the Anaf module use the same envelope as the rest of the platform, with two extra fields: {eroare: {cod, mesaj, camp, request_id}}. eroare.cod is stable and is what you branch on; on validation (422) the code is case-specific: xml_invalid, xml_nu_e_factura, unitate_necunoscuta, luna_invalida and so on. camp points at the offending field when one can be identified.
{
"eroare": {
"cod": "parametru_necunoscut",
"mesaj": "A query parameter the route does not accept.",
"camp": null,
"request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
}
}