RO e-Transport Service
Access info
Endpoint | https://ro-etransport-api.socrate.io/graphql |
Required access keys | Tenant-level service access key |
Pricing | Please contact us for details at contact@bitsoftware.ro |
Notes | To call the service, the access key must be provided in the x-api-key header of the HTTP request. If you are using the GraphQL console, you can view the service’s documentation and schema only after entering an access key. Make sure that the scope of the key allows access to the queries and mutations that you require. For example, to grant the key access to all queries and mutations, the keys’s scope must be set to ro-etransport-api:query:* ro-etransport-api:mutation:* . |
Usage
The RO e-Transport Service enables callers to submit mandatory e-Transport declarations to Romanian National Agency of Fiscal Administration (ANAF). e-Transport declarations are mandatory for:
- importers whose name features on the import customs declaration and exporters whose name features on the export customs declaration, if the import/export operation involves high fiscal risk goods;
- beneficiaries in Romania, in case of purchases of high fiscal risk goods within EU;
- suppliers in Romania, in case of internal shipments or deliveries within EU that involve high fiscal risk goods;
- warehouse keepers, if the high fiscal risk goods are the object of deliveries within EU that transit Romania. This concerns goods unloaded on Romanian territory either for storage or for the purpose of creating a new shipment, as well as goods loaded from Romanian territory after storage or after a new shipment has been created.
The object of e-Transport monitoring are road vehicles with a maximum mass of at least 3.5 tons, loaded with high fiscal risk goods exceeding 500 kg of gross weight or the total value exceeding 10000 RON (Romanian Lei).
The list of high fiscal risk goods, as well as the most recent regulations pertaining to e-Transport reporting system, are established by the relevant Romanian legislation, which is available (in Romanian language) at https://mfinante.gov.ro/ro/web/etransport/legislatie.
From the technical point of view, the e-Transport reporting involves sending any of the following transaction types (as HTTP requests) to the ANAF API:
- Notification. The notification informs ANAF about a planned shipment; it includes an XML file with detailed information about the shipment, including the vehicle details and type and quantity of transported goods. In return, on success, ANAF responds with a UIT code (in Romanian, Unique Transport Identification code) and a signed XML inside a zip archive. The vehicle driver must have the UIT code before starting the route (or before reaching the Romanian customs office, if applicable) and provide it to the relevant authorities on request.
- Confirmation. The confirmation is submitted to ANAF by the recipient of high fiscal risk goods to confirm receipt, partial receipt, or non-receipt of high fiscal risk goods;
- Modification. This refers to modification of transport details, as long as it occurs within the legally permitted period (for example, before the vehicle started the route, or before it has reached the Romanian customs office);
- Modification of vehicle. This refers to modifying any details about the vehicle that will carry out the transport.
- Deletion. This request permits deletion of incorrectly submitted notifications.
As is the case of other SBS services, the RO e-Transport Service interacts with ANAF on your behalf and provides an abstraction layer to simplify ANAF reporting. More specifically, it enables you to perform the following tasks:
- manage authentication and secure access to ANAF;
- submit new e-Transport declarations to ANAF and obtain the Unique Transport Identification codes (UIT codes);
- modify existing declaration data, including vehicle information
- delete declarations submitted erroneously and thus cancel previously obtained UIT codes
- send e-Transport confirmation transactions
- store data related to each shipment.
There are two versions of e-Transport API provided by ANAF:
- v1: legacy version which is still in use at the time of updating this documentation (3 May 2023)
- v2: newer version, available from 17th of February 2023
This documentation covers reporting for version 2 only.
Prerequisites
Before using this service, note the following prerequisites:
- The organization(s) for which e-Transport reporting takes place done must exist in the SBS system. You can add new organizations programmatically through the Organizations Service, or from the SBS Portal.
- Any application that communicates with ANAF, including your application, requires authorization with ANAF. Therefore your app must be configured to handle OAuth 2.0 authorization with ANAF, as described in Configure ANAF Oauth 2.0 secrets.
- Once the OAuth 2.0 secrets are configured for your app (see previous bullet), you must authorize with ANAF the organization(s) for which e-Transport reporting takes place. You can perform the authorization either programmatically or from the SBS Portal. To authorize an organization programmatically, run the
generateAuthorizationRequest
mutation of the RO ANAF OAuth Service. For instructions about performing the authorization process from the SBS Portal, see Managing ANAF Authorizations.
How it works
You can submit e-Transport declarations either to the ANAF test API or to the production API. To configure which API should be used, modify your application settings from the SBS Console, as described in Configure ANAF Environment.
To submit a new e-Transport declaration to ANAF, run the notify
mutation. The response includes, among other fields, a unique shipment ID that you will need to track the declaration status in subsequent requests. To status
field of the response provides the status of the declaration. Note that, immediately after submission, the declaration has the status UPLOADED. This means that is has been uploaded to ANAF but there is no indication yet if it was accepted or rejected by ANAF.
To check for the shipment declaration’s outcome, wait at least 5 minutes, and then run the shipment
query, for example:
query shipment ($organizationId:ID!, $id:ID!) {
shipment(organizationId:$organizationId, id:$id) {
id
organizationId
uit
stages {
id
type
xmlFile { id, downloadUrl }
uploadDate
uploadId
downloadId
status
uploadedToTestEnvironment
errors
createdAt
}
status
errors
createdAt
}
}
Make sure to replace the input variables as applicable.
{
"organizationId": "YOUR_ORGANIZATION_ID",
"id": "YOUR_SHIPMENT_ID"
}
The response provides the status of the declaration in the status
column. The possible values at this stage are as follows:
- UPLOADED - see above.
- REJECTED - the declaration has been rejected by ANAF. For the error details, please check the
messages
field of the response, or the response XML. - PROCESSED - ANAF has accepted the shipment declaration.
Note that the list of values listed above is not exhaustive; if you take subsequent action against an existing declaration (like running a modify
or delete
mutation for the same declaration), then additional values may appear, as described in the status
field of the Shipment
type.
Importantly, the field stage
of a Shipment
represents the state of the shipment declaration at a particular point of time during the its lifecycle. There may be multiple stages for the same declaration, and each stage indicates the kind of operation taken against the declaration (like NOTIFICATION, MODIFICATION, DELETION, or CONFIRMATION).
For example, immediately after you create a new declaration, the declaration has a stage of type NOTIFICATION which has the status UPLOADED. After a few minutes, if the declaration is rejected by ANAF, the stage status (and the overall declaration status) will change to REJECTED. If the declaration is accepted by ANAF, then the stage status (and the overall declaration status) will change to PROCESSED.
Let’s assume that a declaration has been rejected by ANAF. In this case, you will likely want to submit a modify
mutation with corrected data for the same declaration. Consequently, a new shipment stage will be created of type MODIFICATION. This stage will go through the same statuses as the initial submission. That is, it will first be in the UPLOADED status, and after roughly 5 minutes it will get either the status PROCESSED or REJECTED.
The same applies if you delete an existing declaration, through a call to the delete
mutation. A new shipment stage will be created of type DELETION, and its status will initially be UPLOADED and subsequently become PROCESSED or REJECTED. Depending on the delete operation outcome, the overall declaration status in this case will become either DELETED or DELETE_FAILED.
The same logic also applies if you confirm an existing declaration through a call to the confirm
mutation. Namely, when you confirm a declaration, a new shipment stage of type CONFIRMATION will be created, and its status will initially be UPLOADED, and will subsequently become CONFIRMED or REJECTED. Depending on the confirmation operation outcome, the overall declaration status in this case will become either CONFIRMED or CONFIRMATION_FAILED.
Queries
carrierMessages
Returns a list of messages available from ANAF for e-transport carrier organizations. For this query to retrieve results, the organizationId
must belong to a company whose Fiscal Identification Code (in Romanian, CUI) has been declared as carrier when a shipment notification was submitted to ANAF. To query the available organizations, run the organizations
query. To add or manage organizations, use the Organizations Service.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (created from the Organizations Service for which messages are being retrieved. |
filter | CarrierMessagesFilter! |
Mandatory. See the CarrierMessagesFilter input. |
nextToken | String |
Optional. Used to fetch the next set of query results. This value can be obtained from the nextToken attribute of the MessagesResult type. |
CarrierMessagesFilter
input
Attribute | Type | Description |
---|---|---|
uitCreatorFiscalCode | Cod30Type |
Optional. The fiscal code of the initial declarant of the shipment notification. |
uit | UitType |
Optional. The unique transport identification coded (UIT) of the shipment. |
declarantReference | Str50 |
Optional. The reference added by the declarant (for their own purpose) when creating the shipment notification. |
Result
CarrierMessagesResult
type
Attribute | Type | Description |
---|---|---|
items | [CarrierMessage] |
An array of CarrierMessage objects. |
nextToken | String |
If null, then the query has reached the end of the list of results that match the query criteria. If not null, then use this value in the nextToken input argument, with the same filter, to fetch the next set of results. |
CarrierMessage
type
Attribute | Type | Description |
---|---|---|
uit | UitType |
The unique transport identification code. |
declarantCode | String |
The FIC (Fiscal Identification Code) of the declaring entity. |
declarantName | String |
The name of the declaring entity. |
declarantReference | String |
A reference generated by the declaring entity from their system on obtaining the UIT. |
shipmentDate | String |
The date of the shipment. |
uitExpiryDate | String |
The date when the unique transport identification code (UIT) is due to expire. |
transporterCode | String |
The identifier code of the entity organizing the transport. This can be one of the following: PNC - Personal Numerical Code (CNP - Cod numeric personal), UIC - Unique Identification Code (CUI - Cod unic de identificare), FIN - Fiscal Identification Number (NIF - Număr de identificare fiscală), or the string “PF” (this signifies a physical person, Persoană fizică). |
transporterName | String |
The name of the entity organizing the transport. |
vehiclePlateNumber | String |
The plate number of the transporting vehicle. |
trailer1PlateNumber | String |
The plate number of the first vehicle trailer. |
trailer2PlateNumber | String |
The plate number of the second vehicle trailer. |
vehicleModificationInfo | [VehicleModificationInfo] |
This field is present only if vehicle modification took place for this UIT. See the VehicleModificationInfo type. |
origin | Place |
The place where the shipment starts. |
destination | Place |
The place where the shipment ends. |
documents | [String] |
The list of transport documents. |
VehicleModificationInfo
type
Attribute | Type | Description |
---|---|---|
vehicleModificationDate | Date |
The date when vehicle modification took place. |
vehiclePlateNumber | String |
The plate number after vehicle modification. |
trailer1PlateNumber | String |
The trailer 1 plate number after vehicle modification. |
trailer2PlateNumber | String |
The trailer 2 plate number after vehicle modification. |
comment | String |
The comment added when vehicle modification took place. |
declarantCode | String |
The FIC (Fiscal Identification Code) of the entity that declared the vehicle modification (this can be either the initial declarant or the transport organizer, as applicable). |
declarantReference | String |
The internal reference submitted when vehicle modification took place. |
declarationDate | Date |
The declared date of the shipment. |
Place
type
Attribute | Type | Description |
---|---|---|
placeType | String |
Indicates the place type. Valid values: PTF (border crossing point), BV (customs office), ADR (address on national territory). |
address | String |
The full address. If placeType is PTF or BV, then this field will contain the name of the PTD or BV followed by the county name. For example, “PTF Nadlac, Jud. Arad”. |
countyCode | CodJudetType |
Specifies the county code. For the list of possible values, see List of county codes. |
city | String |
The name of the city or locality. Applicable only if placeType is ADR. |
streetName | String |
The street name. Applicable only if placeType is ADR. |
number | String |
The number component of the address. Applicable only if placeType is ADR. |
other | String |
Other address information. Applicable only if placeType is ADR. |
messages
Returns a list of information messages available from ANAF for the organization supplied as input.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which messages are being retrieved. |
filter | MessagesFilter! |
Mandatory. See the MessagesFilter input. |
nextToken | String |
Optional. Used to fetch the next set of query results. This value can be obtained from the nextToken attribute of the MessagesResult type. |
MessagesFilter
input
Attribute | Type | Description |
---|---|---|
days | Float! |
Mandatory. The number of days for which messages should be retrieved. Valid values range between 1 and 60. |
Result
MessagesResult
type
Attribute | Type | Description |
---|---|---|
items | [Message] |
An array of Message objects. |
nextToken | String |
If null, then the query has reached the end of the list of results that match the query criteria. If not null, then use this value in the nextToken input argument, with the same filter, to fetch the next set of results. |
Message
type
Attribute | Type | Description |
---|---|---|
uit | String |
The unique transport identification code. |
declarantCode | String |
The FIC (Fiscal Identification Code) of the declaring entity. |
declarantReference | String |
The identifier of the declaration record as generated by the declaring entity. This can be a notification ID, deletion ID, confirmation ID, modification ID, or vehicle modification ID. |
source | String |
|
uploadId | String |
The identifier obtained after uploading the declaration file. |
creationDate | String |
The date when the record was created. |
operationType | String |
Identifies the type of operation being declared. For valid values, see the List of operation types. |
shipmentDate | String |
The date of the shipment. |
originCountry | String |
The ISO 3166-1 code of the country of the commercial partner. Note that Greece is identified by EL. |
originCode | String |
The identifier code of the commercial partner. This can be one of the following: PNC - Personal Numerical Code (CNP - Cod numeric personal), UIC - Unique Identification Code (CUI - Cod unic de identificare), FIN - Fiscal Identification Number (NIF - Număr de identificare fiscală), or the string “PF” (this signifies a physical person, Persoană fizică). |
originName | String |
The name of the commercial partner. |
transporterCountry | String |
The ISO 3166-1 code of the country organizing the transport. Note that Greece is identified by EL. |
transporterCode | String |
The identifier code of the entity organizing the transport. This can be one of the following: PNC - Personal Numerical Code (CNP - Cod numeric personal), UIC - Unique Identification Code (CUI - Cod unic de identificare), FIN - Fiscal Identification Number (NIF - Număr de identificare fiscală), or the string “PF” (this signifies a physical person, Persoană fizică). |
transporterName | String |
The name of the entity organizing the transport. |
vehiclePlateNumber | String |
The plate number of the transporting vehicle. |
trailer1PlateNumber | String |
The plate number of the first vehicle trailer. |
trailer2PlateNumber | String |
The plate number of the second vehicle trailer. |
errorMessages | [ErrorMessage] |
See the ErrorMessage type. |
ErrorMessage
type
Attribute | Type | Description |
---|---|---|
type | String |
The type of the error message |
message | String |
The text of the error message. |
organizations
Returns a list of active organizations defined in the Organizations Service. This is a convenience query used to obtain the list of organizations without having to query the Organizations Service separately.
Result
The result is an array of Organization
. Note this is a simplified type compared to the Organization
type from the Organizations Service, and contains only the fields relevant for the RO E-Transport Service.
Organization
type
Attribute | Type | Description |
---|---|---|
id | ID! |
Specifies the organization’s unique identifier. |
name | String |
Specifies the organization’s name. |
tin | String |
Specifies the organization’s tax identification number (TIN) (in Romanian, CIF - cod de identificare fiscală) issued by ANAF (in Romanian, ANAF - Agenția Națională de Administrare Fiscală). |
regNo | String |
Specifies the organization’s registration number issued by the National Trade Registration Office (in Romanian, ONRC - Oficiul National al Registrului Comerțului). |
country | CountryCode |
Enum value that identifies the ISO 3166-2 two-letter country code. |
createdAt | DateTime |
The date and time when the organization record was created in SBS. |
shipment
Returns information about a single shipment.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) to which this shipment belongs. |
id | ID! |
Mandatory. The identifier of the shipment. This value is created after running a notify mutation. |
Result
Shipment
type
Attribute | Type | Description |
---|---|---|
id | ID |
The ID of the shipment record. |
organizationId | ID |
The ID of the organization (from the Organizations Service). |
uit | String |
The transport identification code obtained after submitting the declaration. |
stages | [ShipmentStage] |
The shipment stages provide information about what transactions (shipment stages) have been submitted to ANAF with respect to this shipment ID, and what was the outcome of each transaction. See the ShipmentStage type. |
status | ShipmentStatus |
The status of the shipment. This is an enumeration with the following valid values: UPLOADED - an UIT was obtained, however, the shipment is not confirmed as accepted by ANAF, PROCESSED - ANAF has accepted the shipment, CONFIRMED - either the sending or receiving party has confirmed successful delivery, UPLOAD_FAILED - an upload of the e-transport declaration to ANAF was attempted but it has failed, CONFIRMATION_FAILED - a confirmation transaction was accepted but it failed, DELETED the UIT was cancelled, DELETE_FAILED - an UIT cancellation was attempted but it failed, REJECTED - ANAF has rejected the shipment. |
vehicle | Vehicle |
The details about the vehicle used in this shipment. |
errors | [String] |
A list of errors associated with this shipment record. |
createdAt | DateTime |
The date and time when this record was created. |
ShipmentStage
type
Attribute | Type | Description |
---|---|---|
id | ID |
The unique identifier of the shipment stage. |
type | ShipmentStageType |
An enumeration with the following valid values: NOTIFICATION, MODIFICATION, CONFIRMATION, DELETION. |
xmlFile | File |
The original XML file that was submitted, as a File type. |
zipFile | File |
Deprecated. This field used to store the response file signed by ANAF, in ZIP format, as a File type. Currently, it is no longer populated by ANAF. |
uploadDate | String |
The date and time when the file upload took place, in the format YYYYMMDDHHMM. |
uploadId | Float |
The unique identifier of the upload assigned by ANAF. |
downloadId | Float |
Currently not in use. |
status | ShipmentStageStatus |
An enumeration with the following valid values: UPLOADED, PROCESSED, REJECTED. |
uploadedToTestEnvironment | Boolean |
This field indicates whether the shipment declaration has been uploaded to the ANAF test or production API, based on a flag defined in application settings. A true value means the invoice was uploaded to ANAF test API. |
refDeclarant | String |
Reference to an identifier generated by the declarant for their own purpose. |
errors | [String] |
A list of errors associated with this shipment stage. |
createdAt | DateTime |
The date and time when this record was created. |
Vehicle
type
Attribute | Type | Description |
---|---|---|
nrVehicul | nrVehiculType |
The vehicle plate number. |
nrRemorca1 | nrVehiculType |
The trailer 1 plate number. |
nrRemorca2 | nrVehiculType |
The trailer 2 plate number. |
File
type
Attribute | Type | Description |
---|---|---|
id | ID |
The unique identifier of the shipment stage. |
downloadUrl(expiresIn) | Uri |
Returns the URL at which you can download the file. Set the expiresIn input argument to specify the number of seconds after which the URL should expire. |
shipments
Returns information about all shipments that satisfy the filter criteria.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which shipments are being retrieved. |
filter | ShipmentsFilter! |
Optional. See the ShipmentsFilter input. |
nextToken | String |
Optional. Used to fetch the next set of query results. This value can be obtained from the nextToken attribute of the ShipmentsResult type. |
ShipmentsFilter
type
Attribute | Type | Description |
---|---|---|
ids | [ID] |
Optional. If provided, only shipments matching the IDs in this list will be retrieved. |
status | ShipmentStatus |
Optional. If provided, only shipments matching this shipment status will be retrieved. Valid values: UPLOADED, CONFIRMED, UPLOAD_FAILED, CONFIRMATION_FAILED, DELETED, DELETE_FAILED, REJECTED. |
Result
ShipmentsResult
type
Attribute | Type | Description |
---|---|---|
items | [Shipment] |
An array of Shipment objects that match the filter criteria. |
nextToken | String |
If null, then the query has reached the end of the list of results that match the query criteria. If not null, then use this value in the nextToken input argument, with the same filter, to fetch the next set of results. |
version
Returns the API version.
Mutations
confirm
Submits a confirmation declaration to ANAF. There are two possible scenarios when this action takes place:
-
The recipient of goods confirms complete or partial receipt of goods, based on the unique transport identification code (UIT). In this case, the mandatory input arguments are
organizationId
,uit
, andinput
.At the time when this documentation is updated (15.05.2023), ANAF does not yet provide technical means to submit confirmation declarations for a given UIT. -
The importer of goods is the same as the declarer and they confirm receipt of goods based on a shipment ID. In this case, the mandatory input arguments are
organizationId
,id
, andinput
.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which the declaration is being submitted. |
id | ID |
Conditional. Set this value to the identifier of the shipment record, if applicable. This may be the case when the declared operation type is 40 - Import and the declarer already has a shipment ID. |
uit | UitType |
Conditional. Set this value to the unique transport identification code (UIT) obtained from the declarer (when no shipment ID is available). |
input | ConfirmInput |
Mandatory. Specifies the confirmation type, see the ConfirmInput input. |
refDeclarant | Str50 |
Optional. Specifies the identifier of the declaration as generated by the declarant for their own purpose. This value must not exceed 50 characters. |
declPostAvarie | DeclPostAvarie |
Optional. If provided, the only valid value is D, which indicates that this declaration was submitted after a failure/downtime of the ANAF service, on the next day after the ANAF service became available again. |
ConfirmInput
input
Attribute | Type | Description |
---|---|---|
tipConfirmare | tipConfirmareType! |
An enumeration with the following valid values: 10 - Confirmed, 20 - Partially confirmed, 30 - Disclaimed. |
observatii | Str200 |
An optional message with additional details. For example, “10 banana boxes rejected as not in compliance with the order / not received”. |
Result
See the Shipment
type.
delete
Submits to ANAF a declaration requesting deletion of a previously submitted declaration.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which the declaration is being submitted. |
id | ID |
Mandatory. Set this value to the identifier of the shipment record that is to be deleted. |
refDeclarant | Str50 |
Optional. Specifies the identifier of the declaration as generated by the declarant for their own purpose. This value must not exceed 50 characters. |
declPostAvarie | DeclPostAvarie |
Optional. If provided, the only valid value is D, which indicates that this declaration was submitted after a failure/downtime of the ANAF service, on the next day after the ANAF service became available again. |
Result
See the Shipment
type.
modify
Submits to ANAF a declaration requesting modification of a previously submitted declaration.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which the declaration is being submitted. |
id | ID! |
Mandatory. Set this value to the identifier of the shipment record that is to be modified. |
input | ShipmentInput! |
Mandatory. Specifies the data that is to be updated, as a ShipmentInput object. |
refDeclarant | Str50 |
Optional. Specifies the identifier of the declaration as generated by the declarant for their own purpose. This value must not exceed 50 characters. |
declPostAvarie | DeclPostAvarie |
Optional. If provided, the only valid value is D, which indicates that this declaration was submitted after a failure/downtime of the ANAF service, on the next day after the ANAF service became available again. |
ShipmentInput
input
Attribute | Type | Description |
---|---|---|
codTipOperatiune | CodTipOperatiuneType! |
Mandatory. Identifies the type of operation being declared. For valid values, see the List of operation types. |
bunuriTransportate | [BunuriTransportateType]! |
Mandatory. Specifies the list of transported goods, as a BunuriTransportateType input. |
partenerComercial | PartenerComercialType! |
Mandatory. Specifies the commercial/trade partner, as PartenerComercial input. |
dateTransport | DateTransportType |
Mandatory. Specifies the shipment information, as DateTransportType input. |
locIncarcare | LocatieType |
Specifies the address where goods are loaded, as a LocatieType object. This is a conditional field, which must be filled according to the Rules for reporting location, customs office, and border crossing point. |
locDescarcare | LocatieType |
Specifies the address where goods are unloaded, as a LocatieType object. This is a conditional field, which must be filled according to the Rules for reporting location, customs office, and border crossing point. |
documenteTransport | [DocumenteTransportType!] |
Mandatory. Provides information about documents accompanying the shipment, as an array of DocumenteTransportType objects. |
notificareAnterioara | NotificareAnterioaraType |
Conditional. Provides details about a previous notification declaration, if applicable. See the NotificareAnterioaraType . This value must not be set if codTipOperatiune is any of 30, 40, 50, 60, 70. |
BunuriTransportateType
input
Attribute | Type | Description |
---|---|---|
codTarifar | CodTarifarType! |
Mandatory. Specifies the tariff code used to identify transported items. At the minimum, this value should be four digits long. |
denumireMarfa | Str200! |
Mandatory. Specifies the commercial name of the transported item as it appears in the shipment’s documentation or as it is referred to by the declarant. |
codScopOperatiune | CodScopOperatiuneType! |
Mandatory. Specifies the purpose of the operation. Valid values: 101 - Merchandise (Comercializare), 201 - Production (Producție), 301 - Free products (Gratuități), 401 - Commercial equipment (Echipament comercial), 501 - Fixed assets (Mijloace fixe), 601 - For own consumption (Consum propriu), 703 - Delivery including installation (Operațiuni de livrare cu instalare), 704 - Intercompany transfer (Transfer între gestiuni), 705 - Goods provided to the customer (Bunuri puse la dispoziția clientului), 801 - Financial/operational lease (Leasing operațional/financiar), 802 - Goods under warranty (Bunuri în garanție), 901 - Exempt operations (Operațiuni scutite), 1001 - Ongoing investment (Investiție în curs), 1101 - Donations (Donații, ajutoare), 9901 - Other (Altele), 9999 - Same as the operation (Același cu operațiunea). This value must be set depending on the codTipOperatiune , as follows: (i) If codTipOperatiune = 10 then codScopOperatiune must be one of 101, 201, 301, 401, 501, 601, 703, 801, 802, 901, 1001, 1101, 9901; (ii) If codTipOperatiune = 20 then codScopOperatiune must be one of 101, 301, 703, 801, 802, 9901; (iii) If If codTipOperatiune = 30 then codScopOperatiune must be one of 101, 704, 705, 9901; (iv) If codTipOperatiune is one of 12, 14, 22, 24, 40, 50, 60, 70, then codScopOperatiune must be 9999. |
cantitate | Float! |
Mandatory. The quantity being transported, expressed in units described by codUnitateMasura . Must be greater than zero. |
codUnitateMasura | CodUMType! |
Mandatory. The code identifying the unit of measure, according to “UN/ECE Recommendation N°20” and “UN/ECE Recommendation N°21 — Unit codes”. |
greutateNeta | Float! |
The net weight. This field is mandatory if codTipOperatiune is other than 60 or 70. |
greutateBruta | Float! |
Mandatory. The gross weight. Must be greater than zero and greater than greutateNeta , if the latter exists. |
valoareLeiFaraTva | Float! |
The value in Romanian Lei, excluding VAT. Mandatory when codTipOperatiune is other than 60 or 70. |
refDeclarant | Str50 |
Optional. An identifier of the transported good, generated by the declarant for their own purpose. |
PartenerComercialType
input
Attribute | Type | Description |
---|---|---|
codTara | CodTaraType |
Mandatory. The ISO 3166-1 code of the country of the commercial partner. Note that Greece is identified by EL. Set this value depending on the codTipOperatiune , as follows: (i) If codTipOperatiune is any of 10, 12, 14, 20, 22, 24, 60, 70, then codTara must be any EU member country except Romania; (ii) If codTipOperatiune is 40 or 50, then codTara must be any country except EU member countries; (iii) If codTipOperatiune is 30, then codTara must be Romania’s country code. |
cod | Cod30Type |
Optional. The identifier of the commercial partner. If codTipOperatiune is 30 then this value must be one of the following: PNC - Personal Numerical Code (CNP - Cod numeric personal), UIC - Unique Identification Code (CUI - Cod unic de identificare), FIN - Fiscal Identification Number (NIF - Număr de identificare fiscală), or the string “PF” (this signifies a physical person, Persoană fizică). |
denumire | Str200! |
Mandatory. The name of the commercial partner. Must not exceed 200 characters. |
DateTransportType
input
Attribute | Type | Description |
---|---|---|
nrVehicul | NrVehiculType! |
Mandatory. The vehicle plate registration number. |
nrRemorca1 | NrVehiculType |
Optional. The plate number of the first vehicle trailer. |
nrRemorca2 | NrVehiculType |
Optional. The plate number of the second vehicle trailer. |
codTaraTransportator | CodTaraType! |
Mandatory. The ISO 3166-1 code of the country organizing the transport. Note that Greece is identified by EL. |
codTransportator | Cod30Type |
Optional. The identifier code of the entity organizing the transport. This can be one of the following: PNC - Personal Numerical Code (CNP - Cod numeric personal), UIC - Unique Identification Code (CUI - Cod unic de identificare), FIN - Fiscal Identification Number (NIF - Număr de identificare fiscală), or the string “PF” (this signifies a physical person, Persoană fizică). If codTaraTransportator is RO and codTipOperatiune is 30, valid values are the PNC, UIC, or FIN. If codTaraTransportator is RO and codTipOperatiune is other than 30, then valid values are the PNC, UIC, FIN, or the string “PF”. |
denumireTransportator | Str200! |
Mandatory. The name of the entity organizing the transport. |
dataTransport | Date! |
Mandatory. The date when the shipment is due to commence. Must be in the format YYYY-MM-DD. |
codPtf | CodPtfType |
The border crossing point. For valid values, see the List of border crossing points codes. This is a conditional field, which must be filled according to the Rules for reporting location, customs office, and border crossing point. |
codBirouVamal | CodBirouVamalType |
The customs office code. For valid values, see the List of customs office codes. This is a conditional field, which must be filled according to the Rules for reporting location, customs office, and border crossing point. |
LocatieType
input
Attribute | Type | Description |
---|---|---|
codJudet | CodJudetType! |
Mandatory. Specifies the county code. For the list of valid values, see List of county codes. |
denumireLocalitate | Str100! |
Mandatory. The city/town/village name. Must not exceed 100 characters. |
denumireStrada | Str100! |
Mandatory. The street name. Must not exceed 100 characters. |
numar | Str20 |
The house number. |
bloc | Str20 |
The building identifier. |
scara | Str20 |
The entrance. |
etaj | Str20 |
The floor number. |
apartament | Str20 |
The flat number. |
alteInfo | Str200 |
Additional information. |
codPostal | Str20 |
The postal code. |
DocumenteTransportType
input
Attribute | Type | Description |
---|---|---|
tipDocument | tipDocumentType! |
Mandatory. Identifies the document type. Valid values: 10 - CMR waybill, 20 - Invoice (Factura), 30 - Delivery note (Aviz de însoțire a mărfii), 9999 Other (Altele). |
numarDocument | str50 |
Optional. The document number. |
dataDocument | Date! |
Mandatory. The document’s date. |
observatii | Str200 |
Optional. For any additional notes. |
NotificareAnterioaraType
input
Attribute | Type | Description |
---|---|---|
uit | UitType! |
Mandatory. The unique transport identification code. |
observatii | Str200 |
Optional. For any additional notes. |
refDeclarant | Str50 |
Optional. Specifies the identifier of the declaration as generated by the declarant for their own purpose. This value must not exceed 50 characters. |
Result
See the Shipment
type.
modifyVehicle
Submits to ANAF a declaration requesting modification of the vehicle information on a previously submitted declaration.
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which the declaration is being submitted. |
id | ID! |
Mandatory. Set this value to the identifier of the shipment record that is to be modified. |
input | ModifyVehicleInput |
Optional. Specifies the data that is to be updated, as a ModifyVehicleInput object. |
refDeclarant | Str50 |
Optional. Specifies the identifier of the declaration as generated by the declarant for their own purpose. This value must not exceed 50 characters. |
declPostAvarie | DeclPostAvarie |
Optional. If provided, the only valid value is D, which indicates that this declaration was submitted after a failure/downtime of the ANAF service, on the next day after the ANAF service became available again. |
ModifyVehicleInput
input
Attribute | Type | Description |
---|---|---|
nrVehicul | NrVehiculType! |
Mandatory. The vehicle plate registration number. |
nrRemorca1 | NrVehiculType |
Optional. The plate number of the first vehicle trailer. |
nrRemorca2 | NrVehiculType |
Optional. The plate number of the second vehicle trailer. |
dataModificare | LocalDateTime! |
Mandatory. The date and time when the vehicle swap will take place, in the yyyy-mm-ddThh:mm:ss format. The seconds part may be 00. The value must not exceed the UIT validity period and must not be prior to the declaration date except when declPostAvarie is D. |
observatii | Str200 |
Optional. For any additional notes. |
Result
See the Shipment
type.
notify
Submits a notification declaration to ANAF, with the purpose of obtaining a unique transport identification code (UIT).
Arguments
Argument | Type | Description |
---|---|---|
organizationId | ID! |
Mandatory. The identifier of the organization (from the Organizations Service) for which the declaration is being submitted. |
input | ShipmentInput! |
Mandatory. Specifies the data that is to be submitted, as a ShipmentInput object. |
refDeclarant | Str50 |
Optional. Specifies the identifier of the declaration as generated by the declarant for their own purpose. This value must not exceed 50 characters. |
declPostAvarie | DeclPostAvarie |
Optional. If provided, the only valid value is D, which indicates that this declaration was submitted after a failure/downtime of the ANAF service, on the next day after the ANAF service became available again. |
Result
See the Shipment
type.
Example
The following code listing illustrates sending a new e-Transport declaration to ANAF:
mutation notify($organizationId:ID!, $input:ShipmentInput!) {
notify(organizationId:$organizationId, input:$input) {
id
organizationId
uit
stages {
id
type
xmlFile { id downloadUrl }
uploadDate
uploadId
downloadId
status
uploadedToTestEnvironment
errors
createdAt
}
status
errors
createdAt
}
}
Make sure to replace the input variables as applicable. Note that YOUR_ORGANIZATION_ID must be the ID of an ANAF-authorized organization.
{
"organizationId": "{{organizationId}}",
"input": {
"codTipOperatiune": "30",
"bunuriTransportate": {
"codTarifar": "0202",
"denumireMarfa": "Marfa",
"codScopOperatiune": "101",
"cantitate": 1323,
"codUnitateMasura": "10",
"greutateNeta": 45,
"greutateBruta": 45,
"valoareLeiFaraTva": 9987
},
"partenerComercial": {
"codTara": "RO",
"cod": "1590082",
"denumire": "Partener comerical"
},
"dateTransport": {
"nrVehicul": "B111ABC",
"codTaraTransportator": "RO",
"codTransportator": "38575952",
"denumireTransportator": "Transportator",
"dataTransport": "2023-12-20"
},
"locIncarcare": {
"codJudet": "CT",
"denumireLocalitate": "Constanta",
"denumireStrada": "Stejarului"
},
"locDescarcare": {
"codJudet": "BV",
"denumireLocalitate": "Brasov",
"denumireStrada": "Independentei"
},
"documenteTransport": {
"tipDocument": "30",
"dataDocument": "2023-10-05"
}
}
}
Appendices
List of operation types
Operation type | Description (EN) | Description (RO) |
---|---|---|
10 | Purchase within EU | Achiziție intracomunitară |
12 | Inward processing trade | Operațiuni în sistem lohn (UE) - intrare |
14 | Call-off stock (inwards) | Stocuri la dispoziția clientului - intrare |
20 | Delivery within EU | Livrare intracomunitară |
22 | Outward processing trade | Operațiuni în sistem lohn (UE) - ieșire |
24 | Call-of stock (outwards) | Stocuri la dispoziția clientului - ieșire |
30 | Consignment on national territory | transport pe teritoriul național |
40 | Import | Import |
50 | Export | Export |
60 | Transaction within EU - Entrance of goods for storage or to form a new shipment | Tranzacție intracomunitară - Intrare pentru depozitare/formare nou transport |
70 | Transaction within EU - Exit of goods after storage or formation of a new shipment | Tranzacție intracomunitară - Ieșire după depozitare/formare nou tranport |
List of county codes
County Code | County Name |
---|---|
AB | Alba |
AR | Arad |
AG | Argeș |
BC | Bacău |
BH | Bihor |
BN | Bistrița-Năsăud |
BR | Brăila |
BT | Botoșani |
BV | Brașov |
BZ | Buzău |
CJ | Cluj |
CL | Călărași |
CS | Caraș-Severin |
CT | Constanța |
CV | Covasna |
DB | Dâmbovița |
DJ | Dolj |
GL | Galați |
GR | Giurgiu |
GJ | Gorj |
HR | Harghita |
HD | Hunedoara |
IL | Ialomița |
IS | Iași |
IF | Ilfov |
MM | Maramureș |
MH | Mehedinți |
MS | Mureș |
NT | Neamț |
OT | Olt |
PH | Prahova |
SM | Satu Mare |
SJ | Sălaj |
SB | Sibiu |
SV | Suceava |
TR | Teleorman |
TM | Timiș |
TL | Tulcea |
VS | Vâlcea |
VL | Vaslui |
VN | Vrancea |
B | Bucharest |
List of border crossing points codes
Code | Description |
---|---|
1 | Petea (HU) |
2 | Borș (HU) |
3 | Vărșand (HU) |
4 | Nădlac (HU) |
5 | Calafat (BG) |
6 | Bechet (BG) |
7 | Turnu Măgurele (BG) |
8 | Zimnicea (BG) |
9 | Giurgiu (BG) |
10 | Ostrov (BG) |
11 | Negru Vodă (BG) |
12 | Vama Veche (BG) |
13 | Călărași (BG) |
14 | Corabia (BG) |
15 | Oltenița (BG) |
16 | Carei (HU) |
17 | Cenad (HU) |
18 | Episcopia Bihor (HU) |
19 | Salonta (HU) |
20 | Săcuieni (HU) |
21 | Turnu (HU) |
22 | Urziceni (HU) |
23 | Valea lui Mihai (HU) |
24 | Vladimirescu (HU) |
25 | Porțile de Fier 1 (RS) |
26 | Naidăș (RS) |
27 | Stamora Moravița (RS) |
28 | Jimbolia (RS) |
29 | Halmeu (UA) |
30 | Stânca Costești (MD) |
31 | Sculeni (MD) |
32 | Albița (MD) |
33 | Oancea (MD) |
34 | Galați Giurgiulești (MD) |
35 | Constanța Sud Agigea |
36 | Siret (UA) |
37 | Nădlac 2 - A1 (HU) |
38 | Borș 2 - A3 (HU) |
List of customs office codes
Code | Name | ISO Code |
---|---|---|
12801 | BVI Alba Iulia | ROBV0300 |
22801 | BVI Arad | ROTM0200 |
22901 | BVF Arad Aeroport | ROTM0230 |
22902 | BVF Zona Liberă Curtici | ROTM2300 |
32801 | BVI Pitești | ROCR7000 |
42801 | BVI Bacău | ROIS0600 |
42901 | BVF Bacău Aeroport | ROIS0620 |
52801 | BVI Oradea | ROCJ6570 |
52901 | BVF Oradea Aeroport | ROCJ6580 |
62801 | BVI Bistriţa-Năsăud | ROCJ0400 |
72801 | BVI Botoşani | ROIS1600 |
72901 | BVF Stanca Costeşti | ROIS1610 |
72902 | BVF Rădăuţi Prut | ROIS1620 |
82801 | BVI Braşov | ROBV0900 |
92901 | BVF Zona Liberă Brăila | ROGL0710 |
92902 | BVF Brăila | ROGL0700 |
102801 | BVI Buzău | ROGL1500 |
112801 | BVI Reșița | ROTM7600 |
112901 | BVF Naidăș | ROTM6100 |
122801 | BVI Cluj Napoca | ROCJ1800 |
122901 | BVF Cluj Napoca Aero | ROCJ1810 |
132901 | BVF Constanţa Sud Agigea | ROCT1900 |
132902 | BVF Mihail Kogălniceanu | ROCT5100 |
132903 | BVF Mangalia | ROCT5400 |
132904 | BVF Constanţa Port | ROCT1970 |
142801 | BVI Sfântu Gheorghe | ROBV7820 |
152801 | BVI Târgoviște | ROBU8600 |
162801 | BVI Craiova | ROCR2100 |
162901 | BVF Craiova Aeroport | ROCR2110 |
162902 | BVF Bechet | ROCR1720 |
162903 | BVF Calafat | ROCR1700 |
172901 | BVF Zona Liberă Galaţi | ROGL3810 |
172902 | BVF Giurgiuleşti | ROGL3850 |
172903 | BVF Oancea | ROGL3610 |
172904 | BVF Galaţi | ROGL3800 |
182801 | BVI Târgu Jiu | ROCR8810 |
192801 | BVI Miercurea Ciuc | ROBV5600 |
202801 | BVI Deva | ROTM8100 |
212801 | BVI Slobozia | ROCT8220 |
222901 | BVF Iaşi Aero | ROIS4660 |
222902 | BVF Sculeni | ROIS4990 |
222903 | BVF Iaşi | ROIS4650 |
232801 | BVI Antrepozite/Ilfov | ROBU1200 |
232901 | BVF Otopeni Călători | ROBU1030 |
242801 | BVI Baia Mare | ROCJ0500 |
242901 | BVF Aero Baia Mare | ROCJ0510 |
242902 | BVF Sighet | ROCJ8000 |
252901 | BVF Orşova | ROCR7280 |
252902 | BVF Porţile De Fier I | ROCR7270 |
252903 | BVF Porţile De Fier II | ROCR7200 |
252904 | BVF Drobeta Turnu Severin | ROCR9000 |
262801 | BVI Târgu Mureş | ROBV8800 |
262901 | BVF Târgu Mureş Aeroport | ROBV8820 |
272801 | BVI Piatra Neamţ | ROIS7400 |
282801 | BVI Corabia | ROCR2000 |
282802 | BVI Olt | ROCR8210 |
292801 | BVI Ploiești | ROBU7100 |
302801 | BVI Satu-Mare | ROCJ7810 |
302901 | BVF Halmeu | ROCJ4310 |
302902 | BVF Aeroport Satu Mare | ROCJ7830 |
312801 | BVI Zalău | ROCJ9700 |
322801 | BVI Sibiu | ROBV7900 |
322901 | BVF Sibiu Aeroport | ROBV7910 |
332801 | BVI Suceava | ROIS8230 |
332901 | BVF Dorneşti | ROIS2700 |
332902 | BVF Siret | ROIS8200 |
332903 | BVF Suceava Aero | ROIS8250 |
332904 | BVF Vicovu De Sus | ROIS9620 |
342801 | BVI Alexandria | ROCR0310 |
342901 | BVF Turnu Măgurele | ROCR9100 |
342902 | BVF Zimnicea | ROCR5800 |
352802 | BVI Timişoara Bază | ROTM8720 |
352901 | BVF Jimbolia | ROTM5010 |
352902 | BVF Moraviţa | ROTM5510 |
352903 | BVF Timişoara Aeroport | ROTM8730 |
362901 | BVF Sulina | ROCT8300 |
362902 | BVF Aeroport Delta Dunării Tulcea | ROGL8910 |
362903 | BVF Tulcea | ROGL8900 |
362904 | BVF Isaccea | ROGL8920 |
372801 | BVI Vaslui | ROIS9610 |
372901 | BVF Fălciu | - |
372902 | BVF Albiţa | ROIS0100 |
382801 | BVI Râmnicu Vâlcea | ROCR7700 |
392801 | BVI Focșani | ROGL3600 |
402801 | BVI Bucureşti Poştă | ROBU1380 |
402802 | BVI Târguri și Expoziții | ROBU1400 |
402901 | BVF Băneasa | ROBU1040 |
512801 | BVI Călăraşi | ROCT1710 |
522801 | BVI Giurgiu | ROBU3910 |
522901 | BVF Zona Liberă Giurgiu | ROBU3980 |
Rules for reporting location, customs office, and border crossing point
The fields locIncarcare
(loading location), locDescarcare
(unloading location), codPtf
(border crossing point), and codBirouVamal
(customs office) provide information about where the route starts and ends. These fields must be reported based on the operation type (codTipOperatiune
), according to the table below:
Operation type | codPtf | codBirouVamal | locIncarcare | locDescarcare |
---|---|---|---|---|
10 - Purchase within EU | Mandatory | Mandatory | ||
12 - Inward processing trade | Mandatory | Mandatory | ||
14 - Call-off stock (inwards) | Mandatory | Mandatory | ||
20 - Delivery within EU | Mandatory | Mandatory | ||
22 - Outward processing trade | Mandatory | Mandatory | ||
24 - Call-off stock (outwards) | Mandatory | Mandatory | ||
30 - Consignment on national territory | Mandatory | Mandatory | ||
40 - Import | Mandatory | Mandatory | ||
50 - Export | Mandatory | Mandatory | ||
60 - Transaction within EU - Entrance of goods for storage or to form a new shipment | Mandatory | Mandatory | ||
70 - Transaction within EU - Exit of goods after storage or formation of a new shipment | Mandatory | Mandatory |