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 tax-declarations-api:query:* tax-declarations-api:mutation:*.
Usage
The RO Tax Declarations service enables calling applications to generate the SAF-T XML file (Standard Audit File for Tax) required for mandatory tax reporting to Romanian National Agency of Fiscal Administration (ANAF).
Prerequisites
The organization(s) for which reporting is done must exist in the SBS system. You can add new organizations through the Organizations Service.
The organization object in SBS must contain at least the following fields: name, tin (Tax Identification Number) if available, regNo (registration number issued by the National Trade Registration Office), country, streetAddress, ibanNumber, taxAccountingBasis.
Your application must generate from the ERP system the following CSV files to be used as input to te RO Tax Declarations service (click the links below for information about the structure of the file):
The ANAF has published (and periodically updates) an Excel sheet which contains information about the structure of the SAF-T file, field validation rules and format, as well as valid codes required for specific field types. The file is called “Schema Fișierul Standard de Control (Standard Audit File – SAF-T)” and will be subsequently referred to as the SAF-T Schema in this documentation.
To locate the SAF-T schema on ANAF website (https://anaf.ro), navigate to Despre ANAF > Strategii ANAF > Proiecte de digitalizare > SAF-T and look for the most recently published version of the “schema xls” file.
Generating a declaration
To generate a declaration:
Obtain from your ERP system the input CSV files to be used as input to the tax declaration. For the structure of each file, see Appendix A: Input CSV Files.
Initiate a declaration through a call to the initiateDeclaration mutation. As a result, a new declaration object is created, and the response contains the unique declaration ID. You will need to work with this declaration ID in subsequent steps to further process the declaration and monitor its status.
Run the generateDeclaration mutation. This triggers a computation that takes place from several minutes to several hours, depending on the size of input CSV files. In either case, the outcome, including any possible errors, is reported in the returned Process object. If the computation was successful, the response includes a download URL at which you can download the generated XML file.
Preparing declaration files
After you have initiated the declaration, you can add all the CSV input files to it.
For each input CSV file, the steps are as follows:
Run the prepareFile mutation. In the response, you get the file’s upload URL at which you can upload the actual file.
In the programming language of your API, make an HTTP PUT request to upload the file content to the upload URL. This step is similar to how you would create a file and then upload its content in the File Management Service, as described in the Tutorial: Create a file.
Note that you can add multiple files of the same type for the same declaration. For example, you can add several input CSV files of type “Invoices”. If multiple files of the same type exist, SBS will aggregate and compute data found in all respective files.
After adding all the CSV files, you can check if they are indeed attached to the declaration by running the declarations query, for example:
As mentioned above, when you add a file to the declaration, there are two steps involved:
Run prepareFile and obtain the upload URL.
In the programming language of your API, make an HTTP PUT request to upload the file content to the upload URL.
For the second step, note, however, that the maximum file size that you can send in a single PUT request is 5 GB. Should you need to add larger files to the declaration, you can do so through the multipart upload mutations provided by the File Management Service. In this scenario, the process looks as follows:
Run prepareFile and take notice the data.prepareFile.id returned in the response body. This ID corresponds to a file id of a file in File Management Service.
Provide the id above as input to the initiateMultipartUpload mutation and continue with the rest of steps required for multipart upload, as described in Uploading large files.
Optionally, you can use the steps described above to upload file content of any size (not just for files exceeding 5GB).
Processes
Each time when you run generateDeclaration, a new process with status NEW is attached to the declaration. You can view the declaration and the status of all its processes by running the declarations query and requesting the processes field in the response, for example:
The status of any process is initially NEW. The status NEW will normally change to INPROCESS after approximately 1 minute. Note that, if you run generateDeclaration multiple times for the same declaration, each run will start a new process for the same declaration. In this case, you will need to track the status of each process separately. The processes field of the declarations query provides a filter (by process ID) for that purpose.
The INPROCESS status of a process may take from a few minutes to a few hours, depending on the size of the input CSV files. After the INPROCESS status, the status may change to either ERROR (if errors are encountered) or DONE (upon successful processing).
If the status ERROR is encountered, check the errorMessages response field of the respective process for details.
If the process completes with status DONE, it generates a result XML file whose download URL is available in the result response field of the respective process. Also, the totals counters of the declaration object are now populated with data as computed from the input CSV files.
If necessary, you may stop a running process through a call to killProcess. However, this is possible only if the process has not generated any results (that is, if the result field of the process is empty).
You may also delete a process through the deleteProcess mutation. Deleting a running process is possible only if the process has generated no result yet.
Deleting declarations
You can delete declarations through a call to deleteDeclaration. Note, however, that it is not possible to delete a declaration if it has at least one running process that has already generated some result file. To delete such a declaration, you will need to wait for the process to finish first.
Validation
Validation of data provided as input to the RO Tax Declarations service takes place at two levels:
A first validation takes place after you submit the generateTaxDeclaration mutation. This validation is performed by the SBS API. Any errors encountered at this stage are reported in the errorMessages attribute of the returned Process object.
A second level of validation is provided by the the DUK Integrator tool available for download from the ANAF website (https://anaf.ro). The same tool is used to generate the PDF (including the signed XML SAF-T file) that is to be submitted to ANAF. To download the tool, navigate to Despre ANAF > Strategii ANAF > Proiecte de digitalizare > SAF-T and look for the latest available version of the validator.
Queries
declarations
Lists the declarations defined for the given tenant. The results of their computation processes can be found in the corresponding declaration process list.
The organization’s details, expressed as an Organization type from the Organizations Service.
representative
Representative
The representative’s details, expressed as a Representative type.
headerComment
HeaderComment
Specifies the reporting period covered by the declaration. L - for monthly returns, T - for quarterly returns, A - for annual returns, C - for returns on request, NL - non-residents monthly, NT - non-residents quarterly.
declarationType
DeclarationType
Specifies the type of the declaration. Currently, the only valid type is D406 (Standard Audit File for Tax).
from
Date
The start date of the reporting period.
to
Date
The end date of the reporting period.
regionCode
RegionCode
The county identifier, for example, BV for Brașov. For the list of valid values, see List of county codes.
files
[File]
The list of files associated with the current declaration. See the File type.
processes(filter)
[Process]
The list of processes associated with the current declaration. You can optionally filter processes by supplying a ProcessesFilterInput object as input argument. For the structure of a process, see the Process type.
createdAt
DateTime
The date and time when the declaration was created.
Representative type
Attribute
Type
Description
id
ID
The unique identifier of the representative.
firstName
String
The representative’s first name.
lastName
String
The representative’s last name.
phone
String
The representative’s phone.
email
EmailAddress
The representative’s email address.
File type
Attribute
Type
Description
id
ID
The unique identifier of the file. You an use this ID to refer to the file also through the File Management Service.
declarationId
ID
The unique identifier of the tax declaration.
fileType
CsvFileType
The type of data reported by the file. Valid values: GeneralLedgerAccounts, BusinessPartners, Assets, PhysicalStock, GeneralLedgerEntries, Invoices, Payments, MovementOfGoods, AssetTransactions.
name
String
The file name.
contentLength
Float
The file size in bytes.
uploadUrl(expiresIn)
Uri
The URL at which the file content can be uploaded. Note that the upload URL expires after the number of seconds supplied in the expiresIn parameter.
downloadUrl(expiresIn)
Uri
The URL at which the file content can be downloaded. Note that the download URL expires after the number of seconds supplied in the expiresIn parameter.
createdAt
DateTime
The date and time when the file was created.
ProcessesFilter input
Attribute
Type
Description
id
ID
The ID of the process that you would like to filter by.
Process type
Attribute
Type
Description
id
ID
The unique identifier of the file.
status
DeclarationStatus
The status of the declaration. Valid values: NEW - computation has not started yet, INPROCESS - computation is in progress, DONE - computation has completed without errors, ERROR - computation has completed with errors.
errorMessages
[String]
The list of error messages, if applicable.
result
[ResultFile]
The list of files created by the process, as ResultFile type.
totals
Totals
The totals computed by this process, as Totals type.
header
Header
Provides general information about the underlying file (the same one as in the header of the XML file), as a Header object.
createdAt
DateTime
The date and time when the process was created.
ResultFile type
Attribute
Type
Description
id
ID
The ID of the file.
name
String
The file name.
contentLength
Float
The file size in bytes.
createdAt
DateTime
The date and time when the file was created.
downloadUrl(expiresIn)
Uri
The URL at which the file can be downloaded. Note that the download URL expires after the number of seconds supplied in the expiresIn parameter.
Totals type
Attribute
Type
Description
csvLines
CsvFileLines
The number of lines in each of the CSV files, as a CsvFileLines type.
csvBusinessPartnerAccountTotals
[AccountTotal]
The totals of business partners general ledger accounts, as a list of AccountTotal objects.
csvGeneralLedgerAccountsMonthTotals
DebitCreditOpenClose
The totals of the general ledger accounts for the month, as a DebitCreditOpenClose object.
csvGeneralLedgerEntriesMonthTotals
DebitCredit
The totals of the general ledger entries for the month, as a DebitCredit object.
csvInvoiceTotals
CsvInvoiceTotals
The totals applicable to reported invoices, as as CsvInvoiceTotals object.
csvPaymentTotals
CsvPaymentTotals
The totals applicable to reported payments, as as CsvPaymentTotals object.
masterFilesTotals
MasterFilesTotals
The totals applicable to the MasterFiles section of the SAF-T file, as a MasterFilesTotals object.
generalLedgerEntriesTotals
GeneralLedgerEntriesTotals
The totals applicable to the GeneralLedgerEntries section of the SAF-T file, as a GeneralLedgerEntriesTotals object.
sourceDocuments
SourceDocuments
The totals applicable to the SourceDocuments section of the SAF-T file, as a SourceDocuments object.
Indicates the type of return submitted. This can be: monthly return, quarterly return, annual return or on-demand return.
totalSegmentsInSequence
Float
The total number of segments in the sequence.
taxAccountingBasis
String
Possible values: A - for Accounting for general commercial companies which apply double-entry bookkeeping and the general business chart of accounts, I - for Invoice Accounting (non-residents/taxpayers who have the obligation to submit the special value added tax return), IFRS - for general commercial companies that apply double-entry taxability at the same time as the provisions of OMFP 2844/2016 (IFRS chart of accounts), BANK - for credit institutions and non-bank financial institutions that apply apply double-entry bookkeeping and chart of accounts for banks and financial-monetary institutions, INSURANCE - for insurance companies applying applies double entry taxation and chart of accounts for insurance companies, NORMA39 - for the leasing and financial companies which use the IFRS account plan according the Reg no. 39/2015 of the Authority for Financial Supervision (ASF), IFN - for non-bank financial institutions in Romania, that use the account plan according to the BNR Regulation no. 17/2015, NORMA36 - for insurance and/or reinsurance brokerage companies which use the account plan according to the regulation no. 36/2015 of the Authority for Financial Supervision (ASF), NORMA14 - for private pension companies which use the account plan according to the regulation no. 14/2015 of the Authority for Financial Supervision (ASF).
taxEntity
String
The reference to the company/division/branch.
CompanyHeaderStructure type
Attribute
Type
Description
registrationNumber
String
The company’s registration number.
name
String
The company name.
address
[Address]
The company address details, as a list of Address objects.
Returns a list of active organizations defined for the given tenant.
Result
The result is an array of Organization.
Organization type
Attribute
Type
Description
id
ID!
Specifies the organization’s unique identifier.
validFrom
Date
Specifies the date when the organization was registered, in YYYY-MM-DD format.
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).
caenNo
String
Specifies the organization’s number registered in the CAEN nomenclature (in Romanian, CAEN - Clasificarea activităților din economia națională).
taxType
String
Identifies the type of tax regime to which this entry applies. Valid values originate in the nomenclature Nomenclator_Regim_fiscal and are as follows: 100010 - Taxable person registered for VAT purposes, 100020 - Taxable person applying the special exemption scheme for small enterprises, 100030 - Taxable person who has the VAT code canceled ex officio, based on Law 227/2015 on the Fiscal Code, art. 316 para. (11), 100040 - Taxable person registered for VAT purposes, who applies the VAT system on collection, 100050 - Non-taxable person.
country
CountryCode
Enum value that identifies the ISO 3166-2 two-letter country code.
region
String
Identifies the regions/counties/provinces within the tax authority. Preferably described according to ISO 3166-1A2 - RO Dept Codes. Example: RO-AB for Alba county in Romania.
Valid values: A - for Accounting for general commercial companies which apply double-entry bookkeeping and the general business chart of accounts, I - for Invoice Accounting (Non-Residents), IFRS - for general commercial companies that apply double-entry taxability at the same time as the provisions of OMFP 2844/2016 (IFRS chart of accounts), BANK - for credit institutions and non-bank financial institutions that apply apply double-entry bookkeeping and chart of accounts for banks and financial-monetary institutions, INSURANCE - for insurance companies applying applies double entry taxation and chart of accounts for insurance companies, NORMA39 - for the leasing and financial companies which use the IFRS account plan according the Reg no. 39/2015 of the Authority for Financial Supervision (ASF), IFN - for non-bank financial institutions in Romania, that use the account plan according to the BNR Regulation no. 17/2015, NORMA36 - for insurance and/or reinsurance brokerage companies which use the account plan according to the regulation no. 36/2015 of the Authority for Financial Supervision (ASF), NORMA14 - for private pension companies which use the account plan according to the regulation no. 14/2015 of the Authority for Financial Supervision (ASF), ONG - for companies without patrimonial purpose (non-government organizations) according to the OMFP no. 3103/2017.
createdAt
DateTime
The date and time when the organization record was created in SBS.
active
Boolean
A Boolean flag that marks organization as not active if set to false. Inactive organizations do not appear in the graphical user interface of the SBS Portal. This flag may also be used for other purposes in your application. Note that it does not affect processing organizations in SBS as such (for example, it is still possible to generate a tax declaration even if the organization is not active).
Address type
Attribute
Type
Description
streetName
String
The street name.
number
String
The street number.
additionalAddressDetails
String
Any additional address details that don’t fit elsewhere.
building
String
The building identifier, if applicable.
city
String
The city.
postalCode
String
The postal code.
region
String
The region/county/province.
country
CountryCode
Enum value that identifies the ISO 3166-2 two-letter country code.
BankAccount type
Attribute
Type
Description
ibanNumber
String
The international bank account number (IBAN).
bankAccountName
String
The bank account name.
sortCode
String
The bank sorting code.
representatives
Returns a list of representatives created for the given tenant.
Creates a record identifying the person that submits the tax declaration. Once a representative is created, it can be referenced multiple times by different declarations.
Creates a new tax declaration, without triggering any computation processes. After this mutation, run prepareFile for each CSV file that must be supplied as input to the declaration and obtain the file’s upload URL. After uploading the CSV files, run generateDeclaration mutation to trigger the computation process.
Mandatory. Identifies the type of tax declaration that is to be computed. Currently, only value D406 is supported.
from
Date!
Mandatory. The start date of the reporting period covered by the tax declaration.
to
Date!
Mandatory. The end date of the reporting period covered by the tax declaration.
organizationId
ID!
Mandatory. The identifier of the organization defined through the Organizations service.
representativeId
ID!
Mandatory. The identifier of the representative previously created through the createRepresentative mutation.
regionCode
RegionCode!
Mandatory. The county identifier, for example, BV for Brașov. For the list of valid values, see List of county codes.
headerComment
HeaderComment!
Mandatory. Specifies the reporting period covered by the declaration. L - for monthly returns, T - for quarterly returns, A - for annual returns, C - for returns on request, NL - non-residents monthly, NT - non-residents quarterly.
Generates a URL at which you can upload a CSV file to be used as input to the tax declaration. Run this mutation for each CSV file that is to be supplied as input for a declaration.
Arguments
Attribute
Type
Description
input
PrepareFileInput
Mandatory. Supplies the input to the mutation, as PrepareFileInput object.
PrepareFileInput input
Attribute
Type
Description
declarationId
ID!
Mandatory. The identifier of the declaration.
fileType
CsvFileType!
Mandatory. This is an enumeration that identifies the type of the CSV file. Valid values: GeneralLedgerAccounts, BusinessPartners, Assets, PhysicalStock, GeneralLedgerEntries, Invoices, Payments, MovementOfGoods, AssetTransactions.
Mandatory. The start date of the reporting period covered by the tax declaration.
to
Date!
Mandatory. The end date of the reporting period covered by the tax declaration.
representativeId
ID!
Mandatory. The identifier of the representative previously created through the createRepresentative mutation.
regionCode
RegionCode!
Mandatory. The county identifier, for example, BV for Brașov. For the list of valid values, see List of county codes.
headerComment
HeaderComment!
Mandatory. Specifies the reporting period covered by the declaration. L - for monthly returns, T - for quarterly returns, A - for annual returns, C - for returns on request, NL - non-residents monthly, NT - non-residents quarterly.
When preparing the CSV files to be used as input to the Tax Declarations service, keep in mind the following:
Each CSV file is comma-separated;
The first row in the CSV file should provide the column names (that is, the CSV file must include the header);
The fields described in the tables below are validated by ANAF according to the type described in the “Format” column. For details about each type, refer to the SAF-T Schema. More specifically, for simple types, you can find the validation rules in the “Simple Types” sheet. For the list of valid codes of various fields, consult the “Centralizator nomenclatoare” sheet.
BusinessPartners.csv
Column
Format
Mandatory?
Description
PartnerType
Char
Yes
This includes partner companies and physical persons (customers or suppliers) for which there is balance or turnover during the reporting period. Valid values: C - Customer, S - Supplier.
Id
Yes
The unique identifier of the company in the ERP system.
Name
Yes
The name of the company.
IsIndividual
Yes
If the customer or supplier is a physical person, this value must be 1.
TaxRegistrationNumber
SAFmiddle1textType
Yes
The unique company’s Tax Registration Number as assigned by ANAF.
StreetName
SAFmiddle2textType
No
The company’s address line 1. Typically, this is the street name and postal code. May also include the house number.
AdditionalAddressDetail
SAFmiddle2textType
No
The company’s address line 2.
City
SAFmiddle1textType
Yes
The city name.
PostalCode
SAFshorttextType
No
The postal code.
Region
SAFmiddle1textType
Yes
Identifies the district/county code. For example, IF - Ilfov.
Country
ISOCountryCode
Yes
ISO 3166-2 country code. For example, RO - Romania.
AccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
OpeningDebitBalance
SAFmonetaryType
Yes
Debit balance at the start date of the selection period in the header’s default currency. The total of the debit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a debit, use OpeningDebitBalance and do not report OpeningCreditBalance - meaning the element will not be present in the XML file.
OpeningCreditBalance
SAFmonetaryType
Yes
Credit balance at the start date of the selection period in the header’s default currency. The total of the credit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a credit, use OpeningCreditBalance and do not report OpeningDebitBalance - meaning the element will not be present in the XML file.
ClosingDebitBalance
SAFmonetaryType
Yes
Debit balance at the end date of the selection period in the header’s default currency. The total of the debit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a debit, use ClosingDebitBalance and do not report ClosingCreditBalance - meaning the element will not be present in the XML file.
ClosingCreditBalance
SAFmonetaryType
Yes
Credit balance at the end date of the selection period in the header’s default currency. The total of the credit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a credit, use ClosingCreditBalance and do not report ClosingDebitBalance - meaning the element will not be present in the XML file.
GeneralLedgerAccounts.csv
Column
Format
Mandatory?
Description
AccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
AccountDescription
SAFlongtextType
Yes
Name of the individual general ledger account.
StandardAccountID
SAFmiddle1textType
No
The general ledger code based on the standard primarily used by the reporting company in their ERP. Contrary to what the field name may suggest, this is applicable to companies that use a chart of accounts other than the standard one.
AccountType
SAFshorttextType
Yes
Identifies the account type, in Romanian language. Valid values: Activ - Active, Pasiv - Passive, Bifunctional - Bifunctional.
OpeningDebitBalance
SAFmonetaryType
Yes
Debit balance at the start date of the selection period in the header’s default currency. The total of the debit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a debit, use OpeningDebitBalance and do not report OpeningCreditBalance - meaning the element will not be present in the XML file.
OpeningCreditBalance
SAFmonetaryType
Yes
Credit balance at the start date of the selection period in the header’s default currency. The total of the credit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a credit, use OpeningCreditBalance and do not report OpeningDebitBalance - meaning the element will not be present in the XML file.
ClosingDebitBalance
SAFmonetaryType
Yes
Debit balance at the end date of the selection period in the header’s default currency. The total of the debit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a debit, use ClosingDebitBalance and do not report ClosingCreditBalance - meaning the element will not be present in the XML file.
ClosingCreditBalance
SAFmonetaryType
Yes
Credit balance at the end date of the selection period in the header’s default currency. The total of the credit amounts may be positive or negative. Negative amounts are prefixed with the minus („-”) sign. If the account is created with a credit, use ClosingCreditBalance and do not report ClosingDebitBalance - meaning the element will not be present in the XML file.
GeneralLedgerEntries.csv
Column
Format
Mandatory?
Description
JournalID
SAFshorttextType
Yes
Source GL journal identifier, or invoices and payments in single ledger systems.
JournalDescription
SAFlongtextType
Yes
Description of the journal.
TransactionID
SAFmiddle2textType
Yes
Cross-reference to the GL posting. It can contain many different levels to identify the transaction. It may include cost centres such as company, division, region, group and branch/department.
Period
nonNegativeInteger
Yes
The accounting period (that is, the month of the year). For example, 1 for January.
PeriodYear
nonNegativeInteger
Yes
The year of the accounting period. Must be equal to or greater than 2020 and less than or equal to the current year.
TransactionDate
Date
Yes
Document’s date.
SourceID
SAFmiddle1textType
No
Details of the person or application that entered the transaction.
Description
SAFlongtextType
Yes
Description of journal transaction.
SystemEntryDate
Date
Yes
Date captured by the system. This field is validated according to ISO 8601.
GLPostingDate
Date
Yes
Date of posting to GL. This field is validated according to ISO 8601.
CustomerID
Yes
No
Identifies the customer company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
SupplierID
SAFmiddle1textType
Yes
Identifies the supplier company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
SystemID
No
Unique number created by the system for the document.
RecordID
SAFshorttextType
Yes
Identifier to trace entry to journal line or posting reference.
AccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
DebitAmount
SAFmonetaryType
Yes
Debit amount information for transaction. The debit amount may be positive or negative, to reflect the storno in black ink. Negative amounts are prefixed with the minus („-”) sign. If the transaction line is debit, use DebitAmount and don’t report CreditAmount - meaning the item is not reported (will not be present in the XML file).
DebitCurrencyCode
ISOCurrencyCode
No
Three-letter currency code according to ISO 4217 standard. Example: EUR for Euros, USD for American Dollars.
DebitCurrencyAmount
SAFmonetaryType
No
Amount in foreign currency. Decimal number with two decimals separated by decimal point sign („ . ”). This amount may be positive or negative. Negative amounts are prefixed with the minus („-”) sign".
DebitExchangeRate
SAFexchangerateType
Yes
The exchange rate used for debit amount. DebitCurrencyAmount x DebitExchangeRate = DebitAmount.
CreditAmount
SAFmonetaryType
Yes
Credit amount information for transaction. The credit amount may be positive or negative, to reflect the storno în black ink. Negative amounts are prefixed with the minus („-”) sign. If the transaction line is credit, use CreditAmount and don’t report DebitAmount - meaning the item is not reported (will not be present in the XML file).
CreditCurrencyCode
ISOCurrencyCode
No
Three-letter currency code according to ISO 4217 standard. Example: EUR for Euros, USD for American Dollars.
CreditCurrencyAmount
SAFmonetaryType
No
Amount in foreign currency. Decimal number with two decimals separated by decimal point sign („ . ”). This amount may be positive or negative. Negative amounts are prefixed with the minus („-”) sign".
CreditExchangeRate
SAFexchangerateType
No
The exchange rate used for credit amount. CreditCurrencyAmount x CreditExchangeRate = CreditAmount.
TaxType
SAFcodeType
Yes
For the list of valid values, consult the “Tax-IMP - Impozite” sheet of the SAF-T Schema. If the transaction is not relevant to be reported for tax, use TaxType = 000 and TaxCode = 000000.
TaxCode
SAFcodeType
Yes
The codes used to fill in the TaxCode are in the specific nomenclature according to the sheet “Legenda coduri taxa” of the SAF-T Schema: (i) Livrari, (ii) Achizitii ded 100%, (iii) Achizitii ded 50%_baserate, (iv) Achizitii ded 50%_not_know, (v) Achizitii ded 50%, (vi) Achizitii neded, (vii) Achizitii base rate, (viii) Achizitii not known, (ix) WHT - nomenclator, (x) TVA_NoteContabile, (xi) Achizitii neded 50%. If the tax type is other than VAT or WHT, use 000000.
TaxPercentage
Decimal
No
The tax percentage.
TaxBase
Decimal
No
The base on which the tax is calculated. This can be an amount.
TaxAmount
SAFmonetaryType
Yes
Tax amount information.
TaxCurrencyCode
ISOCurrencyCode
No
Three-letter currency code according to ISO 4217 standard. Example: EUR for Euros, USD for American Dollars.
TaxCurrencyAmount
SAFmonetaryType
No
Tax amount in foreign currency.
TaxExchangeRate
SAFexchangerateType
No
The exchange rate used for tax.
Invoices.csv
Column
Format
Mandatory?
Description
InvoiceNo
SAFmiddle2textType
Yes
The invoice number.
CustomerID
Yes
The ID of the customer on the invoice. To be filled only for sales invoices. This field is mutually exclusive with SupplierID. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
SupplierID
Yes
The ID of the supplier on the invoice. To be filled only for purchase invoices. This field is mutually exclusive with CustomerID. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
AccountID
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
InvoiceDate
Date
Yes
Date of the invoice. Validated according to ISO 8601 (YYYY-MM-DD).
InvoiceType
SAFcodeType
Yes
Specifies the type of the invoice. Valid values: 380 - Commercial invoice, 381 - Credit note, 384 - Corrected invoice, 389 - Self-billed invoice, 575 - Insurer’s invoice, 751 - Invoice information for accounting purposes. These values originate from the sheet Nom_Tipuri_facturi of the SAF-T Schema.
SelfBillingIndicator
SAFcodeType
Yes
Indicator showing if the invoice is a self-billed invoice. Valid values: 389 - Self-billed invoice, 0 - Not a self-billed invoice.
SystemID
SAFmiddle1textType
No
Unique number created by the system for the document.
TransactionID
SAFmiddle2textType
No
Cross-reference to GL posting. It can contain many different levels to identify the transaction. It may include cost centres such as company, division, region, group and branch/department.
MasterTaxBase
Decimal
No
The base on which tax is calculated, for the whole invoice.
MasterTaxAmount
SAFmonetaryType
Yes
The tax amount information, for the whole invoice.
MasterTaxCurrencyCode
ISOCurrencyCode
No
The currency in which tax is calculated, for the whole invoice. This is a three-letter currency code according to ISO 4217 standard. Example: EUR for Euros, USD for American Dollars.
MasterTaxCurrencyAmount
SAFmonetaryType
No
The tax amount in foreign currency, if applicable.
MasterTaxExchangeRate
SAFexchangerateType
No
The exchange rate used, if applicable.
MasterNetTotal
SAFmonetaryType
Yes
The net total amount of the invoice.
MasterGrossTotal
SAFmonetaryType
Yes
The gross total amount of the invoice.
LineNumber
SAFshorttextType
No
The invoice line number.
LineAccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company for this line, according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36. If invoices issued as a result of sales based on tax code are not logged for accounting purposes, then this field must contain the generic account 411XXX, where XXX is the internal number of the account set by the taxpayer.
GoodsServicesID
SAFcodeType
No
Indicator showing if goods or services are being reported. Valid values: 01 - Goods, 02 - Services.
ProductCode
SAFmiddle2textType
No
The product code.
Description
SAFlongtextType
Yes
The description of goods or services that are being reported. To be filled according to the description in taxpayer’s ERP system.
ProductCommodityCode
SAFmiddle1textType
Yes
The CN (NC - Nomenclatură Combinată) code must be reported in accordance wih Romanian legislation, especially in cases such as: (i) import/export transactions, (ii) purchase/delivery of food products subject to reduced VAT rate based on CN code, (iii) movements within EU that are subject to INTRASTAT reporting, (iv) purchases/deliveries subject to local reverse charge VAT according to CN code, (v) transactions in excisable products for which excise duty is determined by CN code. The CN code contains eight digits. For valid values, see the NC8_2022_TARIC3 nomenclature in the SAF-T Schema. For insurance companies, also use the codes from the Nom_asig nomenclature. If the CN code is not applicable or required according to the Romanian law, fill in this field with value 0 (zero).
ValuationMethod
SAFcodeType
No
The valuation method employed. Valid values: FIFO (First-In, First-Out), LIFO (Last-In, First-Out), Cost mediu (Weighted average cost).
UOMBase
SAFcodeType
Yes
The unit of measure to manage stock for this product. For valid values, see the Unitati_masura sheet of the SAF-T Schema.
Quantity
SAFquantityType
Yes
The quantity of goods or services supplied.
UnitPrice
SAFmonetaryType
Yes
Unit price for the unit/group of units per UOM in the header’s default currency. Decimal number with two decimals separated by decimal point sign („ . ”). For approximations, use the rounding rules according to Order no. 978 from 8 July 2005 of the Romanian Ministry of Finance.
LineDescription
SAFlongtextType
Yes
Description of the invoice line.
InvoiceLineAmount
SAFmonetaryType
Yes
The amount of the invoice line.
InvoiceLineCurrencyCode
ISOCurrencyCode
No
The currency code of the invoice line, if applicable.
InvoiceLineCurrencyAmount
SAFmonetaryType
No
The invoice line amount in foreign currency, if applicable.
InvoiceLineExchangeRate
SAFexchangerateType
No
The exchange rate used, if applicable.
DebitCreditIndicator
SAFcodeType
Yes
Indicates whether the amounts on line level are debit or credit amounts. This entry must correspond to the entry reflected in General Ledger. Signing of line amounts is relative to this indicator. For example, a return can lead to a negative amount. Valid values: C - Credit, D - Debit.
TaxType
SAFcodeType
Yes
For the list of valid values, consult the “Tax-IMP - Impozite” sheet of the SAF-T Schema. If the transaction is not relevant to be reported for tax, use TaxType = 000 and TaxCode = 000000.
TaxCode
SAFcodeType
Yes
The codes used to fill in the TaxCode are in the specific nomenclature according to the sheet “Legenda coduri taxa” of the SAF-T Schema: (i) Livrari, (ii) Achizitii ded 100%, (iii) Achizitii ded 50%_baserate, (iv) Achizitii ded 50%_not_know, (v) Achizitii ded 50%, (vi) Achizitii neded, (vii) Achizitii base rate, (viii) Achizitii not known, (ix) WHT - nomenclator, (x) TVA_NoteContabile, (xi) Achizitii neded 50%. If the tax type is other than VAT or WHT, use 000000.
TaxPercentage
Decimal
No
The tax percentage.
TaxBase
Decimal
No
The base on which the tax is calculated. This can be an amount.
TaxAmount
SAFmonetaryType
Yes
Tax amount information.
TaxCurrencyCode
ISOCurrencyCode
No
Three-letter currency code according to ISO 4217 standard. Example: EUR for Euros, USD for American Dollars.
TaxCurrencyAmount
SAFmonetaryType
No
Tax amount in foreign currency.
TaxExchangeRate
SAFexchangerateType
No
The exchange rate used for tax.
Payments.csv
Column
Format
Mandatory?
Description
PaymentRefNo
SAFmiddle1textType 35
Yes
The unique reference number of the payment.
Period
nonNegativeInteger
No
The accounting period (that is, the month of the year). For example, 1 for January.
PeriodYear
nonNegativeInteger
No
The year of the accounting period. Must be equal to or greater than 2020 and less than or equal to the current year.
TransactionID
SAFmiddle2textType
No
Cross-reference to GL posting. It can contain many different levels to identify the transaction. It may include cost centres such as company, division, region, group and branch/department.
TransactionDate
Date
Yes
Document date.
PaymentMethod
Yes
Identifies the payment method (cheque, bank, giro, cash etc). For validation, refer to the nomenclature Nom_Mecanisme_plati of the SAF-T Schema.
Description
SAFlongtextType
Yes
Description of the payment.
SystemID
SAFmiddle1textType
No
Unique number created by the system for the document.
LineNumber
SAFshorttextType
No
Number of the payment line.
SourceDocumentID
SAFmiddle1textType
No
The source document to which the line relates.
AccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
CustomerID
SAFmiddle1textType
Yes
Identifies the customer company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
SupplierID
SAFmiddle1textType
Yes
Identifies the supplier company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
DebitCreditIndicator
SAFcodeType
Yes
Indicates whether the amounts on line level are debit or credit amounts. This entry must correspond to the entry reflected in General Ledger. Signing of line amounts is relative to this indicator. For example, a return can lead to a negative amount. Valid values: C - Credit, D - Debit.
PaymentLineAmount
SAFmonetaryType
Yes
The amount of the payment line.
PaymentLineCurrencyCode
ISOCurrencyCode
No
The currency code of the payment line, if applicable.
PaymentLineCurrencyAmount
SAFmonetaryType
No
The payment line amount in foreign currency, if applicable.
PaymentLineExchangeRate
SAFexchangerateType
No
The exchange rate used, if applicable.
TaxType
SAFcodeType
Yes
For the list of valid values, consult the “Tax-IMP - Impozite” sheet of the SAF-T Schema. If the transaction is not relevant to be reported for tax, use TaxType = 000 and TaxCode = 000000.
TaxCode
SAFcodeType
Yes
The codes used to fill in the TaxCode are in the specific nomenclature according to the sheet “Legenda coduri taxa” of the SAF-T Schema: (i) Livrari, (ii) Achizitii ded 100%, (iii) Achizitii ded 50%_baserate, (iv) Achizitii ded 50%_not_know, (v) Achizitii ded 50%, (vi) Achizitii neded, (vii) Achizitii base rate, (viii) Achizitii not known, (ix) WHT - nomenclator, (x) TVA_NoteContabile, (xi) Achizitii neded 50%. If the tax type is other than VAT or WHT, use 000000.
TaxPercentage
Decimal
No
The tax percentage.
TaxBase
Decimal
No
The base on which the tax is calculated. This can be an amount.
TaxAmount
SAFmonetaryType
Yes
Tax amount information.
TaxCurrencyCode
ISOCurrencyCode
No
Three-letter currency code according to ISO 4217 standard. Example: EUR for Euros, USD for American Dollars.
TaxCurrencyAmount
SAFmonetaryType
No
Tax amount in foreign currency.
TaxExchangeRate
SAFexchangerateType
No
The exchange rate used for tax.
PhysicalStock.csv
Column
Format
Mandatory?
Description
WarehouseID
SAFmiddle1textType
Yes
Warehouse where goods are held. May also be used to identify production under way, or stock in transit.
ProductCode
SAFmiddle2textType
Yes
The product code.
ProductType
SAFshorttextType
Yes
The product type. Used to determine whether the product or stock account is raw material, work-in-progress, finished good, merchandise for resale, etc.
StockAccountCommodityCode
SAFmiddle1textType
Yes
The commodity code associated with the stock account. For valid values, see the NC8_2022_TARIC3 nomenclature in the SAF-T Schema.
OwnerID
SAFmiddle1textType
Yes
Identifies the owner of the stock. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
GoodsServicesID
SAFcodeType
No
Indicator showing if goods or services are being reported. Valid values: 01 - Goods, 02 - Services.
Description
SAFlongtextType
Yes
Description of goods or services.
ProductCommodityCode
Yes
The commodity code associated with the product. For valid values, see the NC8_2022_TARIC3 nomenclature in the SAF-T Schema.
ValuationMethod
SAFcodeType
No
The valuation method employed. Valid values: FIFO (First-In, First-Out), LIFO (Last-In, First-Out), Cost mediu (Weighted average cost).
UOMBase
SAFcodeType
Yes
The unit of measure used to manage product stocks. For valid values, see the Unitati_masura nomenclature in the SAF-T Schema.
OpeningStockQuantity
SAFquantityType
Yes
The quantity of stock at the start date of the reporting period.
OpeningStockValue
SAFmonetaryType
Yes
The stock value at the start date of the reporting period, in the header’s currency.
ClosingStockQuantity
SAFquantityType
Yes
The quantity of stock at the end date of the reporting period.
ClosingStockValue
SAFmonetaryType
Yes
The stock value at the end date of the reporting period, in the header’s currency.
UnitPrice
SAFmonetaryType
Yes
Base unit price in the header’s default currency.
MovementOfGoods.csv
Column
Format
Mandatory?
Description
MovementReference
SAFmiddle1textType
Yes
Unique reference to the movement.
MovementDate
Date
Yes
Document date. Validated according to ISO 8601 standard (YYYY-MM-DD).
MovementType
SAFcodeType
Yes
The type of the process for the underlying lines. For example: production, sales, purchase, etc. Validated according to the Nomenclator stocuri nomenclature of the SAF-T Schema.
DocumentType
SAFshorttextType
Yes
The source document type for the respective movement.
DocumentNumber
SAFmiddle1textType
Yes
The source document number for the respective movement.
DocumentLine
SAFshorttextType
No
The line number in the source document for the respective movement.
LineNumber
SAFshorttextType
Yes
The number of the movement line.
AccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
CustomerID
SAFmiddle1textType
Yes
Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
SupplierID
SAFmiddle1textType
Yes
Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
ProductCode
SAFmiddle2textType
Yes
The product code.
GoodsServicesID
SAFcodeType
No
Indicator showing if goods or services are being reported. Valid values: 01 - Goods, 02 - Services.
Description
SAFlongtextType
Yes
Description of goods or services.
ProductCommodityCode
SAFmiddle1textType
Yes
The commodity code associated with the product. For valid values, see the NC8_2022_TARIC3 nomenclature in the SAF-T Schema.
ValuationMethod
SAFcodeType
No
The valuation method employed. Valid values: FIFO (First-In, First-Out), LIFO (Last-In, First-Out), Cost mediu (Weighted average cost).
UOMBase
SAFcodeType
Yes
The unit of measure used. For valid values, see the Unitati_masura nomenclature in the SAF-T Schema.
Quantity
SAFquantityType
Yes
The quantity of goods.
BookValue
SAFmonetaryType
No
Value of the transaction line as registered in the general ledger in the header’s default currency.
MovementSubType
SAFcodeType
Yes
Identifies the type of the movement on line/article level. For valid values, see the Nomenclator stocuri nomenclature of the SAF-T Schema.
Assets.csv
Column
Format
Mandatory?
Description
AssetID
SAFmiddle1textType
Yes
The unique identifier of the asset.
AccountID
SAFmiddle2textType
Yes
The general ledger code (analytic account) used by the reporting company according to their chart of accounts, based on the standard defined by the Romanian authorities. This value is validated against codes present in the following nomenclatures (sheets) of the SAF-T Schema: PlanConturiBalSocCom, PlanConturiIFRS, PlanConturiIFRS_Norma39, PlanConturiBanci, PlanConturiNebancare, PlanConturiSocAsigurari, PlanConturi_Norma36.
Description
SAFlongtextType
Yes
The asset description.
DateOfAcquisition
Date
Yes
Date of the acquisition of the asset (usually the date of delivery). Validated according to ISO 8601 standard.
StartUpDate
Date
Yes
Commissioning date of the asset. Validated according to ISO 8601 standard.
SupplierID
SAFmiddle1textType
Yes
Set this value to the Id of the relevant business partner reported in BusinessPartners.csv.
AssetValuationType
SAFshorttextType
Yes
Describes the purpose for the reporting. For example: commercial, tax in country 1, tax in country 2, etc.
ValuationClass
SAFshorttextType
Yes
Describes the classification of the asset for tax reporting purposes.
AcquisitionAndProductionCostsBegin
SAFmonetaryType
Yes
Total costs of the acquisition and/or production of the asset at the start date of the reporting period, in the header’s default currency.
AcquisitionAndProductionCostsEnd
SAFmonetaryType
Yes
Total costs of the acquisition and/or production of the asset at the end date of the reporting period, in the header’s default currency.
InvestmentSupport
SAFmonetaryType
Yes
Total amount of investment support for this asset in the header’s default currency (that is, the amount of increase in value of the assets due to reconstruction, overhaul, etc).
AssetLifeYear
Decimal
Yes
Period of useful life in years. This field is mutually exclusive with AssetLifeMonth.
AssetLifeMonth
Decimal
Yes
Period of useful life in months. This field is mutually exclusive with AssetLifeYear.
AssetAddition
SAFmonetaryType
Yes
The accounting (book) value of the acquisition and/or production of the asset in the reporting period, in the header’s default currency.
Transfers
SAFmonetaryType
Yes
The accounting (book) value of the transfers of the asset during the reporting period, in the header’s default currency.
AssetDisposal
SAFmonetaryType
Yes
The accounting (book) value of the disposals of the asset during the reporting period in the header’s default currency.
BookValueBegin
SAFmonetaryType
Yes
The accounting (book) value at the beginning of the reporting period, in the header’s default currency.
DepreciationMethod
SAFmiddle1textType
Yes
Method of normal depreciation of the asset during the reporting period.
DepreciationPercentage
Decimal
Yes
The rate of the normal depreciation of the asset per year or month (this depends on whether AssetLifeYear or AssetLifeMonth is reported).
DepreciationForPeriod
SAFmonetaryType
Yes
The total amount of normal depreciation during the reporting period, in the header’s default currency.
AppreciationForPeriod
SAFmonetaryType
Yes
The total amount of appreciation of the asset during the reporting period, in the header’s default currency.
AccumulatedDepreciation
SAFmonetaryType
Yes
Total amount of depreciation for this asset.
BookValueEnd
SAFmonetaryType
Yes
The accounting (book) value at the end of the reporting period, in the header’s default currency.
ExtraordinaryDepreciationMethod
SAFmiddle1textType
Yes
Method of extraordinary depreciation of the asset during the reporting period.
ExtraordinaryDepreciationAmountForPeriod
SAFmonetaryType
Yes
The amount of extraordinary depreciation of the asset during the reporting period, in the header’s default currency.
AssetTransactions.csv
Column
Format
Mandatory?
Description
AssetTransactionID
SAFmiddle2textType
Yes
The unique identifier of the transaction.
AssetTransactionType
SAFcodeType
Yes
The transaction type. Validated according to the nomenclature Nomenclator imobilizari of the SAF-T Schema.
AssetTransactionDate
Date
Yes
The logged date of the transaction. Validated according to ISO 8601 standard (YYYY-MM-DD).
TransactionID
SAFmiddle2textType
Yes
Cross reference to the GL posting in the journal. It can contain many different levels to identify the transaction. It may include cost centres such as company, division, region, group and branch/department.
AcquisitionAndProductionCostOnTransaction
SAFmonetaryType
Yes
Costs of acquisition and/or production of the related asset transaction, in the header’s default currency on the date of transaction.
BookValueOnTransaction
SAFmonetaryType
Yes
The accounting (book) value of the related asset transaction, in the header’s default currency on the date of transaction.
AssetTransactionAmount
SAFmonetaryType
Yes
The net amount of the related asset transaction, in the header’s default currency (for instance, the net sale revenue).