Tax Declarations Service
The Tax Declarations service enables calling applications to generate the SAF-T XML file (Standard Audit File for Tax) required for mandatory tax reporting to Bulgarian and Romanian tax authorities.
Access info
| Endpoint | https://tax-declarations-api.socrate.io/graphql |
| MCP endpoint | https://tax-declarations-api.socrate.io/mcp |
| Required access keys | Tenant-level service access key |
| Pricing | Check the available purchase options. |
| 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 key’s scope must be set to tax-declarations-api:query:* tax-declarations-api:mutation:*. |
Usage
Prerequisites
- The organization(s) for which reporting is done must exist in the SBS system. You can add new organizations either from the SBS Portal or programmatically by calling the Organizations Service.
- The organization object in SBS must contain at least the following fields:
name,tin(Tax Identification Number),regNo(registration number issued by the National Trade Registration Office),country,streetAddress,ibanNumber,taxAccountingBasis. - For Bulgarian tax declarations, the organization’s ownership structure must be defined (
ownershipStructureBG) in accordance with the rules laid out for elements S.O.1 through S.O.11 in the SAF-T Schema. You can define these fields when creating or updating the organization, either from the SBS Portal or programmatically by calling thecreateOrganizationorupdateOrganizationmutations of the Organizations Service. - You must prepare several CSV files to be used as input to te Tax Declarations service. The exact set of files depends on the audit file country and the tax residence status of the reporting organization. Typically, an API caller generates or exports the CSV files from an enterprise resource planning (ERP) system. For details, see:
SAF-T Schema
Bulgaria
The SAF-T schema files for Bulgaria can be downloaded from https://nra.bg/wps/portal/nra/proekti/sistema-za-schetovodno-otchitane/sistema-za-schetovodno-otchitane.
Romania
The Romanian National Agency of Fiscal Administration (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:
-
Create a representative through a call to the
createRepresentativemutation. -
Initiate a declaration through a call to the
initiateDeclarationmutation. 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. -
Add all the input CSV files to the declaration. See Preparing declaration files. Upload every mandatory file for the declaration’s
headerComment, and only file types that this declaration type permits; otherwise, the next step fails. See Appendix 10: Input file types by declaration type (Romania). -
Run the
generateDeclarationmutation. 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 returnedProcessobject. 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
prepareFilemutation. 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
PUTrequest 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:
query declarations ($filter:DeclarationsFilter!, $processFilter:ProcessesFilterInput) {
declarations(filter:$filter) {
id
organization { id, name, tin }
representative { id, firstName, lastName, phone, email }
headerComment
from
to
files { id, fileType, name, createdAt }
createdAt
}
}
{
"filter": {
"id": "YOUR_DECLARATION_ID",
"organizationId": "YOUR_ORGANIZATION_ID"
}
}
If your declaration looks good so far, you can proceed to running the generateDeclaration mutation, for example:
mutation generateDeclaration($declarationId:ID!) {
generateDeclaration(declarationId:$declarationId) {
id
status
}
}
{
"declarationId": "YOUR_DECLARATION_ID"
}
Dealing with large input files
As mentioned above, when you add a file to the declaration, there are two steps involved:
- Run
prepareFileand obtain the upload URL. - In the programming language of your API, make an HTTP
PUTrequest 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
prepareFileand take note of thedata.prepareFile.idreturned 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
initiateMultipartUploadmutation and continue with the rest of steps required for multipart upload, as described in Uploading large files.
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:
query declarations ($filter:DeclarationsFilter!) {
declarations(filter:$filter) {
id
processes{
id,
status,
errorMessages,
totalSegmentsInSequence,
createdAt,
result {
id
name
createdAt
downloadUrl(expiresIn:3600)
}
}
createdAt
}
}
{
"filter": {
"id": "YOUR_DECLARATION_ID",
"organizationId": "YOUR_ORGANIZATION_ID"
}
}
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 is ERROR, the process reports what went wrong in two fields:
errorMessages— a human-readable summary, with one entry per failed rule and up to ten example records each.errors— one finding per offending input line, with a stable rule code and the identifiers that locate the record in your ERP system. See Reading validation errors.
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.
Additionally, when the process status is DONE for a monthly Romanian D406 declaration, the roD406AnalysisData field of the process is populated with financial KPIs. This data is also accessible directly via the roD406AnalysisData query.
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.
Reading validation errors
When the input CSV files fail validation, the process ends with status ERROR, and its errors field lists every offending input line as a ProcessValidationError. Each finding carries:
- a
codethat identifies the rule, so that your ERP system can react to each kind of problem. See Appendix 11: Validation rule codes. - the
fileTypeand, when the rule checks a single column, thefieldthat holds the wrong value. - the identifiers of the record —
documentId,documentContextId,systemId, andlineId— and adocumentDescription, so that you can direct your users to the document that needs correcting. See Identifiers per file type. - a
messagein the language of the declaration.
The findings are paginated. Request the first page without nextToken, then pass the returned nextToken to get the next page, until nextToken is null. totalCount reports the number of findings across all pages. For example:
query declaration($id:ID!, $processFilter:ProcessesFilterInput, $nextToken:String) {
declaration(id:$id) {
processes(filter:$processFilter) {
id
status
errorMessages
errors(limit:100, nextToken:$nextToken) {
totalCount
nextToken
items {
code
fileType
field
documentId
documentContextId
documentDescription
systemId
lineId
message
}
}
}
}
}
{
"id": "YOUR_DECLARATION_ID",
"processFilter": {
"id": "YOUR_PROCESS_ID"
}
}
errors returns an empty list, while errorMessages still describes the failure.
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 Tax Declarations service takes place at two levels:
- A first validation takes place after you submit the
generateTaxDeclarationmutation. This validation is performed by the SBS API. Any errors encountered at this stage are reported in theerrorMessagesanderrorsattributes of the returnedProcessobject. See Reading validation errors. - A second level of validation is provided by 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.
In addition to the two validation levels above, ANAF defines a set of consistency tests that are not necessarily covered by the DUK Integrator tool. For Romanian D406 declarations, the results of these tests are returned in the validations field of ROD406AnalysisData, as a list of ROD406Validation objects.
These consistency tests have recommendation status only: because some of them can yield false positives in situations to which they do not apply, a failed test does not prevent a declaration from being generated or submitted, and is surfaced for your awareness.
The tests are as defined in the following ANAF communiqués:
- Set 1: comunicat_saft_teste_v2.pdf
- Set 2: testedeconsistenta2.pdf
Alongside the tests ANAF publishes, the validations field carries five additional checks that verify the dates on your records fall inside the declaration’s reporting period. ANAF rejects a D406 file whose document dates lie outside the declared period, so these checks catch such records before you submit. They are identified by four-letter codes rather than ANAF test numbers. See Period-date checks.
How to view consistency-test results
The consistency tests are evaluated together with the RO D406 analysis data when you generate a Romanian D406 declaration, so no separate request is needed to run them. Once the declaration has been computed, you read the results from the validations field of ROD406AnalysisData.
To obtain the consistency-test results for a declaration:
- Generate the declaration as described in Generating a declaration, and take note of the process
idreturned by thegenerateDeclarationmutation. - Wait for the process to reach status DONE. You can poll the process status through the
declarationsquery, as shown under Processes. - Once the process is DONE, call the
roD406AnalysisDataquery with the organization ID, declaration ID, and process ID, requesting thevalidationsfield. Until the analysis data has been computed, the query returnsnull. - Inspect each returned
ROD406Validationobject. Thestatusindicates the outcome of the test (SUCCEEDED, FAILED, or SKIPPED). For a FAILED test, themessagefield carries the failure reason; a SKIPPED test may also carry amessageexplaining why the test did not apply.
Remember that these results are informational only: a FAILED consistency test does not prevent the declaration from being generated or submitted.
Period-date checks
Five of the validations verify that the dates on your records fall inside the declaration’s reporting period. Each one covers a single input file type and checks that file type’s primary date:
| Code | Input file type | Date checked | Record identifier reported on failure |
|---|---|---|---|
GLED |
GeneralLedgerEntries |
SystemEntryDate |
TransactionID |
INVD |
Invoices |
InvoiceDate |
InvoiceNo |
PAYD |
Payments |
TransactionDate |
PaymentRefNo |
MOGD |
MovementOfGoods |
MovementDate |
MovementReference |
ASTD |
AssetTransactions |
AssetTransactionDate |
AssetTransactionID |
Each check reports one of three outcomes:
-
SUCCEEDED — every date in the file falls inside the period. A file that contains no records also succeeds.
-
FAILED — at least one date falls outside the period. The
messagereports how many records are out of period, then lists up to 10 of them as the record identifier paired with its out-of-period date. When more than 10 records are out of period, the message ends with a(+N more)suffix so that it stays a manageable length. For example:3 Invoices record(s) with InvoiceDate outside [2024-03-01, 2024-03-31]: InvoiceNo 4521 (2024-02-28), InvoiceNo 4530 (2024-04-02), InvoiceNo 4533 (2024-04-05) -
SKIPPED — the declaration has no file of that type, so the check has nothing to examine. The
messagereadsNo <file type> file was provided for the declaration, for exampleNo Payments file was provided for the declaration. A SKIPPED result is routine — each declaration type accepts only some of the nine input file types (see Appendix 10: Input file types by declaration type (Romania)) — and says nothing about the quality of your data.
Both ends of the period count as inside it: a record dated exactly on from or exactly on to is never reported. A record with an empty date is ignored, because there is nothing to compare with the period.
Example
query roD406AnalysisData($organizationId:ID!, $declarationId:ID!, $processId:ID!) {
roD406AnalysisData(
organizationId: $organizationId
declarationId: $declarationId
processId: $processId
) {
validations {
code
description
status
message
}
}
}
{
"organizationId": "YOUR_ORGANIZATION_ID",
"declarationId": "YOUR_DECLARATION_ID",
"processId": "YOUR_PROCESS_ID"
}
A declaration returns the full standard list of tests. The description field is in Romanian — quoted from the ANAF communiqués for the numbered tests, and describing the date checked for the period-date checks. The message field for a FAILED or SKIPPED test is in English. A sample response, abbreviated to one test of each status plus one period-date check, looks as follows:
{
"data": {
"roD406AnalysisData": {
"validations": [
{
"code": "1.1",
"description": "În secțiunea Header, subsecțiunea Header Structure - Company - Company Header Structure - Adress - verificarea completării câmpurilor City și Country",
"status": "SUCCEEDED",
"message": null
},
{
"code": "1.5",
"description": "În secțiunea Master File, subsecțiunea General Ledger Accounts verificarea completării câmpurilor: Account ID, Account description, Account Type, Opening Debit/Credit Balance, Closing Debit/Credit Balance",
"status": "FAILED",
"message": "29 account(s) missing required fields (AccountID, AccountDescription, AccountType, or balance fields)"
},
{
"code": "1.14",
"description": "În secțiunea Master File verificarea soldurilor finale (Closing Debit Balance și Closing Credit Balance) ale lunii să coincidă cu soldurile inițiale (Opening Debit Balance și Opening Credit Balance) ale lunii următoare",
"status": "SKIPPED",
"message": "Single-period declaration (period null/null): cross-period validation requires data from consecutive declarations"
},
{
"code": "INVD",
"description": "În secțiunea Source Documents - Sales/Purchase Invoices se verifică dacă data facturii (InvoiceDate) se încadrează în perioada de raportare a declarației.",
"status": "FAILED",
"message": "2 Invoices record(s) with InvoiceDate outside [2024-03-01, 2024-03-31]: InvoiceNo 4521 (2024-02-28), InvoiceNo 4530 (2024-04-02)"
}
]
}
}
}
Comparing tax reported per tax code
For a Romanian D406 declaration, the tax base and tax amount reported for a given tax code should agree across the three SAF-T sources — General Ledger Entries (GLE), Invoices, and Payments — and the applied rate should match the official rate ANAF publishes for that code.
The taxCodeCentralizer field of ROD406AnalysisData surfaces these numbers per tax code so you can spot such discrepancies without cross-checking the raw CSV files by hand. It is computed together with the declaration, so no separate request is needed. Each ROD406TaxCodeCentralizerEntry reports the tax base, tax amount, and tax percentage aggregated independently from each source, alongside the code’s official name and percentage from the ANAF nomenclature.
To read the centralizer for a declaration:
- Generate the declaration as described in Generating a declaration, and take note of the process
idreturned by thegenerateDeclarationmutation. - Wait for the process to reach status DONE, polling the process status through the
declarationsquery as shown under Processes. - Call the
roD406AnalysisDataquery with the organization ID, declaration ID, and process ID, requesting thetaxCodeCentralizerfield. Until the analysis data has been computed, the query returnsnull. - Inspect each entry. Compare
gle,invoices, andpaymentsagainst one another, and theirtaxPercentageagainstnomenclaturePercentage, to find inconsistencies.
The centralizer is populated only for resident monthly (L) and quarterly (T) declarations. It is null for annual (A), on-request (C), and non-resident (NL, NT) declarations. A source object is null when that source reports no rows for the tax code, and nameRo, nameEn, and nomenclaturePercentage are null when the code is not present in the ANAF nomenclature. Divergent rates are reported as they occur and are not reconciled: if the same code carries different rates across sources, each source keeps its own.
A sample response, abbreviated to one code reported by all three sources and one code whose rate differs between sources, looks as follows:
{
"data": {
"roD406AnalysisData": {
"taxCodeCentralizer": [
{
"taxCode": "301104",
"nameRo": "Achiziţii de bunuri şi servicii taxabile cu cota de 9%",
"nameEn": "Acquisitions of goods and services taxable at a rate of 9%",
"nomenclaturePercentage": 9,
"gle": { "taxBase": 4825.00, "taxAmount": 1013.25, "taxPercentage": 21 },
"invoices": { "taxBase": 4825.00, "taxAmount": 434.25, "taxPercentage": 9 },
"payments": null
},
{
"taxCode": "310344",
"nameRo": "Livrări de bunuri şi prestări de servicii taxabile cu cota 21%",
"nameEn": "Supplies of goods and services taxable at a rate of 21%",
"nomenclaturePercentage": 21,
"gle": { "taxBase": 13250.00, "taxAmount": 2782.50, "taxPercentage": 21 },
"invoices": { "taxBase": 13250.00, "taxAmount": 2782.50, "taxPercentage": 21 },
"payments": { "taxBase": 8350.00, "taxAmount": 1753.50, "taxPercentage": 21 }
}
]
}
}
}
In this example, tax code 301104 is reported by GLE at 21% but by Invoices at 9% (which matches its official nomenclaturePercentage), signalling a rate inconsistency to investigate, while 310344 is consistent across every source and matches the nomenclature.
Service plans
Your tenant’s service plan for this service decides which features you can use. The STANDARD plan applies by default. To check or change your tenant’s plan, use the Account API’s servicePlans query and setServicePlan mutation.
| Feature | LIMITED | STANDARD |
|---|---|---|
| Generate, validate, and download Romanian and Bulgarian audit files | ✓ | ✓ |
| KPI declarations | ✓ | |
| RO D406 analysis data | ✓ | |
| New supplier product mappings | ✓ |
On the LIMITED plan:
- When you create a KPI declaration with
initiateDeclaration, or compute one withgenerateDeclaration, the call fails with the error codePLAN_FEATURE_NOT_AVAILABLE. - Your Romanian D406 declarations complete without analysis data. The
roD406AnalysisDataquery and theanalysisDataViewerUrlfield of theProcesstype returnnull, without an error. - Declarations you compute add no mappings to
supplierProductMappings.
Analysis data and supplier product mappings that you obtained before your tenant moved to the LIMITED plan stay available.
If your tenant moves back to the STANDARD plan, you get analysis data for the declarations you compute from then on. To obtain analysis data for a declaration you computed on the LIMITED plan, run generateDeclaration again for that declaration.
The plan applies to this service only. A LIMITED plan that your tenant has for another service does not change what you can do here.
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.
Arguments
| Argument | Type | Description |
|---|---|---|
| filter | DeclarationsFilter |
Optional. Provides the filter criteria, as a DeclarationsFilter input. |
DeclarationsFilter input
| Attribute | Type | Description |
|---|---|---|
| organizationId | ID |
The ID of the organization from the Organizations Service. |
| id | ID |
The ID of the tax declaration record. |
Result
Declaration type
| Attribute | Type | Description |
|---|---|---|
| id | ID |
The unique identifier of the tax declaration. |
| organization | Organization |
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. Valid values for Romanian SAF-T: 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. Valid values for Bulgarian SAF-T: M - Monthly, A - for annual returns, D - on demand. |
| declarationType | DeclarationType |
Specifies the type of the declaration. Valid values: D406 - Romanian Standard Audit File for Tax, D406T - not in use, SAFT - Bulgarian Standard Audit File for Tax, KPI - Romanian KPI analysis only (no SAF-T XML file is generated). |
| taxAccountingBasis | TaxAccountingBasis |
For valid values, see Appendix 6: Tax Accounting Basis. |
| auditFileCountry | AuditFileCountryCode |
Identifies the country (as a 2-letter country code) of this tax declaration. Possible values are RO and BG. |
| from | Date |
The start date of the reporting period. |
| to | Date |
The end date of the reporting period. |
| regionCode | RegionCode |
Identifies the region/county/province within the tax authority. For Romanian county codes, see Appendix 4: List of county codes (Romania). For Bulgarian county codes, see Appendix 5: List of county codes (Bulgaria). |
| 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. |
EmailAddress |
The representative’s email address. | |
| otherTitles | String |
The representative’s job title. Used in Bulgarian SAF-T. |
File type
| Attribute | Type | Description |
|---|---|---|
| id | ID |
The unique identifier of the file. You can 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] |
A human-readable summary of the input validation failures: one entry per rule that found a problem, naming up to ten example records. For every offending line, read errors. |
| 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. |
| totalSegmentsInSequence | Int |
The number of result files (segments) generated by this process. Corresponds to TotalSegmentsInsequence in the header of the generated XML file. |
| createdAt | DateTime |
The date and time when the process was created. |
roD406AnalysisData |
ROD406AnalysisData |
The pre-computed RO D406 KPI analysis for this process. Populated when the process completes with status DONE for a Romanian D406 declaration. See ROD406AnalysisData. |
roKPIAnalysisData |
[ROKPIAnalysisDataElement] |
The pre-computed RO D406 KPI analysis broken down by month, as a list of ROKPIAnalysisDataElement objects. See also the roKPIAnalysisData query. |
analysisDataViewerUrl(expiresIn) |
Uri |
A presigned URL for viewing the analysis data in an external viewer. Expires after the number of seconds supplied in expiresIn. |
errors(limit, nextToken) |
ProcessValidationErrorList! |
The findings of the input validation of the process, one per offending input line, as a ProcessValidationErrorList type. limit is optional and sets the maximum number of findings per page; it defaults to 50, capped at 200. To read the next page, pass the nextToken of the previous page. The findings are kept for seven days. When there is nothing to report, or the findings have expired, the list is empty. See Reading validation errors. |
ProcessValidationErrorList type
| Attribute | Type | Description |
|---|---|---|
| items | [ProcessValidationError!]! |
The findings on this page, as a list of ProcessValidationError objects. |
| nextToken | String |
The cursor for the next page. Pass it unchanged as the nextToken argument of errors. null on the last page. |
| totalCount | Int! |
The number of findings for the process, across all pages. |
ProcessValidationError type
| Attribute | Type | Description |
|---|---|---|
| code | String! |
The identifier of the rule that produced the finding, in the form <FILE_TYPE>.<RULE>, for example INVOICES.INVOICE_TYPE_NOT_PERMITTED. For the list of codes and how they evolve, see Appendix 11: Validation rule codes. |
| fileType | SafTInputFileType! |
The input file type whose content the rule evaluated. Valid values: ASSETS, ASSET_TRANSACTIONS, BUSINESS_PARTNERS, GENERAL_LEDGER_ACCOUNTS, GENERAL_LEDGER_ENTRIES, INVOICES, MOVEMENT_OF_GOODS, PAYMENTS, and PHYSICAL_STOCK. |
| field | ProcessValidationErrorField |
The input CSV column that the rule evaluated, spelled exactly as in the CSV header, for example InvoiceType. Valid values are the column names listed in Appendix 1 and Appendix 3. Absent when the rule checks a relationship between columns or between files. |
| documentId | String |
The identifier of the offending record, as the input file carries it. See Identifiers per file type. |
| documentContextId | String |
The identifier that qualifies documentId when the key of the record has two parts, for example the journal of a general ledger entry. |
| documentDescription | String |
The offending record in words: its description, its name, or, for an asset transaction, its date. Use it to present the record to your users. It is not unique, so locate the record by its identifiers. |
| systemId | String |
The identifier of the record in your ERP system, when the input file carries one. |
| lineId | String |
The line of the offending record, when the record has lines. |
| message | String! |
The finding in prose, in the language of the declaration: Romanian for a Romanian declaration, Bulgarian for a Bulgarian one. |
Identifiers per file type
The identifiers and the description that a ProcessValidationError carries depend on its fileType. Each cell names the input CSV column that the value comes from. A dash means that the file type has no such column, so the field is always absent. A field is also absent when the offending line leaves its column empty. LineNumber is optional in Invoices and Payments, so lineId may be absent for findings on those files.
fileType |
documentId |
documentContextId |
documentDescription |
systemId |
lineId |
|---|---|---|---|---|---|
| ASSETS | AssetID | — | Description | — | — |
| ASSET_TRANSACTIONS | AssetTransactionID | AssetID | AssetTransactionDate | — | — |
| BUSINESS_PARTNERS | ID | PartnerType | Name | — | — |
| GENERAL_LEDGER_ACCOUNTS | AccountID | — | AccountDescription | — | — |
| GENERAL_LEDGER_ENTRIES | TransactionID | JournalID | Description | SystemID | RecordID |
| INVOICES | InvoiceNo | — | Description | SystemID | LineNumber |
| MOVEMENT_OF_GOODS | MovementReference | — | Description | — | LineNumber |
| PAYMENTS | PaymentRefNo | — | Description | SystemID | LineNumber |
| PHYSICAL_STOCK | ProductCode | WarehouseID | Description | — | — |
ROD406AnalysisData type
| Attribute | Type | Description |
|---|---|---|
from |
Date |
Start date of the reporting period. |
to |
Date |
End date of the reporting period. |
headerComment |
HeaderComment |
Type of return (e.g., L for monthly). |
currency |
CurrencyCode |
ISO 4217 currency code of the reported amounts. |
periodDays |
Int |
Number of calendar days in the reporting period. |
profitability |
ROD406Profitability |
Profitability KPIs. See ROD406Profitability. |
liquidity |
ROD406Liquidity |
Liquidity KPIs. See ROD406Liquidity. |
activity |
ROD406Activity |
Activity KPIs. See ROD406Activity. |
tax |
ROD406TaxAnalysis |
Tax KPIs. See ROD406TaxAnalysis. |
assets |
ROD406AssetAnalysis |
Asset KPIs. See ROD406AssetAnalysis. |
standardBalanceSheet |
ROD406StandardBalanceSheet |
Standard balance sheet. See ROD406StandardBalanceSheet. |
systemBalanceSheet |
ROD406SystemBalanceSheet |
System balance sheet. See ROD406SystemBalanceSheet. |
validations |
[ROD406Validation] |
The results of the consistency tests run against the declaration: the tests ANAF recommends, plus the five period-date checks. Currently, these validations do not prevent the declaration from being generated and have recommendation status only. |
supplierInvoiceMatchesUrl(expiresIn) |
Uri |
A presigned URL to download the per-process JSON artifact that lists every supplier invoice and line for the process, both matched and non-matched. Expires after the number of seconds supplied in expiresIn. Returns null when the process has no such artifact. Consistent with analysisDataViewerUrl and ResultFile.downloadUrl. For the structure of the downloaded artifact, see Supplier invoice matches artifact. |
taxCodeCentralizer |
[ROD406TaxCodeCentralizerEntry] |
Per-tax-code centralizer that reports the tax base, tax amount, and tax percentage aggregated independently from each SAF-T source (General Ledger Entries, Invoices, and Payments), enriched with the code’s official name and percentage from the ANAF nomenclature. Populated only for resident monthly (L) and quarterly (T) declarations; null for annual (A), on-request (C), and non-resident (NL, NT) declarations. See Comparing tax reported per tax code. |
Supplier invoice matches artifact
The JSON artifact downloaded from supplierInvoiceMatchesUrl holds every supplier invoice and its lines for a single process — both matched and non-matched. For each supplier invoice line, it records whether the line was matched between the SAF-T (ERP) data and the corresponding e-factura invoice, and, for matched lines, the ERP product code and the e-factura product identity.
The artifact has no expiry: it exists for as long as its process and is removed only when the process, or its declaration, is deleted. The full line set is served through the presigned URL and is intentionally not embedded inline in the roD406AnalysisData record, so that a large number of lines does not bloat that record.
The artifact has the following structure:
{
"process": {
"tenantId": "9b1c…", "organizationId": "org-42",
"declarationId": "dec-7", "processId": "proc-9", "processCreatedAt": "2026-06-10T08:12:00Z",
"country": "RO", "declarationType": "D406", "declarationFrequency": "L",
"periodStart": "2026-05-01", "periodEnd": "2026-05-31"
},
"invoices": [
{
"invoiceNo": "FCT-1001", "invoiceType": "380", "invoiceDate": "2026-05-18",
"supplierName": "FURNIZOR SRL", "supplierTin": 15832829,
"netTotal": 1050.0, "grossTotal": 1249.5, "invoiceLineCurrencyCode": "RON",
"lineCount": 4, "matchedLineCount": 3,
"lines": [
{
"lineNumber": "3", "matchStatus": "MATCHED",
"goodsServicesId": "…", "quantity": 10, "invoiceUom": "BUC",
"unitPrice": 12.5, "invoiceLineAmount": 125.0, "debitCreditIndicator": "D",
"saftProductCode": "ART-00731", "saftProductDescription": "Hârtie A4 80g",
"efacturaSellerItemId": "SUP-PAP-A4", "efacturaStandardItemId": null,
"efacturaItemName": "Hartie copiator A4", "efacturaItemDescription": null,
"normalizedProductKey": "sup-pap-a4", "productKeyBasis": "sellerItemId"
},
{
"lineNumber": "1", "matchStatus": "SAFT_ONLY",
"quantity": 1, "unitPrice": 240.0, "invoiceLineAmount": 240.0,
"saftProductCode": "ART-00120", "saftProductDescription": "Toner negru"
},
{
"lineNumber": "2", "matchStatus": "EFACTURA_ONLY",
"quantity": 2, "unitPrice": 90.0, "invoiceLineAmount": 180.0,
"efacturaSellerItemId": "SUP-INK-22", "efacturaItemName": "Cartus cerneala"
}
]
}
]
}
The process header block provides the following fields:
| Field | Description |
|---|---|
tenantId |
The tenant to which the process belongs. |
organizationId |
The organization (fiscal entity) for which reporting was done. |
declarationId |
The unique identifier of the declaration. |
processId |
The unique identifier of the process. |
processCreatedAt |
The date and time when the process was created (ISO 8601). |
country |
The audit file country. Currently RO. |
declarationType |
The declaration type. Currently D406. |
declarationFrequency |
The reporting frequency, as a Header Comment value (L monthly, T quarterly). |
periodStart |
The start date of the reporting period (ISO date). |
periodEnd |
The end date of the reporting period (ISO date). |
Each entry in invoices[] has the following header fields:
| Field | Description |
|---|---|
invoiceNo |
The invoice number. |
invoiceType |
The SAF-T invoice type code (for example, 380 factură, 389 autofactură). |
invoiceDate |
The invoice date. |
supplierName |
The supplier’s name. |
supplierTin |
The supplier’s TIN. |
netTotal |
The invoice net total. |
grossTotal |
The invoice gross total. |
invoiceLineCurrencyCode |
The currency code of the invoice line amounts (for example, RON). |
lineCount |
The total number of lines on the invoice. |
matchedLineCount |
The number of those lines with matchStatus MATCHED. Together with lineCount, this conveys the invoice’s match coverage (fully matched, partially matched, or unmatched). |
Each entry in an invoice’s lines[] has the following fields. The Present on column indicates for which matchStatus values a field is populated:
| Field | Present on | Description |
|---|---|---|
lineNumber |
All | The line number on the invoice. |
matchStatus |
All | The match outcome for the line. Valid values: MATCHED - matched between the SAF-T data and the e-factura invoice, SAFT_ONLY - present in the SAF-T data only, EFACTURA_ONLY - present in the e-factura invoice only. |
goodsServicesId, quantity, invoiceUom, unitPrice, invoiceLineAmount, debitCreditIndicator |
All (as available) | Line detail: product/service identifier, quantity, unit of measure, unit price, line amount, and debit/credit indicator. |
saftProductCode, saftProductDescription |
MATCHED, SAFT_ONLY | The ERP (SAF-T) product code and description. |
efacturaSellerItemId, efacturaStandardItemId, efacturaItemName, efacturaItemDescription |
MATCHED, EFACTURA_ONLY | The e-factura product identity. |
normalizedProductKey, productKeyBasis |
MATCHED | The normalized product key that fed the supplierProductMappings lookup, and how it was derived. |
ROD406Profitability type
For formulas, see Appendix 9.
| Attribute | Type | Description |
|---|---|---|
CA |
Float |
Turnover / Revenue (Cifra de afaceri). Net credit on revenue accounts (70*) minus debit on discount accounts (709). |
EAT |
Float |
Net profit after tax (Profit net). |
EBT |
Float |
Gross profit before tax (Profit brut): EAT + Σ DebitAmount(69*). |
EBIT |
Float |
Operating profit: EBT − Σ CreditAmount(76*) + Σ DebitAmount(66*). |
EBITDA |
Float |
Operating profit before interest, taxes, depreciation, and amortization: EBIT + Σ DebitAmount(68*). |
MB |
Float |
Gross margin %: (EBIT × 100) / CA. |
RCT |
Float |
Total expense ratio % (Rata cheltuieli totale). |
MPN |
Float |
Net profit margin %: (EAT / CA) × 100. |
VE |
Float |
Operating revenue (Venituri din exploatare): Σ CreditAmount(70*..75*) − Σ DebitAmount(709). |
CT |
Float |
Total costs and expenses (Cheltuieli totale): Σ Debit (6*) - Σ Credit(609). |
ROD406Liquidity type
| Attribute | Type | Description |
|---|---|---|
CR |
Float |
Accounts receivable (Creante clienti): net closing debit balance of customer accounts. |
DAT |
Float |
Accounts payable (Datorii furnizori): net closing credit balance of supplier accounts. |
CL |
Float |
Net working capital (Capital de lucru): CR − DAT. |
ROD406Activity type
| Attribute | Type | Description |
|---|---|---|
NFC |
Int |
Sales invoice count (Nr. facturi clienți). |
NFF |
Int |
Purchase invoice count (Nr. facturi furnizori). |
VMF |
Float |
Average sales invoice value (Valoare medie factură vânzare). |
NPC |
Int |
Number of active business partners. |
RRC |
Float |
Customer receivables turnover (Viteza de rotație a debitelor clienților). |
RAC |
Float |
Current asset turnover (Viteza de rotație a activelor circulante). |
RRF |
Float |
Supplier payables turnover (Viteza de rotație a debitelor furnizorilor). |
ROD406TaxAnalysis type
| Attribute | Type | Description |
|---|---|---|
TVAC |
Float |
Output VAT (TVA colectat): sum of tax amounts on customer invoices. |
TVAD |
Float |
Input VAT (TVA deductibil): sum of tax amounts on supplier invoices. |
TVAN |
Float |
Net VAT position (TVA net): TVAC − TVAD. Positive = VAT liability; negative = refundable position. |
ROD406AssetAnalysis type
| Attribute | Type | Description |
|---|---|---|
VBI |
Float |
Fixed assets book value (Valoare imobilizări): total net book value of fixed assets at period end. |
AMP |
Float |
Depreciation for the period (Amortizare periodica). |
RAI |
Float |
Fixed asset turnover (Viteza de rotație a activelor imobilizate): CA divided by the average net book value of fixed assets. |
ROD406StandardBalanceSheet type
The standard balance sheet maps the organization’s account balances to the standard chart of accounts prescribed by the tax authority for the corresponding tax accounting basis.
| Attribute | Type | Description |
|---|---|---|
classes |
[ROD406StandardBalanceClass] |
List of balance sheet classes. See ROD406StandardBalanceClass. |
openingDebit |
Float |
Total opening debit balance across all classes. |
openingCredit |
Float |
Total opening credit balance across all classes. |
currentDebit |
Float |
Total current-period debit turnover across all classes. |
currentCredit |
Float |
Total current-period credit turnover across all classes. |
closingDebit |
Float |
Total closing debit balance across all classes. |
closingCredit |
Float |
Total closing credit balance across all classes. |
ROD406StandardBalanceClass type
| Attribute | Type | Description |
|---|---|---|
id |
ID |
The class identifier. |
name(locale) |
String |
The class name. Accepts an optional locale argument, , for example “ro-RO”. |
accounts |
[ROD406StandardBalanceAccount] |
List of accounts in this class. See ROD406StandardBalanceAccount. |
openingDebit |
Float |
Total opening debit balance for the class. |
openingCredit |
Float |
Total opening credit balance for the class. |
currentDebit |
Float |
Total current-period debit turnover for the class. |
currentCredit |
Float |
Total current-period credit turnover for the class. |
closingDebit |
Float |
Total closing debit balance for the class. |
closingCredit |
Float |
Total closing credit balance for the class. |
ROD406StandardBalanceAccount type
| Attribute | Type | Description |
|---|---|---|
id |
ID |
The account identifier. |
name(locale) |
String |
The account name. Accepts an optional locale argument, for example “ro-RO”. |
openingDebit |
Float |
Opening debit balance for the account. |
openingCredit |
Float |
Opening credit balance for the account. |
currentDebit |
Float |
Current-period debit turnover for the account. |
currentCredit |
Float |
Current-period credit turnover for the account. |
closingDebit |
Float |
Closing debit balance for the account. |
closingCredit |
Float |
Closing credit balance for the account. |
ROD406SystemBalanceSheet type
The system balance sheet provides the organization’s actual (system-of-record) account balances, as opposed to the standard balance sheet, which maps balances to the standard chart of accounts prescribed by the tax authority. Both balance sheets are populated only for monthly (HeaderComment = L) or quarterly (HeaderComment = T) Romanian D406 declarations.
| Attribute | Type | Description |
|---|---|---|
classes |
[ROD406SystemBalanceClass] |
List of balance sheet classes. See ROD406SystemBalanceClass. |
openingDebit |
Float |
Total opening debit balance across all classes. |
openingCredit |
Float |
Total opening credit balance across all classes. |
currentDebit |
Float |
Total current-period debit turnover across all classes. |
currentCredit |
Float |
Total current-period credit turnover across all classes. |
closingDebit |
Float |
Total closing debit balance across all classes. |
closingCredit |
Float |
Total closing credit balance across all classes. |
ROD406SystemBalanceClass type
| Attribute | Type | Description |
|---|---|---|
id |
ID |
The class identifier. |
name(locale) |
String |
The class name. Accepts an optional locale argument, for example “ro-RO”. |
accounts |
[ROD406SystemBalanceAccount] |
List of accounts in this class. See ROD406SystemBalanceAccount. |
openingDebit |
Float |
Total opening debit balance for the class. |
openingCredit |
Float |
Total opening credit balance for the class. |
currentDebit |
Float |
Total current-period debit turnover for the class. |
currentCredit |
Float |
Total current-period credit turnover for the class. |
closingDebit |
Float |
Total closing debit balance for the class. |
closingCredit |
Float |
Total closing credit balance for the class. |
ROD406SystemBalanceAccount type
| Attribute | Type | Description |
|---|---|---|
id |
ID |
The account identifier. |
standardId |
ID |
The identifier of the corresponding standard account in the ROD406StandardBalanceAccount type. |
name |
String |
The account name. |
openingDebit |
Float |
Opening debit balance for the account. |
openingCredit |
Float |
Opening credit balance for the account. |
currentDebit |
Float |
Current-period debit turnover for the account. |
currentCredit |
Float |
Current-period credit turnover for the account. |
closingDebit |
Float |
Closing debit balance for the account. |
closingCredit |
Float |
Closing credit balance for the account. |
ROKPIAnalysisDataElement type
Provides the RO D406 KPI analysis for a single month of the reporting period. A process returns one element per month covered by the declaration.
| Attribute | Type | Description |
|---|---|---|
month |
Month |
The month to which this set of KPIs applies. |
profitability |
ROD406Profitability |
Profitability KPIs for the month. See ROD406Profitability. |
liquidity |
ROD406Liquidity |
Liquidity KPIs for the month. See ROD406Liquidity. |
activity |
ROD406Activity |
Activity KPIs for the month. See ROD406Activity. |
tax |
ROD406TaxAnalysis |
Tax KPIs for the month. See ROD406TaxAnalysis. |
ROD406Validation type
Represents the outcome of a single consistency test applied to the analysis data. These tests are the additional checks that the DUK Integrator tool described under Validation does not cover: the tests ANAF requires, plus the five period-date checks.
| Attribute | Type | Description |
|---|---|---|
code |
String |
The unique code that identifies the validation. An ANAF test has the form <Set>.<Number>, where <Set> is the ANAF communiqué set and <Number> is the test number within that set; for example, 2.4 is test 4 of Set 2. A period-date check has a four-letter code instead: GLED, INVD, PAYD, MOGD, or ASTD. |
description |
String |
The description of the test, in Romanian. For an ANAF test, the description as published in the corresponding ANAF communiqué. For a period-date check, a description of the date it verifies. |
status |
ROD406ValidationStatus |
The outcome of the validation. Valid values: SUCCEEDED - the validation passed, FAILED - the validation failed, SKIPPED (default) - the validation was skipped (for example, when the period holds no data, when the validation requires an input file type that was not uploaded, or when the validation applies to other cases). |
message |
String |
The message associated with the validation. Populated with the failure reason for a FAILED validation, and may also carry an explanation for a SKIPPED validation (for example, that the validation requires an input file type that was not uploaded for the declaration). Empty (null) for a SUCCEEDED validation. |
ROD406TaxCodeCentralizerEntry type
Represents a single tax code in the centralizer, with the amounts reported for that code by each SAF-T source and, when available, the matching entry from the ANAF nomenclature. There is one entry per distinct tax code in the computed declaration, ordered by taxCode ascending. An empty or absent tax code is normalized to 000000.
| Attribute | Type | Description |
|---|---|---|
taxCode |
String! |
The tax code. Never null. |
nameRo |
String |
The Romanian name of the tax code, from the ANAF nomenclature. null when the code is not present in the nomenclature. |
nameEn |
String |
The English name of the tax code, from the ANAF nomenclature. null when the code is not present in the nomenclature. |
nomenclaturePercentage |
Float |
The official tax percentage for the code, from the ANAF nomenclature, in percentage points (for example, 19 for 19%). null when the code is not present in the nomenclature, or when the nomenclature does not define a single fixed rate for it. |
gle |
ROD406TaxCodeCentralizerSourceMetrics |
Amounts aggregated from the General Ledger Entries source. null when that source reports no rows for this tax code. |
invoices |
ROD406TaxCodeCentralizerSourceMetrics |
Amounts aggregated from the Invoices source. null when that source reports no rows for this tax code. |
payments |
ROD406TaxCodeCentralizerSourceMetrics |
Amounts aggregated from the Payments source. null when that source reports no rows for this tax code. |
ROD406TaxCodeCentralizerSourceMetrics type
The tax base, tax amount, and tax percentage reported for a single tax code by one SAF-T source. Each source is aggregated independently, so its rate is reported as-is and is not reconciled against the other sources or against the nomenclature.
| Attribute | Type | Description |
|---|---|---|
taxBase |
Float |
The sum of the tax bases reported for this tax code by this source. |
taxAmount |
Float |
The sum of the tax amounts reported for this tax code by this source. |
taxPercentage |
Float |
The tax percentage applied for this tax code by this source, in percentage points (for example, 19 for 19%). If the source reports more than one rate for the code, the highest is returned. |
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 monthly totals of the general ledger accounts, as a list of DebitCreditOpenClose objects. |
| csvGeneralLedgerEntriesMonthTotals | [DebitCredit] |
The monthly totals of the general ledger entries, as a list of DebitCredit objects. |
| csvInvoiceTotals | CsvInvoiceTotals |
The totals applicable to reported invoices, as CsvInvoiceTotals object. |
| csvPaymentTotals | CsvPaymentTotals |
The totals applicable to reported payments, 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. |
CsvFileLines type
| Attribute | Type | Description |
|---|---|---|
| generalLedgerAccounts | Int |
Reports the number of lines in GeneralLedgerAccounts.csv. |
| businessPartners | Int |
Reports the number of lines in BusinessPartners.csv. |
| assets | Int |
Reports the number of lines in Assets.csv. |
| physicalStock | Int |
Reports the number of lines in PhysicalStock.csv. |
| generalLedgerEntries | Int |
Reports the number of lines in GeneralLedgerEntries.csv. |
| invoices | Int |
Reports the number of lines in Invoices.csv. |
| payments | Int |
Reports the number of lines in Payments.csv. |
| movementOfGoods | Int |
Reports the number of lines in MovementOfGoods.csv. |
| assetTransactions | Int |
Reports the number of lines in AssetTransactions.csv. |
| allFileLines | Int |
Reports the total number of lines in all files. |
AccountTotal type
| Attribute | Type | Description |
|---|---|---|
| accountID | String |
The general ledger account code. |
| debitCredit | DebitCreditOpenClose |
The opening and/or closing credit/debit values, as a DebitCreditOpenClose type. |
DebitCreditOpenClose type
| Attribute | Type | Description |
|---|---|---|
| totalDebitOpen | Float |
The debit balance at the start date of the selection period. |
| totalCreditOpen | Float |
The credit balance at the start date of the selection period. |
| totalDebitClose | Float |
The debit balance at the end date of the selection period. |
| totalCreditClose | Float |
The credit balance at the end date of the selection period. |
DebitCredit type
| Attribute | Type | Description |
|---|---|---|
| totalDebit | Float |
The debit balance for the reported period. |
| totalCredit | Float |
The credit balance for the reported period. |
CsvInvoiceTotals type
| Attribute | Type | Description |
|---|---|---|
| allInvoices | Int |
The total number of invoices. |
| customerInvoices | Int |
The total number of customer invoices. |
| supplierInvoices | Int |
The total number of supplier invoices. |
| customerInvoicesTotal | Float |
The total amount of all customer invoices. |
| supplierInvoicesTotal | Float |
The total amount of all supplier invoices. |
| customerInvoicesCurrencyTotal | [CurrencyAmount] |
The total amount of all customer invoices reported in another currency, as a CurrencyAmount object. |
| supplierInvoicesCurrencyTotal | [CurrencyAmount] |
The total amount of all supplier invoices reported in another currency, as a CurrencyAmount object. |
CsvPaymentTotals type
| Attribute | Type | Description |
|---|---|---|
| allPayments | Int |
The total number of payments. |
| debitPayments | Int |
The total number of debit payments. |
| creditPayments | Int |
The total number of credit payments. |
| debitTotal | Float |
The total amount of all debit payments. |
| creditTotal | Float |
The total amount of all credit payments. |
| debitCurrencyTotal | [CurrencyAmount] |
The total amount of all debit payments reported in another currency, as a CurrencyAmount object. |
| creditCurrencyTotal | [CurrencyAmount] |
The total amount of all credit payments reported in another currency, as a CurrencyAmount object. |
CurrencyAmount type
| Attribute | Type | Description |
|---|---|---|
| currency | String |
The currency code. |
| amount | Float |
The amount in the respective currency. |
MasterFilesTotals type
| Attribute | Type | Description |
|---|---|---|
| generalLedgerAccountsTotals | GeneralLedgerAccountsTotals |
The totals of all reported general ledger accounts, as a GeneralLedgerAccountsTotals object. |
| customersTotals | BusinessPartnersTotals |
The totals pertaining to all reported customers, as a BusinessPartnersTotals object. |
| suppliersTotals | BusinessPartnersTotals |
The totals pertaining to all reported suppliers, as a BusinessPartnersTotals object. |
| customers | Int |
The total number of customers. |
| suppliers | Int |
The total number of suppliers. |
| businessPartners | Int |
The total number of business partners (customers and suppliers). |
GeneralLedgerAccountsTotals type
| Attribute | Type | Description |
|---|---|---|
| debitCredit | DebitCreditOpenClose |
The computed total debits and credits, as a DebitCreditOpenClose object. |
BusinessPartnersTotals type
| Attribute | Type | Description |
|---|---|---|
| accountTotals | [AccountTotal] |
A list of AccountTotal objects. |
GeneralLedgerEntriesTotals type
| Attribute | Type | Description |
|---|---|---|
| numberOfEntries | Int |
The total number (count) of general ledger entries. |
| debitCredit | DebitCredit |
The computed debits and credits, as a DebitCredit object. |
SourceDocuments type
| Attribute | Type | Description |
|---|---|---|
| salesInvoices | InvoicesTotals |
The totals applicable to sales invoices, as an InvoicesTotals object. |
| purchaseInvoices | InvoicesTotals |
The totals applicable to purchase invoices, as an InvoicesTotals object. |
| paymentsTotals | PaymentsTotals |
The totals applicable to payments, as a PaymentsTotals object. |
InvoicesTotals type
| Attribute | Type | Description |
|---|---|---|
| numberOfEntries | Int |
The total number (count) of invoices. |
| debitCredit | DebitCredit |
The computed debits and credits, as a DebitCredit object. |
PaymentsTotals type
| Attribute | Type | Description |
|---|---|---|
| numberDebits | Int |
Total number of debit entries. |
| numberCredits | Int |
Total number of credit entries. |
| valueDebits | Float |
The total amount of debits. |
| valueCredits | Float |
The total amount of credits. |
Header type
| Attribute | Type | Description |
|---|---|---|
| auditFileVersion | String |
Identifies the version of the SAF-T file. |
| auditFileCountry | CountryCode |
The two-letter country code, according to ISO 3166-1 alpha 2 standard. For example, RO for Romania. |
| auditFileRegion | String |
The region within the tax authority, according to ISO 3166-1A2 - RO Dept Codes. For example, RO-AB for Alba county. |
| auditFileDateCreated | Date |
The date when the SAF-T file was created. |
| softwareCompanyName | String |
The name of the software company whose product created the SAF-T file. |
| softwareID | String |
The name of the software that generated the SAF-T file. |
| softwareVersion | String |
The version of the software that created the SAF-T file. |
| company | CompanyHeaderStructure |
The details about the reporting company, as a CompanyHeaderStructure object. |
| defaultCurrencyCode | String |
The three-letter currency code (ISO 4217) of the local default currency. |
| selectionCriteria | SelectionCriteriaStructure |
The criteria set by the user to populate the SAF-T file, as a SelectionCriteriaStructure object. |
| headerComment | String |
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 |
For valid values, see Appendix 6: Tax Accounting Basis. |
| 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. |
| contact | [ContactHeaderStructure] |
The company’s contact details, as a list of ContactHeaderStructure objects. |
| taxRegistration | TaxIDStructure |
The company’s tax registration details, as a TaxIdStructure object. |
| bankAccount | [BankAccount] |
The company’s bank account details, as a list of BankAccount objects. |
Address type
| Attribute | Type | Description |
|---|---|---|
| streetName | String |
The street name. |
| number | String |
The street number. |
| additionalAddressDetails | String |
Any additional address details. |
| building | String |
The building. |
| city | String |
The city. |
| postalCode | String |
The postal/zip code. |
| region | String |
The region/county. |
| country | CountryCode |
The country. |
| addressType | String |
Type of address. |
ContactHeaderStructure type
| Attribute | Type | Description |
|---|---|---|
| contactPerson | PersonNameStructure |
The details of the contact person, as a PersonNameStructure object. |
| telephone | String |
The contact phone. |
| fax | String |
The fax. |
EmailAddress |
The email of the contact person. | |
| website | Uri |
The website associated with the contact person. |
PersonNameStructure type
| Attribute | Type | Description |
|---|---|---|
| title | String |
The person’s title. |
| firstName | String |
The person’s first name. |
| initials | String |
The person’s initials. |
| lastNamePrefix | String |
The person’s last name prefix. |
| lastName | String |
The last name of the person. |
| birthName | String |
The birth name. |
| salutation | String |
The salutation (for example, “Mrs”). |
| otherTitles | String |
Any other titles applicable to the person. |
TaxIdStructure type
| Attribute | Type | Description |
|---|---|---|
| taxRegistrationNumber | String |
The tax registration number. |
| taxType | String |
The tax type. |
| taxNumber | String |
The tax number. |
| taxAuthority | String |
The tax authority. |
| taxVerificationDate | String |
The tax verification date. |
BankAccount type
| Attribute | Type | Description |
|---|---|---|
| ibanNumber | String |
The International Banking Account Number. |
| bankAccountNumber | String |
The bank account number. |
| bankAccountName | String |
The name associated with this bank account. |
| sortCode | String |
The bank’s sort code. |
SelectionCriteriaStructure type
| Attribute | Type | Description |
|---|---|---|
| taxReportingJurisdiction | String |
The reported tax reporting jurisdiction. |
| companyEntity | String |
The reported company entity. |
| selectionStartDate | Date |
The start date of the reporting period. |
| selectionEndDate | Date |
The end date of the reporting period. |
| periodStart | Float |
The first accounting period covered by SAF-T. |
| periodStartYear | Float |
The accounting period in which periodStart falls. |
| periodEnd | Float |
The last accounting period covered by SAF-T. |
| periodEndYear | Float |
The accounting period in which periodEnd falls. |
| documentType | String |
Type of documents selected. |
| otherCriteria | String |
Any other criteria used in selecting data. |
SupplierProductMappingList type
Returned by the supplierProductMappings query.
| Attribute | Type | Description |
|---|---|---|
items |
[SupplierProductMapping!]! |
The current batch of mappings. See SupplierProductMapping. |
nextToken |
String |
An opaque continuation cursor. Pass it back unchanged to fetch the next batch. null on the last batch. |
SupplierProductMapping type
A single (supplier, product) → ERP product code mapping. Only the product- and supplier-related fields are exposed.
| Attribute | Type | Description |
|---|---|---|
supplierTin |
String |
The supplier’s TIN. |
normalizedProductKey |
String |
The normalized product key derived from the e-factura invoice line’s product identity. |
productKeyBasis |
String |
How the key was derived. Valid values: sellerItemId, standardItemId, name, description. |
saftProductCode |
String |
The suggested ERP (SAF-T) product code. |
saftProductDescription |
String |
The ERP (SAF-T) product description. |
Example
query declarations ($filter:DeclarationsFilter!, $processFilter:ProcessesFilterInput) {
declarations(filter:$filter) {
id
organization { id, name, tin }
representative { id, firstName, lastName, phone, email }
headerComment
from
to
files { id, fileType, name, createdAt }
processes (filter: $processFilter) {
id,
status,
errorMessages,
createdAt,
result { id name createdAt downloadUrl(expiresIn:3600) },
totals {
csvLines {
generalLedgerAccounts
businessPartners
assets
physicalStock
generalLedgerEntries
invoices
payments
movementOfGoods
assetTransactions
allFileLines
}
csvBusinessPartnerAccountTotals {
accountID
debitCredit {
totalDebitOpen
totalDebitClose
totalCreditOpen
totalCreditClose
}
}
csvGeneralLedgerAccountsMonthTotals {
totalDebitOpen
totalDebitClose
totalCreditOpen
totalCreditClose
}
csvGeneralLedgerEntriesMonthTotals {
totalCredit
totalDebit
}
csvInvoiceTotals {
allInvoices
customerInvoices
supplierInvoices
customerInvoicesTotal
supplierInvoicesTotal
customerInvoicesCurrencyTotal {
currency
amount
}
supplierInvoicesCurrencyTotal {
currency
amount
}
}
csvPaymentTotals {
allPayments
debitPayments
creditPayments
debitTotal
creditTotal
debitCurrencyTotal {
currency
amount
}
}
},
}
createdAt
}
}
{
"filter": {
"id": "YOUR_DECLARATION_ID",
"organizationId": "YOUR_ORGANIZATION_ID"
}
}
declaration
Retrieves a single declaration by its identifier.
Arguments
| Argument | Type | Description |
|---|---|---|
| id | ID! |
Mandatory. The identifier of the tax declaration. |
Result
See the Declaration type.
Example
query declaration($id:ID!) {
declaration(id:$id) {
id
organization { id, name, tin }
representative { id, firstName, lastName, phone, email }
headerComment
declarationType
from
to
files { id, fileType, name, createdAt }
processes { id, status, createdAt }
createdAt
}
}
{
"id": "YOUR_DECLARATION_ID"
}
organizations
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. |
| 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-1 alpha-2 country code. |
| createdAt | DateTime |
The date and time when the organization record was created in SBS. |
Example
The following query retrieves the currently active organizations defined in the Organizations Service.
query Organizations {
organizations {
id
name
tin
regNo
country
createdAt
}
}
representatives
Returns a list of representatives created for the given tenant.
Arguments
None.
Result
See the Representative type.
Example
The following query retrieves all the representatives.
query representatives {
representatives {
id
firstName
lastName
phone
email
otherTitles
}
}
roD406AnalysisData
Returns comprehensive RO D406 analysis data for the month or period for which the declaration was computed. On the STANDARD plan, you get analysis data for every Romanian D406 declaration you compute. Analysis data is not available on the LIMITED plan: if your tenant is on that plan, the query returns null without an error, as it does for analysis data not yet computed. See Service plans. Which individual fields are populated depends on the declaration type and on the input files you provided: taxCodeCentralizer, for example, is populated only for monthly (L) and quarterly (T) declarations.
The analysis data is computed together with the declaration and no extra steps are required to generate it, apart from generating the RO D406 declaration itself, see Generating a declaration.
Arguments
| Argument | Type | Description |
|---|---|---|
organizationId |
ID! |
Mandatory. The ID of the organization. |
declarationId |
ID! |
Mandatory. The ID of the declaration. |
processId |
ID! |
Mandatory. The ID of the process. |
Result
Returns ROD406AnalysisData, or null if not yet computed.
Example
query roD406AnalysisData($organizationId:ID!, $declarationId:ID!, $processId:ID!) {
roD406AnalysisData(
organizationId: $organizationId
declarationId: $declarationId
processId: $processId
) {
from
to
currency
periodDays
profitability { CA EAT EBT EBIT EBITDA MB MPN RCT VE CT }
liquidity { CR DAT CL }
activity { NFC NFF VMF NPC RRC RAC RRF }
tax { TVAC TVAD TVAN }
assets { VBI AMP RAI }
standardBalanceSheet {
classes {
id name
openingDebit openingCredit currentDebit currentCredit closingDebit closingCredit
accounts {
id name
openingDebit openingCredit currentDebit currentCredit closingDebit closingCredit
}
}
}
systemBalanceSheet {
openingDebit openingCredit currentDebit currentCredit closingDebit closingCredit
classes {
id name
openingDebit openingCredit currentDebit currentCredit closingDebit closingCredit
accounts {
id standardId name
openingDebit openingCredit currentDebit currentCredit closingDebit closingCredit
}
}
}
validations { code description status message }
taxCodeCentralizer {
taxCode nameRo nameEn nomenclaturePercentage
gle { taxBase taxAmount taxPercentage }
invoices { taxBase taxAmount taxPercentage }
payments { taxBase taxAmount taxPercentage }
}
}
}
{
"organizationId": "YOUR_ORGANIZATION_ID",
"declarationId": "YOUR_DECLARATION_ID",
"processId": "YOUR_PROCESS_ID"
}
roKPIAnalysisData
Returns historical RO D406 KPI analysis data, broken down by month. Applicable only for declarations that use monthly (not quarterly) reporting.
KPI declarations are not available on the LIMITED plan. See Service plans.
To obtain KPI data:
- Initiate a Romanian declaration with a call to
initiateDeclaration. SetdeclarationTypeto KPI. - Set the
fromandtodates for the period you want to cover (for example, the past 3 years up to current date). - Set the headerComment to L (Monthly).
- Add the GeneralLedgerAccounts and GeneralLedgerEntries CSV files to the declaration (for the latest month) with
prepareFile, as described in Preparing declaration files. You can optionally also add an Invoices file for that month to populate the invoice-derived activity KPIs (NFC,NFF,VMF, andNPC). - Trigger the computation with
generateDeclarationand note theidof the returnedProcess. - Once the process reaches status DONE, call
roKPIAnalysisDatawith the organization ID, declaration ID, and that process ID. Until then, the query returnsnull.
NOTE: No SAF-T XML file is generated when you set the declarationType to KPI.
Arguments
| Argument | Type | Description |
|---|---|---|
organizationId |
ID! |
Mandatory. The ID of the organization. |
declarationId |
ID! |
Mandatory. The ID of the declaration. |
processId |
ID! |
Mandatory. The ID of the process. |
Result
Returns a list of ROKPIAnalysisDataElement objects, one per month of the reporting period, or null if not yet computed.
Example
query roKPIAnalysisData($organizationId:ID!, $declarationId:ID!, $processId:ID!) {
roKPIAnalysisData(
organizationId: $organizationId
declarationId: $declarationId
processId: $processId
) {
month
profitability { CA EAT EBT EBIT EBITDA MB MPN RCT VE CT }
liquidity { CR DAT CL }
activity { NFC NFF VMF NPC RRC RAC RRF }
tax { TVAC TVAD TVAN }
}
}
{
"organizationId": "YOUR_ORGANIZATION_ID",
"declarationId": "YOUR_DECLARATION_ID",
"processId": "YOUR_PROCESS_ID"
}
supplierProductMappings
Lists, per organization, the latest (supplier, product) → ERP product code mappings accrued from that organization’s prior Romanian D406 declarations. Each time a RO D406 declaration is computed, its supplier e-factura invoice lines are matched against the SAF-T (ERP) data, and every confirmed match contributes a mapping from the supplier’s product to the ERP product code. This query surfaces those accrued mappings so you can, for example, suggest the ERP product code for an incoming supplier invoice line.
The following apply:
- Recency. When the same product from the same supplier was matched in several periods, the query returns the value from the most recent declaration period.
- Only confirmed matches are returned. Only lines with
matchStatusMATCHED produce a mapping. Lines that are SAFT_ONLY or EFACTURA_ONLY appear in the supplier invoice matches artifact but never as a mapping. - Scope. Mappings are accrued from Romanian D406 monthly (Header Comment L) and quarterly (Header Comment T) declarations.
- Service plan. If your tenant is on the LIMITED plan, the declarations you compute add no mappings. You still get the mappings accrued before your tenant moved to that plan. See Service plans.
Arguments
| Argument | Type | Description |
|---|---|---|
organizationId |
ID! |
Mandatory. The ID of the organization. |
limit |
Int |
Optional. The maximum number of items to return in the batch. Defaults to 50, capped at 200. |
nextToken |
String |
Optional. The continuation cursor returned by a previous call. Omit it on the first call. See Continuous scroll. |
Continuous scroll
The query returns results in batches suitable for continuous (infinite) scroll, not page-numbered pagination. Each call returns a SupplierProductMappingList of { items, nextToken }:
itemsis the current batch (at mostlimititems).nextTokenis an opaque continuation cursor. To load the next batch, call the query again with the sameorganizationIdand thisnextTokenpassed back unchanged. Do not parse the cursor.nextTokenisnullonce the last batch has been returned.
There are no page numbers, offsets, or total count. An organization with no mappings returns an empty items list and a null nextToken (an empty result, not an error).
Result
Returns a SupplierProductMappingList.
Example
query supplierProductMappings($organizationId:ID!, $limit:Int, $nextToken:String) {
supplierProductMappings(
organizationId: $organizationId
limit: $limit
nextToken: $nextToken
) {
items {
supplierTin
normalizedProductKey
productKeyBasis
saftProductCode
saftProductDescription
}
nextToken
}
}
{
"organizationId": "YOUR_ORGANIZATION_ID",
"limit": 50,
"nextToken": null
}
version
Returns the API version.
Mutations
createRepresentative
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.
Arguments
| Attribute | Type | Description |
|---|---|---|
| input | CreateRepresentativeInput! |
Mandatory. Provides the input to the mutation, as CreateRepresentativeInput object. |
CreateRepresentativeInput input
| Attribute | Type | Description |
|---|---|---|
| firstName | String! |
Mandatory. The first name of the representative. |
| lastName | String! |
Mandatory. The last name of the representative. |
| phone | String! |
Mandatory. The phone number of the representative. |
EmailAddress |
Optional. The representative’s email address. | |
| otherTitles | String |
Optional for Romanian SAF-T; mandatory for Bulgarian SAF-T. The representative’s job title. |
Result
See the Representative type.
Example
mutation createRepresentative($input:CreateRepresentativeInput!) {
createRepresentative(input:$input) {
id
firstName
lastName
email
phone
otherTitles
}
}
{
"input": {
"firstName": "Miroslav",
"lastName": "Radomirov",
"phone": "999-999-999",
"email": "miroslav@example.org",
"otherTitles": "Chief Finance Officer"
}
}
deleteDeclaration
Deletes a declaration, including all its input files and related processes.
Arguments
| Attribute | Type | Description |
|---|---|---|
| id | ID! |
Mandatory. The identifier of the declaration to be deleted. |
Result
See the Declaration type.
Example
mutation deleteDeclaration($id:ID!) {
deleteDeclaration(id:$id) {
id
}
}
{
"id": "YOUR_DECLARATION_ID"
}
deleteFile
Deletes a previously uploaded CSV file.
Arguments
| Attribute | Type | Description |
|---|---|---|
| input | DeleteFileInput |
Mandatory. Supplies the input to the mutation, as DeleteFileInput object. |
DeleteFileInput input
| Attribute | Type | Description |
|---|---|---|
| declarationId | ID! |
Mandatory. The identifier of the declaration. |
| id | ID! |
Mandatory. The identifier of the CSV file to be deleted. |
Result
See the File type.
Example
mutation deleteFile ($input:DeleteFileInput!) {
deleteFile(input: $input) {
id
declarationId
fileType
name
createdAt
}
}
{
"input": {
"declarationId": "YOUR_DECLARATION_ID",
"id": "YOUR_FILE_ID"
}
}
deleteProcess
Deletes a declaration computation process and the result XML files.
Arguments
| Attribute | Type | Description |
|---|---|---|
| declarationId | ID! |
Mandatory. The identifier of the declaration. |
| processId | ID! |
Mandatory. The identifier of the process to be deleted. |
Result
See the Process type.
Example
mutation deleteProcess($declarationId:ID!, $processId:ID!) {
deleteProcess(declarationId:$declarationId, processId:$processId) {
id
status
errorMessages
result {
id
# downloadUrl
createdAt
}
createdAt
}
}
{
"declarationId": "YOUR_DECLARATION_ID",
"processId": "YOUR_PROCESS_ID"
}
deleteRepresentative
Deletes a previously created representative.
REPRESENTATIVE_IN_USE (see Error codes).
Arguments
| Attribute | Type | Description |
|---|---|---|
| id | ID! |
The identifier of the representative to be deleted. |
Result
See the Representative type.
Example
mutation deleteRepresentative($id:ID!) {
deleteRepresentative(id:$id) {
id
firstName
lastName
phone
email
}
}
{
"id": "REPRESENTATIVE_ID"
}
generateDeclaration
Starts a declaration computation process.
Arguments
| Attribute | Type | Description |
|---|---|---|
| declarationId | ID! |
The ID of the declaration created previously through the initiateDeclaration mutation. |
Result
See the Process type.
Preconditions
For a Romanian declaration whose declarationType is not KPI, two rules apply to the uploaded input files: every mandatory file type must be present, and every present file type must be one the declaration type accepts. See Appendix 10: Input file types by declaration type (Romania).
If either rule is broken, the mutation creates no process and fails with the error code INVALID_FILE_TYPES_FOR_DECLARATION_TYPE (see Error codes).
When both rules are satisfied, the mutation starts a new process with status NEW.
KPI declarations are not available on the LIMITED plan. If your tenant is on that plan and you pass a declaration whose declarationType is KPI, the mutation fails with the error code PLAN_FEATURE_NOT_AVAILABLE and starts no process. This applies also to KPI declarations you created before your tenant moved to that plan. See Service plans.
Example
mutation generateDeclaration($declarationId:ID!) {
generateDeclaration(declarationId:$declarationId) {
id
status
errorMessages
}
}
{
"declarationId": "YOUR_DECLARATION_ID"
}
initiateDeclaration
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.
Arguments
| Attribute | Type | Description |
|---|---|---|
| input | InitiateDeclarationInput |
Provides the input to the mutation, as InitiateDeclarationInput object. |
InitiateDeclarationInput input
| Attribute | Type | Description |
|---|---|---|
| declarationType | DeclarationType! |
Mandatory. Identifies the type of tax declaration that is to be computed. Valid values: D406 (Romanian Standard Audit File for Tax), D406T - (Romanian Standard Audit File for Tax - Test), SAFT - Bulgarian Standard Audit File for Tax, KPI - Romanian D406 KPI analysis only. When set to KPI, no SAF-T XML file is generated; instead, KPIs are computed for every month in the reporting period and exposed through the roKPIAnalysisData query and the roKPIAnalysisData member of the Process type. |
| 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 for Romanian but optional for Bulgarian tax declarations. Identifies the region/county/province within the tax authority. For Romanian county codes, see Appendix 4: List of county codes (Romania). For Bulgarian region codes, see Appendix 5: List of region codes (Bulgaria). NOTE: The region code should belong to the country of the reporting organization (or to the auditFileCountry, if this argument was provided as input). |
| headerComment | HeaderComment! |
Mandatory. Specifies the reporting period covered by the declaration. L - for monthly returns (Romania), M - for monthly returns (Bulgaria), T - for quarterly returns (Romania), A - for annual returns (Romania, Bulgaria), C - for returns on request (Romania), D - for returns on demand (Bulgaria), NL - non-residents monthly (Romania), NT - non-residents quarterly (Romania). For Romanian D406 declarations, the headerComment determines which input file types are mandatory, optional, and not permitted; see Appendix 10: Input file types by declaration type (Romania). |
| taxAccountingBasis | TaxAccountingBasis |
Optional. Specifies the tax accounting basis to be used for this declaration. If this argument is not provided, the tax accounting basis of the organization identified by organizationId will be used. If this argument is provided, it takes precedence over the tax accounting basis defined at organization level. For valid values, see Appendix 6: Tax Accounting Basis. NOTE: The combination of input auditFileCountry and taxAccountingBasis must be valid; otherwise, initiating the declaration fails with the error code INVALID_TAX_ACCOUNTING_BASIS (see Error codes). For valid auditFileCountry versus taxAccountingBasis combinations, see Appendix 7: Audit File Country vs Tax Accounting Basis. |
| auditFileCountry | AuditFileCountryCode |
Optional, but recommended. Identifies the country (as a 2-letter country code) in which this tax declaration is reported. Valid values: RO, BG. It is recommended to set this parameter explicitly. NOTE: The combination of input auditFileCountry and taxAccountingBasis must be valid; otherwise, initiating the declaration fails with the error code INVALID_TAX_ACCOUNTING_BASIS (see Error codes). For valid auditFileCountry versus taxAccountingBasis combinations, see Appendix 7: Audit File Country vs Tax Accounting Basis. If auditFileCountry is not supplied, the value will be inferred from the country of the reporting organization, according to the rules in Appendix 8: Rules for inferring Audit File Country. |
| softwareCompanyName | String |
Optional. If provided, this value populates the <nsSAFT:SoftwareCompanyName> field in the header of the generated XML declaration. Otherwise, the default value is BIT Software SA. |
| softwareID | String |
Optional. If provided, this value populates the <nsSAFT:SoftwareID> field in the header of the generated XML declaration. Otherwise, the default value is Socrate Business Services. |
| softwareVersion | String |
Optional. If provided, this value populates the <nsSAFT:SoftwareVersion> field in the header of the generated XML declaration. Otherwise, the default value is the current version of the Tax Declarations Service. |
Result
See the Declaration type.
KPI declarations are not available on the LIMITED plan. If your tenant is on that plan and you set declarationType to KPI, the mutation fails with the error code PLAN_FEATURE_NOT_AVAILABLE, whatever else the input contains, and creates no declaration. See Service plans.
Example
The following mutation initiates a tax declaration, where:
- The declaration type is SAFT
- The declaration is for a monthly period (M)
- The declaration’s reporting period is 2025-01-01 through 2025-01-31.
- The audit file country is BG (Bulgaria)
- The region code is BG01 (Благоевград)
- The company’s tax accounting basis is A.
mutation initDecl($input: InitiateDeclarationInput) {
initiateDeclaration(input:$input) {
id
organization { id, tin, name }
representative { id, firstName, lastName }
declarationType
headerComment
taxAccountingBasis
from
to
files { id, fileType }
processes { id, status }
createdAt
}
}
{
"input": {
"declarationType": "SAFT",
"from": "2025-01-01",
"to": "2025-01-31",
"organizationId": "YOUR_ORGANIZATION_ID",
"representativeId": "YOUR_REPRESENTATIVE_ID",
"regionCode": "BG01",
"headerComment": "M",
"taxAccountingBasis": "A",
"auditFileCountry": "BG"
}
}
killProcess
Stops a declaration computation process if it is running.
Arguments
| Attribute | Type | Description |
|---|---|---|
| declarationId | ID! |
Mandatory. The identifier of the declaration. |
| processId | ID! |
Mandatory. The identifier of the process to be stopped. |
Result
See the Process type.
Example
The following mutation stops a running process.
mutation killProcess($declarationId:ID!, $processId:ID!) {
killProcess(declarationId:$declarationId, processId:$processId) {
id
status
errorMessages
result {
id
downloadUrl
createdAt
}
createdAt
}
}
{
"declarationId": "YOUR_DECLARATION_ID",
"processId": "YOUR_PROCESS_ID"
}
prepareFile
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. For Romanian D406 declarations, upload every mandatory file type, and only file types that the declaration’s headerComment permits; see Appendix 10: Input file types by declaration type (Romania).
Arguments
| Attribute | Type | Description |
|---|---|---|
| input | PrepareFileInput |
Mandatory. Supplies the input to the mutation. |
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. |
| name | String |
Optional. Supplies the name of the CSV file. |
Result
See the File type.
Example
The following mutation generates the upload URL for a file of type “BusinessPartners”. The upload URL is set to expire after 300 seconds.
mutation prepareFile($input:PrepareFileInput!) {
prepareFile(input:$input) {
id
declarationId
fileType
name
uploadUrl(expiresIn:300)
createdAt
}
}
{
"input": {
"declarationId": "YOUR_DECLARATION_ID",
"fileType": "BusinessPartners"
}
}
updateDeclaration
Update certain declaration parameters.
Arguments
| Attribute | Type | Description |
|---|---|---|
| id | ID! |
Mandatory. The identifier of the declaration to be updated. |
| input | UpdateDeclarationInput |
Provides the input to the mutation, as UpdateDeclarationInput object. |
UpdateDeclarationInput input
| Attribute | Type | Description |
|---|---|---|
| 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. |
| representativeId | ID! |
Mandatory. The identifier of the representative previously created through the createRepresentative mutation. |
| regionCode | RegionCode! |
Mandatory. Identifies the region/county/province within the tax authority. For Romanian county codes, see Appendix 4: List of county codes (Romania). For Bulgarian county codes, see Appendix 5: List of county codes (Bulgaria). NOTE: The region code should belong to the country of the reporting organization (or to the auditFileCountry, if this argument was provided as input). |
| 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. NOTE: For Romanian D406 declarations, changing the headerComment after input files have been uploaded can leave the declaration with a file whose type is not permitted for the new declaration type. generateDeclaration then rejects the declaration, so remove such files with deleteFile first. See Appendix 10: Input file types by declaration type (Romania). |
| taxAccountingBasis | TaxAccountingBasis |
Optional. Specifies the tax accounting basis to be used for this declaration. If this argument is not provided, the tax accounting basis of the organization identified by organizationId will be used. If this argument is provided, it takes precedence over the tax accounting basis defined at organization level. For valid values, see Appendix 6: Tax Accounting Basis. |
| auditFileCountry | AuditFileCountryCode |
Optional, but recommended. Identifies the country (as a 2-letter country code) in which this tax declaration is reported. Valid values: RO, BG. It is recommended to set this parameter explicitly. Note that the combination of input auditFileCountry and taxAccountingBasis must be valid; otherwise, updating the declaration fails with the error code INVALID_TAX_ACCOUNTING_BASIS (see Error codes). For valid auditFileCountry versus taxAccountingBasis combinations, see Appendix 7: Audit File Country vs Tax Accounting Basis. If auditFileCountry is not supplied, the value will be inferred from the country of the reporting organization, according to the rules in Appendix 8: Rules for inferring Audit File Country. |
Result
See the Declaration type.
Example
The following mutation updates the tax accounting basis of an existing declaration to A.
mutation updateDecl($id:ID!,$input:UpdateDeclarationInput) {
updateDeclaration(id:$id,input:$input) {
id
organization { id name tin }
representative { id firstName lastName phone email }
headerComment
declarationType
taxAccountingBasis
auditFileCountry
from
to
regionCode
files { id fileType }
processes { id status }
createdAt
}
}
{
"id": "YOUR_DECLARATION_ID",
"input": {
"taxAccountingBasis": "A"
}
}
updateRepresentative
Updates a previously created representative.
Arguments
| Attribute | Type | Description |
|---|---|---|
| id | ID! |
The identifier of the representative to be updated. |
| input | UpdateRepresentativeInput! |
Provides the input to the mutation, as UpdateRepresentativeInput object. |
UpdateRepresentativeInput input
| Attribute | Type | Description |
|---|---|---|
| firstName | String |
Optional. The first name of the representative. |
| lastName | String |
Optional. The last name of the representative. |
| phone | String |
Optional. The phone number of the representative. |
EmailAddress |
Optional. The representative’s email address. | |
| otherTitles | String |
Optional. The representative’s job title. Required for Bulgarian SAF-T. |
Result
See the Representative type.
Example
The following mutation updates a representative’s details.
mutation updateRepresentative($id:ID!, $input:UpdateRepresentativeInput!) {
updateRepresentative(id:$id, input: $input) {
id
firstName
lastName
email
phone
otherTitles
}
}
{
"id": "REPRESENTATIVE_ID",
"input": {
"firstName": "John",
"lastName": "Doe",
"phone": "999-999-999",
"email": "john.doe@example.org",
"otherTitles": "Accounting Manager"
}
}
Error codes
See Conventions for the error format and the codes shared across all services. This service can also return the codes listed below, grouped by the object they concern. The Returned by column names the operations and fields that report each code.
Declarations
| Code | Meaning | Returned by |
|---|---|---|
DECLARATION_NOT_FOUND |
No declaration exists for the identifier supplied. | declaration, roD406AnalysisData, roKPIAnalysisData, updateDeclaration, deleteFile, generateDeclaration, deleteProcess, killProcess, deleteDeclaration, analysisDataViewerUrl field of the Process type |
DECLARATION_READ_FAILED |
The declaration could not be retrieved. | declaration, roD406AnalysisData, roKPIAnalysisData, updateDeclaration, deleteFile, generateDeclaration, deleteProcess, killProcess, deleteDeclaration, analysisDataViewerUrl field of the Process type |
DECLARATION_LIST_FAILED |
The list of declarations could not be retrieved. | declarations, deleteRepresentative |
DECLARATION_UPDATE_FAILED |
The declaration could not be saved. | updateDeclaration |
DECLARATION_ORGANIZATION_MISMATCH |
The declaration was filed for an organization other than the one identified by organizationId. |
roD406AnalysisData, roKPIAnalysisData |
DECLARATION_INPUT_REQUIRED |
The mutation was called without an input object. |
initiateDeclaration |
PLAN_FEATURE_NOT_AVAILABLE |
KPI declarations are not available on the tenant’s service plan. See Service plans. | initiateDeclaration, generateDeclaration |
roD406AnalysisData, roKPIAnalysisData, and updateDeclaration also return DECLARATION_NOT_FOUND when the declaration belongs to a different application.
Declaration parameters
| Code | Meaning | Returned by |
|---|---|---|
AUDIT_FILE_COUNTRY_NOT_INFERRED |
auditFileCountry is not set and cannot be inferred from the organization. See Appendix 8: Rules for inferring Audit File Country. |
initiateDeclaration, updateDeclaration |
INVALID_AUDIT_FILE_COUNTRY |
The audit file country is neither RO nor BG. | initiateDeclaration, updateDeclaration |
KPI_DECLARATION_COUNTRY_NOT_SUPPORTED |
A KPI declaration was requested for a country other than Romania. KPI declarations are produced for Romania only. | initiateDeclaration, updateDeclaration |
HEADER_COMMENT_REQUIRED |
A declaration other than KPI was submitted without headerComment. |
initiateDeclaration |
INVALID_HEADER_COMMENT |
headerComment is not one the audit file country accepts. |
initiateDeclaration, updateDeclaration |
REGION_CODE_REQUIRED |
A Romanian declaration was submitted without regionCode. |
initiateDeclaration |
INVALID_REGION_CODE |
regionCode is not one the audit file country accepts. See Appendix 4: List of county codes (Romania) and Appendix 5: List of region codes (Bulgaria). |
initiateDeclaration, updateDeclaration |
INVALID_ORGANIZATION_COUNTRY |
The country that regionCode is validated against is neither RO nor BG. |
initiateDeclaration, updateDeclaration |
TAX_ACCOUNTING_BASIS_NOT_INFERRED |
taxAccountingBasis is not set and cannot be inferred from the organization. |
initiateDeclaration, updateDeclaration |
INVALID_TAX_ACCOUNTING_BASIS |
The tax accounting basis is not one the audit file country accepts. See Appendix 7: Audit File Countries vs Tax Accounting Basis. | initiateDeclaration, updateDeclaration |
Representatives
| Code | Meaning | Returned by |
|---|---|---|
REPRESENTATIVE_NOT_FOUND |
No representative exists for the identifier supplied. | initiateDeclaration, deleteRepresentative, representative field of the Declaration type |
REPRESENTATIVE_READ_FAILED |
The representative could not be retrieved. | initiateDeclaration, deleteRepresentative, representative field of the Declaration type |
REPRESENTATIVE_LIST_FAILED |
The list of representatives could not be retrieved. | representatives |
REPRESENTATIVE_FIRST_NAME_REQUIRED |
The representative was submitted without a first name. | createRepresentative |
REPRESENTATIVE_LAST_NAME_REQUIRED |
The representative was submitted without a last name. | createRepresentative |
REPRESENTATIVE_UPDATE_FAILED |
The representative could not be saved, or no representative exists for the identifier supplied. | updateRepresentative |
REPRESENTATIVE_IN_USE |
The representative is still referenced by at least one declaration. | deleteRepresentative |
Organizations
| Code | Meaning | Returned by |
|---|---|---|
ORGANIZATION_NOT_FOUND |
No organization exists for the identifier supplied or recorded on the declaration. | initiateDeclaration, updateDeclaration, generateDeclaration |
ORGANIZATION_LOOKUP_FAILED |
The list of organizations could not be retrieved. | organizations, roD406AnalysisData, roKPIAnalysisData, initiateDeclaration, updateDeclaration, generateDeclaration, organization field of the Declaration type, analysisDataViewerUrl field of the Process type |
ORGANIZATION_ADDRESS_REQUIRED |
The organization has no address. | generateDeclaration |
ORGANIZATION_ADDRESS_COUNTRY_REQUIRED |
An address of the organization has no country. | generateDeclaration |
Processes
| Code | Meaning | Returned by |
|---|---|---|
PROCESS_NOT_FOUND |
No process exists for the identifier supplied. | roD406AnalysisData, roKPIAnalysisData, deleteProcess, killProcess, deleteDeclaration, processes field of the Declaration type |
PROCESS_READ_FAILED |
The process could not be retrieved. | roD406AnalysisData, roKPIAnalysisData, deleteProcess, killProcess, deleteDeclaration |
PROCESS_DECLARATION_MISMATCH |
The process belongs to a different declaration than the one identified by declarationId. |
roD406AnalysisData, roKPIAnalysisData, deleteProcess, killProcess |
PROCESS_RUNNING |
The process is still running. Stop it with killProcess before you delete it. |
deleteProcess |
PROCESS_ALREADY_COMPLETED |
The process has already produced result files, so it can no longer be stopped. | deleteProcess, killProcess, deleteDeclaration |
PROCESS_UPDATE_FAILED |
The process could not be saved. | deleteProcess, killProcess, deleteDeclaration |
PROCESS_START_FAILED |
The computation could not be started. | generateDeclaration |
PROCESS_ID_MISSING |
The process has no identifier, so its result files cannot be listed. | result field of the Process type |
roD406AnalysisData and roKPIAnalysisData also return PROCESS_NOT_FOUND when the process belongs to a different application.
Files
| Code | Meaning | Returned by |
|---|---|---|
FILE_NOT_FOUND |
No file with the identifier supplied is attached to the declaration. | deleteFile |
INVALID_FILE_TYPES_FOR_DECLARATION_TYPE |
The uploaded input file types do not match the declaration type: a mandatory file type is missing, or a file type is not accepted. See Appendix 10: Input file types by declaration type (Romania). | generateDeclaration |
UPLOAD_URL_UNAVAILABLE |
No upload URL could be generated for the file. | uploadUrl field of the File type |
DOWNLOAD_URL_UNAVAILABLE |
No download URL could be generated for the file. | downloadUrl field of the File and ResultFile types |
FILE_ID_MISSING |
The file has no identifier, so no URL can be generated for it. | uploadUrl field of the File type, downloadUrl field of the File and ResultFile types |
Access
| Code | Meaning | Returned by |
|---|---|---|
ACCESS_TOKEN_UNAVAILABLE |
The service could not authorize a request it makes to another SBS service on your behalf. | organizations, roD406AnalysisData, roKPIAnalysisData, initiateDeclaration, updateDeclaration, prepareFile, deleteFile, generateDeclaration, deleteProcess, killProcess, deleteDeclaration, files field of the Declaration type, result and analysisDataViewerUrl fields of the Process type, supplierInvoiceMatchesUrl field of the ROD406AnalysisData type, uploadUrl and downloadUrl fields of the File type, downloadUrl field of the ResultFile type |
Webhooks
The Tax Declarations Service supports webhooks. This means you can optionally configure SBS to send an HTTP POST request to an external server or application whenever any of the following events occur:
- COMPUTATION_SUCCESS - fires whenever a tax declaration was generated successfully.
- COMPUTATION_ERROR - fires whenever a tax declaration was generated with errors.
The POST request of the COMPUTATION_SUCCESS event has the following payload:
{
"service": "tax-declarations-api",
"event": "COMPUTATION_SUCCESS",
"tenantId": "<your-tenant-id>",
"payload": {
"declarationId": "<your-declaration-id>",
"processId": "<your-process-id>"
},
"customKey1": "Custom value 1",
"customKey2": "Custom value 2"
}
The POST request of the COMPUTATION_ERROR event has the following payload:
{
"service": "tax-declarations-api",
"event": "COMPUTATION_ERROR",
"tenantId": "<your-tenant-id>",
"payload": {
"declarationId": "<your-declaration-id>",
"processId": "<your-process-id>"
},
"customKey1": "Custom value 1",
"customKey2": "Custom value 2"
}
Note that the customKey1 and customValue1 will be present in the request body only if you configured them when creating the webhook. You may configure as many key-value pairs as required.
For information about configuring webhooks, see Webhooks.
AI agent access (MCP)
The service serves its queries as tools to AI agent clients over the Model Context Protocol (MCP), a JSON-RPC 2.0 protocol through which a client reads a catalog of tools and calls them by name. Agent clients such as Claude Code connect to https://tax-declarations-api.socrate.io/mcp.
Access
The MCP endpoint is on the same host as the GraphQL endpoint and accepts the same credentials:
- A tenant-level service access key, in the
x-api-keyheader. - A service access token, in the
Authorizationheader asBearer YOUR_SERVICE_ACCESS_TOKEN.
The endpoint speaks protocol revision 2026-07-28 and accepts protocol requests as POST only. It is stateless: every request carries its own credentials, and there is no handshake or session to open first. Your agent client must support revision 2026-07-28.
For connection instructions, open https://tax-declarations-api.socrate.io/mcp in a browser. The page needs no credential.
Tools
The catalog holds one tool per query of this service:
| Tool | Required arguments | include values |
|---|---|---|
version |
— | — |
organizations |
— | — |
representatives |
— | — |
declarations |
— | See Declaration include values |
declaration |
id |
See Declaration include values |
roD406AnalysisData |
organizationId, declarationId, and processId |
See D406 analysis include values |
roKPIAnalysisData |
organizationId, declarationId, and processId |
— |
supplierProductMappings |
organizationId |
— |
The optional arguments of each query (filter, limit, nextToken) are optional arguments of its tool. The tools cover the service’s queries only. To create or change data, use the service’s mutations.
The catalog a caller receives lists only the tools whose query the scope of its key or token allows. If a service access denial blocks a query, your agent does not see a tool for it. A tool call runs the query under the caller’s own credentials and returns the data that the equivalent GraphQL query returns for that caller. Every tool is marked read-only (readOnlyHint is true), and answers from SBS alone, without calling a tax authority or any other system outside SBS (openWorldHint is false).
Reading the analysis of a process
To read the analysis data that a process computed:
- Call
declarationsto find the declaration. - Call
declarationwith the declaration’sidandinclude: ["processes"]to list its processes. - Call
roD406AnalysisDatawith the organization’sid, the declaration’sid, and the process’sid. For a declaration of type KPI, callroKPIAnalysisDatawith the same arguments. The analysis is available once the process status is DONE.
Optional result fields
By default, a tool returns compact records. You request the remaining fields by naming their paths in the tool’s optional include argument:
- Declarations. Without
include,declarationsanddeclarationreturn each declaration’s own fields, such asid,declarationType,from, andto, together with itsorganizationandrepresentative. The declaration’s files and processes, the error messages, the number of input-validation findings, the result files, and the monthly KPI data of a process, file download URLs, supplier invoice matches URLs, and analysis viewer URLs are returned only when named. - D406 analysis. Without
include,roD406AnalysisDatareturns the period, the currency, the profitability, liquidity, activity, tax, and asset analyses, and the totals of the standard and system balance sheets. To receive the classes of both balance sheets, the validations, and the tax code centralizer as well, namestandardBalanceSheet.classes,systemBalanceSheet.classes,validations, andtaxCodeCentralizer. - Supplier product mappings.
supplierProductMappingsreturns its page ofitemsand itsnextTokenby default.
A path is a sequence of field names separated by dots. Naming a path returns that field with its default content, for every item of each list the path passes through. Naming a path inside an optional field returns only that inner field: include: ["processes.analysisDataViewerUrl"] returns each process’s analysisDataViewerUrl without its id or status. To receive the processes together with their viewer URLs, name both paths: include: ["processes", "processes.analysisDataViewerUrl"].
No tool returns file upload URLs.
Declaration include values
The declarations and declaration tools accept these values:
| Value | Returns |
|---|---|
files |
The declaration’s input files |
files.downloadUrl |
The download URL of each input file |
processes |
The declaration’s processes |
processes.errorMessages |
The error messages of each process |
processes.result |
The result files of each process |
processes.result.downloadUrl |
The download URL of each result file |
processes.roD406AnalysisData.supplierInvoiceMatchesUrl |
The download URL of the supplier invoice matches of each process |
processes.roKPIAnalysisData |
The monthly KPI analysis data of each process |
processes.analysisDataViewerUrl |
The analysis viewer URL of each process |
processes.errors |
The number of input-validation findings of each process (totalCount) and the token for the next page (nextToken) |
D406 analysis include values
The roD406AnalysisData tool accepts these values:
| Value | Returns |
|---|---|
standardBalanceSheet.classes |
The classes of the standard balance sheet |
systemBalanceSheet.classes |
The classes of the system balance sheet |
validations |
The results of the consistency tests |
supplierInvoiceMatchesUrl |
The download URL of the supplier invoice matches |
taxCodeCentralizer |
The tax code centralizer, with its per-source metrics |
Large results
When a declarations result exceeds the size limit of a tool result, the tool leaves out whole declarations and states that it did so. To receive every declaration, narrow the list with the filter argument, by organizationId or id.
The balance sheet classes that a tool returns carry their totals but not their accounts. To read the accounts of each class, use the roD406AnalysisData GraphQL query, or open the process in the viewer whose URL processes.analysisDataViewerUrl returns.
Documentation resources
Besides its tools, the endpoint publishes, as addresses, this page and the API conventions page.
Connecting an agent client
To add the endpoint to Claude Code, run:
claude mcp add --transport http tax-declarations https://tax-declarations-api.socrate.io/mcp --header "x-api-key: YOUR_ACCESS_KEY"
Other agent clients take the same URL and header in their own configuration.
Example
An agent client builds the protocol requests for you. To call a tool directly over HTTP, send a POST request that names the protocol revision both in the MCP-Protocol-Version header and in the request’s _meta, the method in the Mcp-Method header, and, for a tool call, the tool in the Mcp-Name header:
POST /mcp HTTP/1.1
Host: tax-declarations-api.socrate.io
Content-Type: application/json
Accept: application/json
x-api-key: YOUR_ACCESS_KEY
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: declaration
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
},
"name": "declaration",
"arguments": {
"id": "YOUR_DECLARATION_ID",
"include": ["processes", "processes.analysisDataViewerUrl"]
}
}
}
The declaration is returned in structuredContent, and as the same JSON text in content. The response below is shortened to one process and to a few fields of each object:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resultType": "complete",
"content": [
{ "type": "text", "text": "{\"id\":\"YOUR_DECLARATION_ID\", ...}" }
],
"structuredContent": {
"id": "YOUR_DECLARATION_ID",
"organization": {
"id": "YOUR_ORGANIZATION_ID",
"name": "Contoso SRL"
},
"representative": {
"id": "YOUR_REPRESENTATIVE_ID",
"firstName": "Jane",
"lastName": "Doe"
},
"headerComment": "L",
"declarationType": "D406",
"taxAccountingBasis": "A",
"auditFileCountry": "RO",
"from": "2026-08-01",
"to": "2026-08-31",
"processes": [
{
"id": "YOUR_PROCESS_ID",
"status": "DONE",
"totalSegmentsInSequence": 1,
"createdAt": "2026-09-10T08:14:22.512Z",
"analysisDataViewerUrl": "YOUR_VIEWER_URL"
}
],
"createdAt": "2026-09-10T08:02:47.106Z"
}
}
}
Appendices
Appendix 1: Input CSV files (Romania Tax Residents)
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.
GeneralLedgerAccounts.csv
| Column | Format | Mandatory? | Description |
|---|---|---|---|
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| AccountDescription | SAFlongtextType | Yes | Name of the individual general ledger account. |
| StandardAccountID | SAFmiddle1textType | No | The general ledger code 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. |
| 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. |
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. The maximum allowed length is 256 characters. | |
| 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. For physical persons having Romanian citizenship, this is the Romanian personal numeric code (in Romanian, CNP). For foreign citizens residing in Romania, this is the fiscal identification number assigned by ANAF (in Romanian, NIF - Număr de identificare fiscală). For non-residents, this is the fiscal identification number of the person in their home country. Furthermore, to indicate that a business partner is an embassy, populate this value with the fiscal identification number (in Romanian, NIF - număr de identificare fiscală) of the embassy, prefixed by the 2-digit foreign country code. For example, US9000111111111. |
| 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-1 alpha-2 country code. For example, RO - Romania. |
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| 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 (YYYY-MM-DD). |
| GLPostingDate | Date | Yes | Date of posting to GL. This field is validated according to ISO 8601 (YYYY-MM-DD). |
| CustomerID | SAFmiddle1textType | No | Identifies the customer company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. This field is mutually exclusive with CustomerID. If the value is empty in both fields, the customer is assumed to be the reporting organization (this is useful for reporting self-billing invoices to own organization). |
| SupplierID | SAFmiddle1textType | No | Identifies the supplier company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. This field is mutually exclusive with SupplierID. If the value is empty in both fields, the supplier is assumed to be the reporting organization (this is useful for reporting self-billing invoices to own organization). |
| SystemID | SAFshorttextType | Yes | 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 used by the reporting company in their ERP. |
| 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
If the reporting organization needs to report self-billing invoices (autofactura) to itself, use either of the following ses, set InvoiceType to 389.
Option 1 — Set the customer to the company’s own Tax Registration Number (TIN):
- Set
CustomerIDto the reporting company’s own TIN, and leaveSupplierIDempty. A leadingROprefix is optional and ignored when matching, so bothRO12345678and12345678are accepted. - This form is recognized only when
InvoiceTypeis 389. ACustomerIDequal to the company TIN on any other invoice type is still rejected, because the TIN does not correspond to a business partner of type C.
Option 2 — Leave the customer and supplier empty:
- Set both
CustomerIDandSupplierIDto an empty value. When both values are empty, the system considers the reporting organization to be the customer (or supplier, depending on the case). - Set
SelfBillingIndicatorto 389. - For all movements having the same
TransactionIDin the GeneralLedgerEntries.csv file, ensure that bothCustomerIDandSupplierIDalso have an empty value.
| Column | Format | Mandatory? | Description |
|---|---|---|---|
| InvoiceNo | SAFmiddle2textType | Yes | The invoice number. |
| CustomerID | No | The ID of the customer on the invoice. To be filled only for sales invoices. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. This field is mutually exclusive with SupplierID. If the value is empty in both fields, the customer is assumed to be the reporting organization (this is useful for reporting self-billing invoices to own organization). Alternatively, for a self-billing invoice (InvoiceType 389), set this value to the reporting company’s own Tax Registration Number; see the note above this table. |
|
| SupplierID | No | The ID of the supplier on the invoice. To be filled only for purchase invoices. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. This field is mutually exclusive with CustomerID. If the value is empty in both fields, the supplier is assumed to be the reporting organization (this is useful for reporting self-billing invoices to own organization). |
|
| AccountID | Yes | The general ledger code used by the reporting company in their ERP. | |
| 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 | Yes | 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 used by the reporting company in their ERP. |
| 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. The maximum allowed length is 256 characters. If any CSV row exceeds 256 characters, the value will be truncated to 256 characters only in the SAF-T XML file. |
| 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 | Yes | 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 used by the reporting company in their ERP. |
| 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
If provided as input to the tax declaration, a PhysicalStock.csv file must contain at least one record. A file that carries only its header row still passes generation, but the resulting XML has an empty stock section, which ANAF rejects.
| 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 used by the reporting company in their ERP. |
| 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 used by the reporting company in their ERP. |
| 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 (YYYY-MM-DD). |
| StartUpDate | Date | Yes | Commissioning date of the asset. Validated according to ISO 8601 standard (YYYY-MM-DD). |
| 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). |
| AssetID | SAFmiddle1textType | Yes | The unique identifier of the asset. |
Appendix 2: Input CSV files (Romania Non-Residents)
To submit a non-residents tax declaration for Romanian tax authorities, the input parameters must be set as follows:
auditFileCountryshould be ROtaxAccountingBasisshould be I.headerCommentshould be NL or NT.
For such declarations, GeneralLedgerAccounts is the only mandatory input CSV file type. BusinessPartners, Invoices, and Payments are optional, and the remaining file types are not permitted. For the complete rules, see Appendix 10: Input file types by declaration type (Romania).
The files may be empty (i.e., contain only the header) if no business activity took place within the reported period.
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.
GeneralLedgerAccounts.csv
| Column | Format | Mandatory? | Description |
|---|---|---|---|
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| AccountDescription | SAFlongtextType | Yes | Name of the individual general ledger account. |
| StandardAccountID | SAFmiddle1textType | No | The general ledger code 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. |
| 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. |
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-1 alpha-2 country code. For example, RO - Romania. |
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| 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. |
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 used by the reporting company in their ERP. | |
| 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 | Yes | 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 used by the reporting company in their ERP. |
| 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. |
Appendix 3: Input CSV files (Bulgaria Tax Residents)
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);
GeneralLedgerAccounts.csv (BG)
| Column | Format | Mandatory? | Description |
|---|---|---|---|
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| AccountDescription | SAFlongtextType | Yes | Name of the individual general ledger account. |
| StandardAccountID | SAFmiddle1textType | No | The general ledger code based on the standard defined by the Bulgarian National Revenue Agency. This value is validated against codes present in the SAF-T Schema. |
| AccountType | SAFshorttextType | Yes | Identifies the account type. Valid values: Active, Passive, 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. |
BusinessPartners.csv (BG)
| 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. The maximum allowed length is 70 characters. | |
| 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 Bulgarian National Revenue Agency (НАП). |
| 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 | No | Identifies the region code. For example, BG-04 - Велико Търново. See Appendix 5: List of region codes (Bulgaria). |
| Country | ISOCountryCode | Yes | ISO 3166-1 alpha-2 country code. For example, BG - Bulgaria. |
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| 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. |
| RelatedParty | SAFcodeType | No | Determines whether the company is a related party. Valid values: Y, N. |
| RelatedPartyStartDate | Date | No | Date (YYYY-MM-DD) starting from which the company is a related party. |
| RelatedPartyEndDate | Date | No | Date (YYYY-MM-DD) up to which the company is a related party. |
| SelfBillingIndicator | SAFcodeType | No | An indicator showing whether there is a self-billing agreement between the customer and the supplier. Valid values: Y, N. |
GeneralLedgerEntries.csv (BG)
| 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 (YYYY-MM-DD). |
| GLPostingDate | Date | Yes | Date of posting to GL. This field is validated according to ISO 8601 (YYYY-MM-DD). |
| CustomerID | SAFmiddle1textType | No | Identifies the customer company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. |
| SupplierID | SAFmiddle1textType | No | Identifies the supplier company/organization. Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. |
| SystemID | SAFshorttextType | Yes | 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 used by the reporting company in their ERP. |
| 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 SAF-T Schema. |
| TaxCode | SAFcodeType | Yes | For the list of valid values, consult the SAF-T Schema. |
| 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 (BG)
| 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 used by the reporting company in their ERP. | |
| InvoiceDate | Date | Yes | Date of the invoice. Validated according to ISO 8601 (YYYY-MM-DD). |
| InvoiceType | SAFcodeType | Yes | Specifies the type of the invoice. For the list of valid values, consult the Nom_Invoice_Types sheet of the SAF-T Schema. |
| SelfBillingIndicator | SAFcodeType | No | Indicator showing if the invoice is a self-billed invoice. Valid values: Y - Self-billed invoice, N - Not a self-billed invoice. |
| SystemID | SAFmiddle1textType | Yes | Unique number created by the system for the document. |
| TransactionID | SAFmiddle2textType | Yes | Cross-reference to GL posting (from the GeneralLedgerEntries.csv file). |
| 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 used by the reporting company in their ERP. |
| 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 | For valid values, see the NC8_TARIC 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), Average cost, Standard cost. |
| UOMBase | SAFcodeType | Yes | The unit of measure to manage stock for this product. For valid values, see the Unit of Measure 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 („ . ”). |
| 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 SAF-T Schema. |
| TaxCode | SAFcodeType | Yes | For the list of valid values, consult the SAF-T Schema. |
| 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 (BG)
| 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 | Yes | 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). Valid values: 01 - for cash (за пари в брой), 02 - for offset (за прихващане), 03 - for non-cash payment (за безкасово). | |
| Description | SAFlongtextType | Yes | Description of the payment. |
| SystemID | SAFmiddle1textType | Yes | 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 used by the reporting company in their ERP. |
| 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 SAF-T Schema. |
| TaxCode | SAFcodeType | Yes | For the list of valid values, consult the SAF-T Schema. |
| 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 (BG)
| 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_TARIC 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_TARIC 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), Average cost, Standard cost. |
| UOMBase | SAFcodeType | Yes | The unit of measure used to manage product stocks. For valid values, see 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 (BG)
| 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: 10 - purchase, 30 - sales, etc. Validated according to the Stock movement 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 used by the reporting company in their ERP. |
| 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_TARIC 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), Average cost, Standard cost. |
| UOMBase | SAFcodeType | Yes | The unit of measure used. For valid values, see the SAF-T Schema. |
| Quantity | SAFquantityType | Yes | The quantity of goods. |
| BookValue | SAFmonetaryType | Yes | 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. To be populated according to your ERP. |
Assets.csv (BG)
| Column | Format | Mandatory? | Description |
|---|---|---|---|
| AssetID | SAFmiddle1textType | Yes | The unique identifier of the asset. |
| AccountID | SAFmiddle2textType | Yes | The general ledger code used by the reporting company in their ERP. |
| 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 (YYYY-MM-DD). |
| StartUpDate | Date | Yes | Commissioning date of the asset. Validated according to ISO 8601 standard (YYYY-MM-DD). |
| SupplierID | SAFmiddle1textType | Yes | Set this value to the Id of the relevant business partner reported in BusinessPartners.csv. |
| AssetValuationType | SAFshorttextType | No | Not required. |
| 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 (BG)
| Column | Format | Mandatory? | Description |
|---|---|---|---|
| AssetTransactionID | SAFmiddle2textType | Yes | The unique identifier of the transaction. |
| AssetTransactionType | SAFcodeType | Yes | The transaction type. Validated according to 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). |
| AssetID | SAFmiddle1textType | Yes | The unique identifier of the asset. |
Appendix 4: List of county codes (Romania)
| 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 |
Appendix 5: List of region codes (Bulgaria)
The Bulgarian region codes may appear in the following contexts, using the following formats:
- XML Region Code - The region code in the generated XML output file.
- GraphQL Region Code - The enum value to be provided as input to the
initiateDeclarationmutation in SBS.
| XML Region Code | GraphQL Region Code | Region Name |
|---|---|---|
| BG-01 | BG01 | Благоевград |
| BG-02 | BG02 | Бургас |
| BG-08 | BG08 | Добрич |
| BG-07 | BG07 | Габрово |
| BG-26 | BG26 | Хасково |
| BG-09 | BG09 | Кърджали |
| BG-10 | BG10 | Кюстендил |
| BG-11 | BG11 | Ловеч |
| BG-12 | BG12 | Монтана |
| BG-13 | BG13 | Пазарджик |
| BG-14 | BG14 | Перник |
| BG-15 | BG15 | Плевен |
| BG-16 | BG16 | Пловдив |
| BG-17 | BG17 | Разград |
| BG-18 | BG18 | Русе |
| BG-27 | BG27 | Шумен |
| BG-19 | BG19 | Силистра |
| BG-20 | BG20 | Сливен |
| BG-21 | BG21 | Смолян |
| BG-23 | BG23 | Софийска област |
| BG-22 | BG22 | София |
| BG-24 | BG24 | Стара Загора |
| BG-25 | BG25 | Търговище |
| BG-03 | BG03 | Варна |
| BG-04 | BG04 | Велико Търново |
| BG-05 | BG05 | Видин |
| BG-06 | BG06 | Враца |
| BG-28 | BG28 | Ямбол |
Appendix 6: Tax Accounting Basis
| Code | Description | Valid for |
|---|---|---|
| A | Accounting for general commercial companies which apply double-entry bookkeeping and the general business chart of accounts. | RO, BG |
| BANK | Credit institutions and non-bank financial institutions that apply apply double-entry bookkeeping and chart of accounts for banks and financial-monetary institutions. | BG |
| I | Invoice Accounting (Non-Residents). | RO |
| IFN | Non-banking financial institutions in Romania that use the account plan according to the BNR Regulation no. 17/2015. | RO |
| IFRS | General commercial companies that apply double-entry taxability at the same time as the provisions of OMFP 2844/2016 (IFRS chart of accounts). | RO |
| INSURANCE | Insurance companies applying applies double entry taxation and chart of accounts for insurance companies. | RO, BG |
| NORMA14 | Private pension companies which use the account plan according to the regulation no. 14/2015 of the Authority for Financial Supervision (ASF). | RO |
| NORMA36 | 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). | RO |
| NORMA39 | Leasing and financial companies which use the IFRS account plan according the Reg no. 39/2015 of the Authority for Financial Supervision (ASF). | RO |
| ONG | Companies without patrimonial purpose (non-government organizations) according to the OMFP no. 3103/2017. | RO |
| ONGE | Non-profit legal entities (NGOs) according to OMFP no. 3103/2017 - legal entities with a VAT code for economic activity. | RO |
| P | Public entities (public utilities, public transport, public health services, etc). | BG |
Appendix 7: Audit File Countries vs Tax Accounting Basis
| Audit File Country | Valid values for taxAccountingBasis |
Valid values for headerComment |
|---|---|---|
| RO | A, BANK, INSURANCE, I, IFN, IFRS, NORMA39, , NORMA36, NORMA14, ONG, ONGE | L, T, A, C, NL, NT |
| BG | A, BANK, INSURANCE, P | M, A, D |
| Any except RO and BG | none (the declaration will fail with an error) | - |
Appendix 8: Rules for inferring Audit File Country
| If the organization country is: | And the tax accounting basis is: | Then the inferred country is: |
|---|---|---|
| RO | A, I, IFRS, BANK, INSURANCE, NORMA39, IFN, NORMA36, NORMA14, ONG, ONGE | RO |
| BG | A, BANK, INSURANCE, P | BG |
| BG | I | RO |
| Any except RO and BG | I | RO |
Appendix 9: RO D406 KPI Definitions
The following table lists all KPI indicators computed for Romanian D406 declarations, grouped by category. Account code patterns use Romanian chart-of-accounts prefixes (e.g., 70* means all accounts starting with 70).
| KPI Code | Full Name (Romanian) | Full Name (English) | Formula / Definition |
|---|---|---|---|
CA |
Cifra de afaceri | Turnover / Revenue | Σ CreditAmount(70*) − Σ DebitAmount(709) |
VE |
Venituri din exploatare | Operating Revenue | Σ CreditAmount(70*..75*) − Σ DebitAmount(709) |
EAT |
Profit net | Net profit after tax | Σ CreditAmount(7*) − Σ DebitAmount(709) − Σ DebitAmount(6*) + Σ CreditAmount(609) |
EBT |
Profit brut | Gross profit before tax | EAT + Σ DebitAmount(69*) |
EBIT |
Profit din exploatare | Operating profit | EBT − Σ CreditAmount(76*) + Σ DebitAmount(66*) |
EBITDA |
Profit înainte de dobânzi, taxe, depreciere și amortizare | Earnings before interest, taxes, depreciation, and amortization | EBIT + Σ DebitAmount(68*) |
MB |
Marja brută % | Gross margin % | (EBIT / CA) × 100 |
RCT |
Rata cheltuieli totale % | Total expense ratio % | (Σ DebitAmount(6*) − Σ CreditAmount(609)) / (Σ CreditAmount(7*) − Σ DebitAmount(709)) × 100 |
MPN |
Marja profit net % | Net profit margin % | (EAT / CA) × 100 |
CT |
Cheltuieli totale | Total Costs and Expenses | Σ Debit (6*) - Σ Credit(609) |
CR |
Creanțe clienți | Accounts receivable | Net closing debit balance of customer receivable accounts (41*). |
DAT |
Datorii furnizori | Accounts payable | Net closing credit balance of supplier payable accounts (40*). |
CL |
Capital de lucru | Net Working Capital | CR − DAT |
NFC |
Nr. facturi clienți | Sales Invoice Count | The count of sales invoices. |
NFF |
Nr. facturi furnizori | Purchase Invoice Count | The count of purchase invoices. |
NPC |
Număr parteneri activi | Number of active business partners | The count of active business partners. |
RAC |
Viteza de rotație a activelor circulante | Current Asset Turnover | CA / [(Σ OpeningDebitBalance(3*) − Σ OpeningDebitBalance(39*) + Σ OpeningDebitBalance(41*) + Σ OpeningDebitBalance(46*) − Σ OpeningDebitBalance(49*) + Σ OpeningDebitBalance(5*) − Σ OpeningDebitBalance(59*) + Σ ClosingDebitBalance(3*) − Σ ClosingDebitBalance(39*) + Σ ClosingDebitBalance(41*) + Σ ClosingDebitBalance(46*) − Σ ClosingDebitBalance(49*) + Σ ClosingDebitBalance(5*) − Σ ClosingDebitBalance(59*)) / 2] |
RRC |
Viteza de rotație a debitelor clienților | Customer Receivables Turnover | CA / [(Σ OpeningDebitBalance(41*) − Σ OpeningCreditBalance(49*) + Σ ClosingDebitBalance(41*) − Σ ClosingCreditBalance(49*)) / 2] |
RRF |
Viteza de rotație a debitelor furnizorilor | Supplier Payables Turnover | CA / [(Σ OpeningDebitBalance(40*) + Σ ClosingDebitBalance(40*)) / 2] |
VMF |
Valoare medie factură vânzare | Avg. Sales Invoice Value | Σ(Sales NetTotal) / NFC |
TVAC |
TVA colectat | Output VAT | Σ CreditAmount(4427*) |
TVAD |
TVA deductibil | Input VAT | Σ DebitAmount(4426*) |
TVAN |
TVA net | Net VAT position | TVAC − TVAD. Positive = VAT liability; negative = refundable position. |
Appendix 10: Input file types by declaration type (Romania)
For a Romanian D406 declaration, the headerComment you choose decides which of the nine input CSV file types you can upload through prepareFile. Each file type is either mandatory, optional, or not permitted for that declaration type:
- Mandatory — a file of this type must be uploaded, otherwise generation is rejected.
- Optional — a file of this type may be uploaded or omitted; neither is an error.
- Not permitted — this file type belongs to other declaration types. If you attach a file of this type, generation is rejected.
The following table lists the rules by headerComment.
Input file type (CsvFileType) |
L, T | A | C | NL, NT |
|---|---|---|---|---|
| Assets | Not permitted | Optional | Not permitted | Not permitted |
| AssetTransactions | Not permitted | Optional | Not permitted | Not permitted |
| BusinessPartners | Optional | Optional | Optional | Optional |
| GeneralLedgerAccounts | Mandatory | Mandatory | Mandatory | Mandatory |
| GeneralLedgerEntries | Optional | Not permitted | Not permitted | Not permitted |
| Invoices | Optional | Not permitted | Not permitted | Optional |
| MovementOfGoods | Not permitted | Not permitted | Optional | Not permitted |
| Payments | Optional | Not permitted | Not permitted | Optional |
| PhysicalStock | Not permitted | Not permitted | Mandatory | Not permitted |
GeneralLedgerAccounts is mandatory for every declaration type, and PhysicalStock is mandatory for on-request (C) declarations. If your ERP system produces no file for a section that saw no activity in the reported period, you can still generate the declaration; a file that you do upload may also contain only its header row, except for PhysicalStock on a C declaration, which must contain at least one record — otherwise ANAF rejects the generated XML.
For the structure of each file, see Appendix 1: Input CSV files (Romania Tax Residents) for resident declarations (L, T, A, C) and Appendix 2: Input CSV files (Romania Non-Residents) for non-resident declarations (NL, NT).
declarationType is KPI are out of scope.
Appendix 11: Validation rule codes
Each ProcessValidationError carries the code of the rule that produced it. A code has the form <FILE_TYPE>.<RULE>: the fileType of the finding, a period, and the rule in upper snake case. Most rules that check a single column use the column name followed by one of the suffixes below. The tables that follow list every code.
Codes are stable: a code keeps its meaning across releases, and a retired code is never reused. A rule that applies to both Romanian and Bulgarian declarations has one code; its message is in the language of the declaration. SBS can add new codes over time, so handle a code that you do not recognize as a generic finding.
| Suffix | Meaning |
|---|---|
_MISSING |
The value is absent, empty, or blank where the column is mandatory. |
_TOO_LONG |
The value exceeds the column’s maximum length. |
_NOT_NUMERIC |
The value is not a number where a number is required. |
_NOT_MONETARY |
The value is not a monetary amount. |
_NOT_A_DATE |
The value is not a date. |
_NOT_PERMITTED |
The value is outside the fixed set of values the column accepts. |
_UNKNOWN |
The value is not published by the nomenclature or the other input file that the column refers to. |
_PADDED |
The value carries leading or trailing whitespace. |
_MALFORMED |
The value does not have the shape the column requires, independently of any nomenclature. |
In the tables below, field is the value of the field attribute of the finding; a dash means that the rule checks a relationship between columns or files, and the finding has no field. The RO and BG columns show whether the rule applies to Romanian and to Bulgarian declarations.
Assets (ASSETS)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
ASSETS.ASSET_ID_MISSING |
AssetID |
The asset carries no identifier. | ✓ | ✓ |
ASSETS.ASSET_ID_TOO_LONG |
AssetID |
The asset identifier is longer than 35 characters. | ✓ | ✓ |
ASSETS.ACCOUNT_ID_MISSING |
AccountID |
The asset names no general ledger account. | ✓ | ✓ |
ASSETS.ACCOUNT_ID_UNKNOWN |
AccountID |
The account named is not published by the General Ledger Accounts file. | ✓ | ✓ |
ASSETS.DESCRIPTION_MISSING |
Description |
The asset carries no description. | ✓ | ✓ |
ASSETS.ASSET_VALUATION_TYPE_MISSING |
AssetValuationType |
The asset carries no valuation type. | ✓ | ✓ |
ASSETS.VALUATION_CLASS_MISSING |
ValuationClass |
The asset carries no valuation class. | ✓ | ✓ |
ASSETS.ACQUISITION_AND_PRODUCTION_COSTS_BEGIN_MISSING |
AcquisitionAndProductionCostsBegin |
The opening acquisition and production cost is absent. | ✓ | ✓ |
ASSETS.ACQUISITION_AND_PRODUCTION_COSTS_BEGIN_NOT_MONETARY |
AcquisitionAndProductionCostsBegin |
The opening acquisition and production cost is not a monetary amount. | ✓ | ✓ |
ASSETS.ACQUISITION_AND_PRODUCTION_COSTS_END_MISSING |
AcquisitionAndProductionCostsEnd |
The closing acquisition and production cost is absent. | ✓ | ✓ |
ASSETS.ACQUISITION_AND_PRODUCTION_COSTS_END_NOT_MONETARY |
AcquisitionAndProductionCostsEnd |
The closing acquisition and production cost is not a monetary amount. | ✓ | ✓ |
ASSETS.INVESTMENT_SUPPORT_MISSING |
InvestmentSupport |
The investment support amount is absent. | ✓ | ✓ |
ASSETS.INVESTMENT_SUPPORT_NOT_MONETARY |
InvestmentSupport |
The investment support amount is not a monetary amount. | ✓ | ✓ |
ASSETS.ASSET_ADDITION_MISSING |
AssetAddition |
The addition amount for the period is absent. | ✓ | ✓ |
ASSETS.ASSET_ADDITION_NOT_MONETARY |
AssetAddition |
The addition amount for the period is not a monetary amount. | ✓ | ✓ |
ASSETS.TRANSFERS_MISSING |
Transfers |
The transfer amount for the period is absent. | ✓ | ✓ |
ASSETS.TRANSFERS_NOT_MONETARY |
Transfers |
The transfer amount for the period is not a monetary amount. | ✓ | ✓ |
ASSETS.ASSET_DISPOSAL_MISSING |
AssetDisposal |
The disposal amount for the period is absent. | ✓ | ✓ |
ASSETS.ASSET_DISPOSAL_NOT_MONETARY |
AssetDisposal |
The disposal amount for the period is not a monetary amount. | ✓ | ✓ |
ASSETS.BOOK_VALUE_BEGIN_MISSING |
BookValueBegin |
The opening book value is absent. | ✓ | ✓ |
ASSETS.BOOK_VALUE_BEGIN_NOT_MONETARY |
BookValueBegin |
The opening book value is not a monetary amount. | ✓ | ✓ |
ASSETS.DEPRECIATION_METHOD_MISSING |
DepreciationMethod |
The asset names no depreciation method. | ✓ | ✓ |
ASSETS.DEPRECIATION_FOR_PERIOD_MISSING |
DepreciationForPeriod |
The depreciation for the period is absent. | ✓ | ✓ |
ASSETS.DEPRECIATION_FOR_PERIOD_NOT_MONETARY |
DepreciationForPeriod |
The depreciation for the period is not a monetary amount. | ✓ | ✓ |
ASSETS.APPRECIATION_FOR_PERIOD_MISSING |
AppreciationForPeriod |
The appreciation for the period is absent. | ✓ | ✓ |
ASSETS.APPRECIATION_FOR_PERIOD_NOT_MONETARY |
AppreciationForPeriod |
The appreciation for the period is not a monetary amount. | ✓ | ✓ |
ASSETS.ACCUMULATED_DEPRECIATION_MISSING |
AccumulatedDepreciation |
The accumulated depreciation is absent. | ✓ | ✓ |
ASSETS.ACCUMULATED_DEPRECIATION_NOT_MONETARY |
AccumulatedDepreciation |
The accumulated depreciation is not a monetary amount. | ✓ | ✓ |
ASSETS.BOOK_VALUE_END_MISSING |
BookValueEnd |
The closing book value is absent. | ✓ | ✓ |
ASSETS.BOOK_VALUE_END_NOT_MONETARY |
BookValueEnd |
The closing book value is not a monetary amount. | ✓ | ✓ |
ASSETS.EXTRAORDINARY_DEPRECIATION_METHOD_MISSING |
ExtraordinaryDepreciationMethod |
The asset names no extraordinary depreciation method. | ✓ | ✓ |
ASSETS.EXTRAORDINARY_DEPRECIATION_AMOUNT_FOR_PERIOD_MISSING |
ExtraordinaryDepreciationAmountForPeriod |
The extraordinary depreciation for the period is absent. | ✓ | ✓ |
ASSETS.EXTRAORDINARY_DEPRECIATION_AMOUNT_FOR_PERIOD_NOT_MONETARY |
ExtraordinaryDepreciationAmountForPeriod |
The extraordinary depreciation for the period is not a monetary amount. | ✓ | ✓ |
ASSETS.ASSET_LIFE_MISSING |
— | The asset states its useful life neither in years nor in months; one of the two is required. | ✓ | ✓ |
ASSETS.ASSET_LIFE_AMBIGUOUS |
— | The asset states its useful life in years and in months; only one of the two is accepted. | ✓ | ✓ |
ASSETS.ASSET_LIFE_YEAR_NOT_NUMERIC |
AssetLifeYear |
The useful life in years is not a number. | ✓ | ✓ |
ASSETS.ASSET_LIFE_MONTH_NOT_NUMERIC |
AssetLifeMonth |
The useful life in months is not a number. | ✓ | ✓ |
ASSETS.DEPRECIATION_PERCENTAGE_MISSING |
DepreciationPercentage |
The depreciation percentage is absent. | ✓ | ✓ |
ASSETS.DEPRECIATION_PERCENTAGE_NOT_NUMERIC |
DepreciationPercentage |
The depreciation percentage is not a number. | ✓ | ✓ |
ASSETS.DATE_OF_ACQUISITION_MISSING |
DateOfAcquisition |
The acquisition date is absent. | ✓ | ✓ |
ASSETS.DATE_OF_ACQUISITION_NOT_A_DATE |
DateOfAcquisition |
The acquisition date is not a date. | ✓ | ✓ |
ASSETS.START_UP_DATE_MISSING |
StartUpDate |
The date the asset was put into service is absent. | ✓ | ✓ |
ASSETS.START_UP_DATE_NOT_A_DATE |
StartUpDate |
The date the asset was put into service is not a date. | ✓ | ✓ |
Asset Transactions (ASSET_TRANSACTIONS)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
ASSET_TRANSACTIONS.ASSET_TRANSACTION_ID_MISSING |
AssetTransactionID |
The asset transaction carries no identifier. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_ID_TOO_LONG |
AssetTransactionID |
The asset transaction identifier is longer than 70 characters. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_TYPE_MISSING |
AssetTransactionType |
The transaction names no type. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_TYPE_NOT_NUMERIC |
AssetTransactionType |
The transaction type is not a whole number. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_TYPE_UNKNOWN |
AssetTransactionType |
The transaction type is not published by the asset transaction type nomenclature. | ✓ | ✓ |
ASSET_TRANSACTIONS.TRANSACTION_ID_MISSING |
TransactionID |
The transaction names no general ledger posting. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_ID_MISSING |
AssetID |
The transaction names no asset. | ✓ | ✓ |
ASSET_TRANSACTIONS.ACQUISITION_AND_PRODUCTION_COST_ON_TRANSACTION_MISSING |
AcquisitionAndProductionCostOnTransaction |
The acquisition and production cost carried by the transaction is absent. | ✓ | ✓ |
ASSET_TRANSACTIONS.ACQUISITION_AND_PRODUCTION_COST_ON_TRANSACTION_NOT_MONETARY |
AcquisitionAndProductionCostOnTransaction |
The acquisition and production cost carried by the transaction is not a monetary amount. | ✓ | ✓ |
ASSET_TRANSACTIONS.BOOK_VALUE_ON_TRANSACTION_MISSING |
BookValueOnTransaction |
The book value carried by the transaction is absent. | ✓ | ✓ |
ASSET_TRANSACTIONS.BOOK_VALUE_ON_TRANSACTION_NOT_MONETARY |
BookValueOnTransaction |
The book value carried by the transaction is not a monetary amount. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_AMOUNT_MISSING |
AssetTransactionAmount |
The transaction amount is absent. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_AMOUNT_NOT_MONETARY |
AssetTransactionAmount |
The transaction amount is not a monetary amount. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_DATE_MISSING |
AssetTransactionDate |
The transaction carries no date. | ✓ | ✓ |
ASSET_TRANSACTIONS.ASSET_TRANSACTION_DATE_NOT_A_DATE |
AssetTransactionDate |
The transaction date is not a date. | ✓ | ✓ |
ASSET_TRANSACTIONS.DUPLICATE_TRANSACTION |
— | The asset transaction identifier, the asset, and the general ledger posting repeat on more than one line. | ✓ | ✓ |
Business Partners (BUSINESS_PARTNERS)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
BUSINESS_PARTNERS.ID_MISSING |
ID |
The partner carries no identifier. | ✓ | ✓ |
BUSINESS_PARTNERS.ID_TOO_LONG |
ID |
The partner identifier is longer than 35 characters. | ✓ | ✓ |
BUSINESS_PARTNERS.ID_HAS_SPECIAL_CHARACTERS |
ID |
The identifier of a partner who is an individual holds a character that is not permitted in it, such as a period, comma, exclamation point, hyphen, or space. | ✓ | ✓ |
BUSINESS_PARTNERS.ACCOUNT_ID_MISSING |
AccountID |
The partner names no general ledger account. | ✓ | ✓ |
BUSINESS_PARTNERS.ACCOUNT_ID_UNKNOWN |
AccountID |
The account named is not published by the General Ledger Accounts file. | ✓ | ✓ |
BUSINESS_PARTNERS.PARTNER_TYPE_NOT_PERMITTED |
PartnerType |
The partner type is neither C (customer) nor S (supplier). |
✓ | ✓ |
BUSINESS_PARTNERS.DUPLICATE_PARTNER |
— | The partner type, account, and identifier repeat on more than one line. | ✓ | ✓ |
BUSINESS_PARTNERS.NAME_MISSING |
Name |
The partner carries no name. | ✓ | ✓ |
BUSINESS_PARTNERS.NAME_TOO_LONG |
Name |
The partner name exceeds the permitted length — 256 characters for a Romanian declaration, 70 for a Bulgarian one. | ✓ | ✓ |
BUSINESS_PARTNERS.COUNTRY_MISSING |
Country |
The partner names no country. | ✓ | ✓ |
BUSINESS_PARTNERS.COUNTRY_UNKNOWN |
Country |
The country is not an ISO 3166-1 alpha-2 country code. | ✓ | ✓ |
BUSINESS_PARTNERS.CITY_MISSING |
City |
The partner names no city. | ✓ | ✓ |
BUSINESS_PARTNERS.REGION_MISSING |
Region |
A domestic partner names no region. | ✓ | — |
BUSINESS_PARTNERS.IS_INDIVIDUAL_NOT_BOOLEAN |
IsIndividual |
The flag saying whether the partner is an individual cannot be read as true or false. | ✓ | ✓ |
BUSINESS_PARTNERS.TAX_REGISTRATION_NUMBER_TOO_LONG |
TaxRegistrationNumber |
The tax registration number is longer than 35 characters. | ✓ | ✓ |
BUSINESS_PARTNERS.TAX_REGISTRATION_NUMBER_MISSING_FOR_LEGAL_ENTITY |
TaxRegistrationNumber |
A domestic partner that is not an individual carries no tax registration number. | ✓ | ✓ |
BUSINESS_PARTNERS.TAX_REGISTRATION_NUMBER_INVALID_TIN |
TaxRegistrationNumber |
The tax registration number of a domestic legal entity does not have the structure of a Romanian tax identification code. Embassies are exempt. | ✓ | — |
BUSINESS_PARTNERS.TAX_REGISTRATION_NUMBER_INVALID_PERSONAL_CODE |
TaxRegistrationNumber |
The thirteen-digit tax registration number of a domestic individual is not a valid Romanian personal numeric code. | ✓ | — |
BUSINESS_PARTNERS.TAX_REGISTRATION_NUMBER_LEADING_ZERO |
TaxRegistrationNumber |
The tax registration number of an individual begins with a zero; only the anonymous placeholder may begin with a zero. | ✓ | — |
BUSINESS_PARTNERS.ANONYMOUS_TAX_REGISTRATION_NUMBER_ON_SUPPLIER |
TaxRegistrationNumber |
A supplier carries the anonymous placeholder tax registration number, which only a customer may carry. | ✓ | ✓ |
BUSINESS_PARTNERS.ID_TAX_REGISTRATION_NUMBER_NOT_UNIQUE |
— | One partner identifier is published with more than one tax registration number. | ✓ | ✓ |
BUSINESS_PARTNERS.RELATED_PARTY_NOT_PERMITTED |
RelatedParty |
The related-party flag is neither Y nor N. |
— | ✓ |
BUSINESS_PARTNERS.RELATED_PARTY_DATES_MISSING |
— | A partner marked as a related party carries no start date or no end date for the relationship. | — | ✓ |
General Ledger Accounts (GENERAL_LEDGER_ACCOUNTS)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
GENERAL_LEDGER_ACCOUNTS.ACCOUNT_ID_MISSING |
AccountID |
The account carries no identifier. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.ACCOUNT_ID_TOO_LONG |
AccountID |
The account identifier is longer than 35 characters. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.ACCOUNT_ID_PADDED |
AccountID |
The account identifier carries leading or trailing whitespace. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.ACCOUNT_DESCRIPTION_MISSING |
AccountDescription |
The account carries no description. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.ACCOUNT_TYPE_MISSING |
AccountType |
The account names no type. | ✓ | — |
GENERAL_LEDGER_ACCOUNTS.ACCOUNT_TYPE_NOT_PERMITTED |
AccountType |
The account type is outside the permitted set — active, passive, or bifunctional. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.STANDARD_ACCOUNT_ID_MISSING |
StandardAccountID |
The account names no standard chart-of-accounts identifier. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.STANDARD_ACCOUNT_ID_TOO_LONG |
StandardAccountID |
The standard account identifier is longer than 70 characters. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.STANDARD_ACCOUNT_ID_PADDED |
StandardAccountID |
The standard account identifier carries leading or trailing whitespace. | ✓ | ✓ |
GENERAL_LEDGER_ACCOUNTS.STANDARD_ACCOUNT_ID_NOT_NUMERIC |
StandardAccountID |
The standard account identifier is not made of digits. | ✓ | ✓ |
General Ledger Entries (GENERAL_LEDGER_ENTRIES)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
GENERAL_LEDGER_ENTRIES.JOURNAL_ID_MISSING |
JournalID |
The entry names no journal. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.JOURNAL_ID_TOO_LONG |
JournalID |
The journal identifier is longer than 18 characters. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.JOURNAL_DESCRIPTION_MISSING |
JournalDescription |
The journal carries no description. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TRANSACTION_ID_MISSING |
TransactionID |
The entry names no transaction. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TRANSACTION_ID_TOO_LONG |
TransactionID |
The transaction identifier is longer than 70 characters. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.RECORD_ID_MISSING |
RecordID |
The entry line carries no record identifier. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.SYSTEM_ID_MISSING |
SystemID |
The entry carries no identifier from the system that produced it. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.DESCRIPTION_MISSING |
Description |
The transaction carries no description. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.ACCOUNT_ID_MISSING |
AccountID |
The entry line names no general ledger account. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.ACCOUNT_ID_UNKNOWN |
AccountID |
The account named is not published by the General Ledger Accounts file. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.CUSTOMER_ID_UNKNOWN |
CustomerID |
The customer named is published by the Business Partners file neither as a customer nor as the filing company itself. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.SUPPLIER_ID_UNKNOWN |
SupplierID |
The supplier named is published by the Business Partners file neither as a supplier nor as the filing company itself. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.PERIOD_MISSING |
Period |
The entry names no accounting period. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.PERIOD_NOT_IN_RANGE |
Period |
The accounting period is not a whole number between 1 and 12. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.PERIOD_YEAR_MISSING |
PeriodYear |
The entry names no accounting year. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TRANSACTION_DATE_MISSING |
TransactionDate |
The transaction carries no date. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TRANSACTION_DATE_NOT_A_DATE |
TransactionDate |
The transaction date is not a date. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.SYSTEM_ENTRY_DATE_MISSING |
SystemEntryDate |
The entry carries no date of recording. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.SYSTEM_ENTRY_DATE_NOT_A_DATE |
SystemEntryDate |
The date of recording is not a date. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.GL_POSTING_DATE_MISSING |
GLPostingDate |
The entry carries no posting date. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.GL_POSTING_DATE_NOT_A_DATE |
GLPostingDate |
The posting date is not a date. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.DEBIT_AMOUNT_MISSING |
DebitAmount |
The debit amount is absent. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.CREDIT_AMOUNT_MISSING |
CreditAmount |
The credit amount is absent. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.DEBIT_CURRENCY_CODE_UNKNOWN |
DebitCurrencyCode |
The debit currency is not a standard currency code. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.CREDIT_CURRENCY_CODE_UNKNOWN |
CreditCurrencyCode |
The credit currency is not a standard currency code. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TAX_CURRENCY_CODE_UNKNOWN |
TaxCurrencyCode |
The tax currency is not a standard currency code. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TAX_TYPE_UNKNOWN |
TaxType |
The tax type is not published by the tax type nomenclature. | ✓ | ✓ |
GENERAL_LEDGER_ENTRIES.TAX_CODE_UNKNOWN |
TaxCode |
The tax code is not published by the tax code nomenclature. | — | ✓ |
Invoices (INVOICES)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
INVOICES.INVOICE_NO_MISSING |
InvoiceNo |
The invoice carries no number. | ✓ | ✓ |
INVOICES.INVOICE_NO_TOO_LONG |
InvoiceNo |
The invoice number is longer than 70 characters. | ✓ | ✓ |
INVOICES.INVOICE_TYPE_MISSING |
InvoiceType |
The invoice names no type. | ✓ | ✓ |
INVOICES.INVOICE_TYPE_NOT_PERMITTED |
InvoiceType |
The invoice type is outside the set the declaration accepts. | ✓ | ✓ |
INVOICES.INVOICE_DATE_MISSING |
InvoiceDate |
The invoice carries no date. | ✓ | ✓ |
INVOICES.INVOICE_DATE_NOT_A_DATE |
InvoiceDate |
The invoice date is not a date in ISO form, such as 2022-01-31. |
✓ | ✓ |
INVOICES.DESCRIPTION_MISSING |
Description |
The line carries no description of the goods or services. | ✓ | ✓ |
INVOICES.SYSTEM_ID_MISSING |
SystemID |
The invoice carries no identifier from the system that issued it. | ✓ | ✓ |
INVOICES.TRANSACTION_ID_MISSING |
TransactionID |
The invoice names no general ledger posting. | — | ✓ |
INVOICES.TRANSACTION_ID_UNKNOWN |
TransactionID |
The general ledger posting named is not published by the General Ledger Entries file. | — | ✓ |
INVOICES.ACCOUNT_ID_MISSING |
AccountID |
The invoice names no general ledger account. | ✓ | ✓ |
INVOICES.ACCOUNT_ID_UNKNOWN |
AccountID |
The account named is not published by the General Ledger Accounts file. | ✓ | ✓ |
INVOICES.LINE_ACCOUNT_ID_MISSING |
LineAccountID |
The line names no general ledger account. | ✓ | ✓ |
INVOICES.LINE_ACCOUNT_ID_UNKNOWN |
LineAccountID |
The line’s account is not published by the General Ledger Accounts file. | ✓ | ✓ |
INVOICES.PARTNER_MISSING |
— | The invoice names neither a customer nor a supplier and is not a self-billed invoice. | ✓ | ✓ |
INVOICES.PARTNER_AMBIGUOUS |
— | The invoice names a customer and a supplier. | ✓ | ✓ |
INVOICES.CUSTOMER_ID_UNKNOWN |
CustomerID |
The customer named is not published by the Business Partners file as a customer. | ✓ | ✓ |
INVOICES.SUPPLIER_ID_UNKNOWN |
SupplierID |
The supplier named is not published by the Business Partners file as a supplier. | ✓ | ✓ |
INVOICES.SELF_BILLING_INDICATOR_NOT_PERMITTED |
SelfBillingIndicator |
The self-billing indicator is outside the permitted set. | ✓ | ✓ |
INVOICES.MASTER_NET_TOTAL_MISSING |
MasterNetTotal |
The invoice net total is absent. | ✓ | ✓ |
INVOICES.MASTER_NET_TOTAL_NOT_MONETARY |
MasterNetTotal |
The invoice net total is not a monetary amount. | ✓ | ✓ |
INVOICES.MASTER_GROSS_TOTAL_MISSING |
MasterGrossTotal |
The invoice gross total is absent. | ✓ | ✓ |
INVOICES.MASTER_GROSS_TOTAL_NOT_MONETARY |
MasterGrossTotal |
The invoice gross total is not a monetary amount. | ✓ | ✓ |
INVOICES.MASTER_TAX_AMOUNT_MISSING |
MasterTaxAmount |
The invoice tax total is absent. | ✓ | ✓ |
INVOICES.MASTER_TAX_AMOUNT_NOT_MONETARY |
MasterTaxAmount |
The invoice tax total is not a monetary amount. | ✓ | ✓ |
INVOICES.MASTER_TAX_CURRENCY_CODE_UNKNOWN |
MasterTaxCurrencyCode |
The currency of the invoice tax total is not a standard currency code. | ✓ | ✓ |
INVOICES.INVOICE_LINE_AMOUNT_MISSING |
InvoiceLineAmount |
The line amount is absent. | ✓ | ✓ |
INVOICES.INVOICE_LINE_AMOUNT_NOT_MONETARY |
InvoiceLineAmount |
The line amount is not a monetary amount. | ✓ | ✓ |
INVOICES.INVOICE_LINE_CURRENCY_CODE_UNKNOWN |
InvoiceLineCurrencyCode |
The line currency is not a standard currency code. | ✓ | ✓ |
INVOICES.UNIT_PRICE_NOT_MONETARY |
UnitPrice |
The unit price is not a monetary amount. | ✓ | ✓ |
INVOICES.QUANTITY_MISSING |
Quantity |
The line carries no quantity. | ✓ | ✓ |
INVOICES.QUANTITY_NOT_NUMERIC |
Quantity |
The quantity is not a number. | ✓ | ✓ |
INVOICES.UOM_BASE_MISSING |
UOMBase |
The line names no base unit of measure. | ✓ | ✓ |
INVOICES.UOM_BASE_UNKNOWN |
UOMBase |
The base unit of measure is not published by the unit of measure nomenclature. | ✓ | ✓ |
INVOICES.PRODUCT_CODE_MISSING |
ProductCode |
The line names no product. | ✓ | ✓ |
INVOICES.PRODUCT_COMMODITY_CODE_MALFORMED |
ProductCommodityCode |
The commodity code is not an eight-digit numeric code. | ✓ | ✓ |
INVOICES.PRODUCT_COMMODITY_CODE_LEADING_ZERO_STRIPPED |
ProductCommodityCode |
The commodity code has seven digits and matches a nomenclature code once a leading zero is restored — the zero was most likely dropped when the file was saved from a spreadsheet. | ✓ | — |
INVOICES.PRODUCT_COMMODITY_CODE_UNKNOWN |
ProductCommodityCode |
The commodity code is well-formed but is not published by the combined nomenclature. | ✓ | — |
INVOICES.TAX_TYPE_MISSING |
TaxType |
The line names no tax type. | ✓ | ✓ |
INVOICES.TAX_TYPE_UNKNOWN |
TaxType |
The tax type is not published by the tax type nomenclature. | ✓ | ✓ |
INVOICES.TAX_CODE_MISSING |
TaxCode |
The line names no tax code. | ✓ | ✓ |
INVOICES.TAX_CODE_UNKNOWN |
TaxCode |
The tax code is not published by the tax code nomenclature. | — | ✓ |
INVOICES.TAX_PERCENTAGE_MISSING |
TaxPercentage |
The tax percentage is absent. | ✓ | ✓ |
INVOICES.TAX_PERCENTAGE_NOT_NUMERIC |
TaxPercentage |
The tax percentage is not a number. | ✓ | ✓ |
INVOICES.TAX_AMOUNT_MISSING |
TaxAmount |
The line tax amount is absent. | ✓ | ✓ |
INVOICES.TAX_AMOUNT_NOT_MONETARY |
TaxAmount |
The line tax amount is not a monetary amount. | ✓ | ✓ |
INVOICES.TAX_CURRENCY_CODE_UNKNOWN |
TaxCurrencyCode |
The tax currency is not a standard currency code. | ✓ | ✓ |
INVOICES.DEBIT_CREDIT_INDICATOR_NOT_PERMITTED |
DebitCreditIndicator |
The debit/credit indicator is neither D nor C. |
✓ | ✓ |
Movement of Goods (MOVEMENT_OF_GOODS)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
MOVEMENT_OF_GOODS.MOVEMENT_REFERENCE_MISSING |
MovementReference |
The movement carries no reference. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_REFERENCE_TOO_LONG |
MovementReference |
The movement reference is longer than 35 characters. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_TYPE_NOT_NUMERIC |
MovementType |
The movement type is not a whole number. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_TYPE_UNKNOWN |
MovementType |
The movement type is not published by the stock movement nomenclature. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_SUB_TYPE_NOT_NUMERIC |
MovementSubType |
The movement subtype is not a whole number. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_SUB_TYPE_UNKNOWN |
MovementSubType |
The movement subtype is not published by the stock movement nomenclature. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_DATE_MISSING |
MovementDate |
The movement carries no date. | ✓ | ✓ |
MOVEMENT_OF_GOODS.MOVEMENT_DATE_NOT_A_DATE |
MovementDate |
The movement date is not a date. | ✓ | ✓ |
MOVEMENT_OF_GOODS.DOCUMENT_TYPE_MISSING |
DocumentType |
The movement names no source document type. | ✓ | ✓ |
MOVEMENT_OF_GOODS.DOCUMENT_NUMBER_MISSING |
DocumentNumber |
The movement names no source document number. | ✓ | ✓ |
MOVEMENT_OF_GOODS.LINE_NUMBER_MISSING |
LineNumber |
The movement line carries no line number. | ✓ | ✓ |
MOVEMENT_OF_GOODS.DESCRIPTION_MISSING |
Description |
The line carries no description of the goods. | ✓ | ✓ |
MOVEMENT_OF_GOODS.ACCOUNT_ID_UNKNOWN |
AccountID |
The account named is not published by the General Ledger Accounts file. | ✓ | ✓ |
MOVEMENT_OF_GOODS.CUSTOMER_ID_UNKNOWN |
CustomerID |
The customer named is not published by the Business Partners file as a customer. | ✓ | ✓ |
MOVEMENT_OF_GOODS.SUPPLIER_ID_UNKNOWN |
SupplierID |
The supplier named is not published by the Business Partners file as a supplier. | ✓ | ✓ |
MOVEMENT_OF_GOODS.PRODUCT_CODE_MISSING |
ProductCode |
The line names no product. | ✓ | ✓ |
MOVEMENT_OF_GOODS.PRODUCT_COMMODITY_CODE_MISSING |
ProductCommodityCode |
The line carries no commodity code. | ✓ | ✓ |
MOVEMENT_OF_GOODS.PRODUCT_COMMODITY_CODE_MALFORMED |
ProductCommodityCode |
The commodity code is not an eight-digit numeric code. | ✓ | ✓ |
MOVEMENT_OF_GOODS.PRODUCT_COMMODITY_CODE_LEADING_ZERO_STRIPPED |
ProductCommodityCode |
The commodity code has seven digits and matches a nomenclature code once a leading zero is restored. | ✓ | — |
MOVEMENT_OF_GOODS.PRODUCT_COMMODITY_CODE_UNKNOWN |
ProductCommodityCode |
The commodity code is well-formed but is not published by the combined nomenclature. | ✓ | — |
MOVEMENT_OF_GOODS.GOODS_SERVICES_ID_NOT_PERMITTED |
GoodsServicesID |
The goods-or-services indicator is outside the permitted set. | ✓ | ✓ |
MOVEMENT_OF_GOODS.UOM_BASE_MISSING |
UOMBase |
The line names no base unit of measure. | ✓ | ✓ |
MOVEMENT_OF_GOODS.UOM_BASE_UNKNOWN |
UOMBase |
The base unit of measure is not published by the unit of measure nomenclature. | ✓ | ✓ |
MOVEMENT_OF_GOODS.QUANTITY_MISSING |
Quantity |
The line carries no quantity. | ✓ | ✓ |
MOVEMENT_OF_GOODS.QUANTITY_NOT_NUMERIC |
Quantity |
The quantity is not a number. | ✓ | ✓ |
MOVEMENT_OF_GOODS.BOOK_VALUE_NOT_MONETARY |
BookValue |
The book value is not a monetary amount. | ✓ | ✓ |
Payments (PAYMENTS)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
PAYMENTS.PAYMENT_REF_NO_MISSING |
PaymentRefNo |
The payment carries no reference number. | ✓ | ✓ |
PAYMENTS.PAYMENT_REF_NO_TOO_LONG |
PaymentRefNo |
The payment reference number is longer than 35 characters. | ✓ | ✓ |
PAYMENTS.PAYMENT_METHOD_NOT_PERMITTED |
PaymentMethod |
The payment method is outside the permitted set. | ✓ | ✓ |
PAYMENTS.SYSTEM_ID_MISSING |
SystemID |
The payment carries no identifier from the system that recorded it. | ✓ | ✓ |
PAYMENTS.TRANSACTION_ID_MISSING |
TransactionID |
The payment names no general ledger posting. | — | ✓ |
PAYMENTS.ACCOUNT_ID_MISSING |
AccountID |
The payment names no general ledger account. | ✓ | ✓ |
PAYMENTS.ACCOUNT_ID_UNKNOWN |
AccountID |
The account named is not published by the General Ledger Accounts file. | ✓ | ✓ |
PAYMENTS.PARTNER_AMBIGUOUS |
— | The payment names a customer and a supplier. | ✓ | ✓ |
PAYMENTS.CUSTOMER_ID_UNKNOWN |
CustomerID |
The customer named is published by the Business Partners file neither as a customer nor as the filing company itself. | ✓ | ✓ |
PAYMENTS.SUPPLIER_ID_UNKNOWN |
SupplierID |
The supplier named is published by the Business Partners file neither as a supplier nor as the filing company itself. | ✓ | ✓ |
PAYMENTS.PERIOD_NOT_IN_RANGE |
Period |
The accounting period is not a whole number between 1 and 12. | ✓ | ✓ |
PAYMENTS.PERIOD_YEAR_NOT_NUMERIC |
PeriodYear |
The accounting year is not a number. | ✓ | ✓ |
PAYMENTS.TRANSACTION_DATE_MISSING |
TransactionDate |
The payment carries no transaction date. | ✓ | ✓ |
PAYMENTS.TRANSACTION_DATE_NOT_A_DATE |
TransactionDate |
The transaction date is not a date. | ✓ | ✓ |
PAYMENTS.PAYMENT_LINE_AMOUNT_MISSING |
PaymentLineAmount |
The line amount is absent. | ✓ | ✓ |
PAYMENTS.PAYMENT_LINE_AMOUNT_NOT_MONETARY |
PaymentLineAmount |
The line amount is not a monetary amount. | ✓ | ✓ |
PAYMENTS.PAYMENT_LINE_CURRENCY_CODE_UNKNOWN |
PaymentLineCurrencyCode |
The line currency is not a standard currency code. | ✓ | ✓ |
PAYMENTS.TAX_AMOUNT_MISSING |
TaxAmount |
The line names a tax type but carries no tax amount. | ✓ | ✓ |
PAYMENTS.TAX_AMOUNT_NOT_MONETARY |
TaxAmount |
The tax amount is not a monetary amount. | ✓ | ✓ |
PAYMENTS.TAX_CURRENCY_CODE_UNKNOWN |
TaxCurrencyCode |
The tax currency is not a standard currency code. | ✓ | ✓ |
PAYMENTS.TAX_TYPE_UNKNOWN |
TaxType |
The tax type is not published by the tax type nomenclature. | ✓ | ✓ |
PAYMENTS.TAX_CODE_UNKNOWN |
TaxCode |
The tax code is not published by the tax code nomenclature. | — | ✓ |
PAYMENTS.DEBIT_CREDIT_INDICATOR_NOT_PERMITTED |
DebitCreditIndicator |
The debit/credit indicator is neither D nor C. |
✓ | ✓ |
Physical Stock (PHYSICAL_STOCK)
| Code | field |
Rule | RO | BG |
|---|---|---|---|---|
PHYSICAL_STOCK.WAREHOUSE_ID_MISSING |
WarehouseID |
The stock line names no warehouse. | ✓ | ✓ |
PHYSICAL_STOCK.WAREHOUSE_ID_TOO_LONG |
WarehouseID |
The warehouse identifier is longer than 35 characters. | ✓ | ✓ |
PHYSICAL_STOCK.PRODUCT_CODE_MISSING |
ProductCode |
The stock line names no product. | ✓ | ✓ |
PHYSICAL_STOCK.PRODUCT_TYPE_MISSING |
ProductType |
The stock line names no product type. | ✓ | ✓ |
PHYSICAL_STOCK.PRODUCT_TYPE_TOO_LONG |
ProductType |
The product type is longer than 18 characters. | ✓ | ✓ |
PHYSICAL_STOCK.DESCRIPTION_MISSING |
Description |
The stock line carries no description of the goods. | ✓ | ✓ |
PHYSICAL_STOCK.OWNER_ID_UNKNOWN |
OwnerID |
The owner named is not published by the Business Partners file. | ✓ | ✓ |
PHYSICAL_STOCK.PRODUCT_COMMODITY_CODE_MISSING |
ProductCommodityCode |
The stock line carries no commodity code. | ✓ | ✓ |
PHYSICAL_STOCK.PRODUCT_COMMODITY_CODE_MALFORMED |
ProductCommodityCode |
The commodity code is not an eight-digit numeric code. | ✓ | ✓ |
PHYSICAL_STOCK.PRODUCT_COMMODITY_CODE_LEADING_ZERO_STRIPPED |
ProductCommodityCode |
The commodity code has seven digits and matches a nomenclature code once a leading zero is restored. | ✓ | — |
PHYSICAL_STOCK.PRODUCT_COMMODITY_CODE_UNKNOWN |
ProductCommodityCode |
The commodity code is well-formed but is not published by the combined nomenclature. | ✓ | — |
PHYSICAL_STOCK.STOCK_ACCOUNT_COMMODITY_CODE_MALFORMED |
StockAccountCommodityCode |
The stock account commodity code is not an eight-digit numeric code. | ✓ | ✓ |
PHYSICAL_STOCK.STOCK_ACCOUNT_COMMODITY_CODE_LEADING_ZERO_STRIPPED |
StockAccountCommodityCode |
The stock account commodity code has seven digits and matches a nomenclature code once a leading zero is restored. | ✓ | — |
PHYSICAL_STOCK.STOCK_ACCOUNT_COMMODITY_CODE_UNKNOWN |
StockAccountCommodityCode |
The stock account commodity code is well-formed but is not published by the combined nomenclature. | ✓ | — |
PHYSICAL_STOCK.GOODS_SERVICES_ID_NOT_PERMITTED |
GoodsServicesID |
The goods-or-services indicator is outside the permitted set. | ✓ | ✓ |
PHYSICAL_STOCK.UOM_BASE_MISSING |
UOMBase |
The stock line names no base unit of measure. | ✓ | ✓ |
PHYSICAL_STOCK.UOM_BASE_UNKNOWN |
UOMBase |
The base unit of measure is not published by the unit of measure nomenclature. | ✓ | ✓ |
PHYSICAL_STOCK.UNIT_PRICE_NOT_MONETARY |
UnitPrice |
The unit price is not a monetary amount. | ✓ | ✓ |
PHYSICAL_STOCK.OPENING_STOCK_VALUE_MISSING |
OpeningStockValue |
The opening stock value is absent. | ✓ | ✓ |
PHYSICAL_STOCK.OPENING_STOCK_VALUE_NOT_MONETARY |
OpeningStockValue |
The opening stock value is not a monetary amount. | ✓ | ✓ |
PHYSICAL_STOCK.CLOSING_STOCK_VALUE_MISSING |
ClosingStockValue |
The closing stock value is absent. | ✓ | ✓ |
PHYSICAL_STOCK.CLOSING_STOCK_VALUE_NOT_MONETARY |
ClosingStockValue |
The closing stock value is not a monetary amount. | ✓ | ✓ |
PHYSICAL_STOCK.OPENING_STOCK_QUANTITY_MISSING |
OpeningStockQuantity |
The opening stock quantity is absent. | ✓ | ✓ |
PHYSICAL_STOCK.OPENING_STOCK_QUANTITY_NOT_NUMERIC |
OpeningStockQuantity |
The opening stock quantity is not a number. | ✓ | ✓ |
PHYSICAL_STOCK.CLOSING_STOCK_QUANTITY_MISSING |
ClosingStockQuantity |
The closing stock quantity is absent. | ✓ | ✓ |
PHYSICAL_STOCK.CLOSING_STOCK_QUANTITY_NOT_NUMERIC |
ClosingStockQuantity |
The closing stock quantity is not a number. | ✓ | ✓ |
Findings on empty identifier columns
Some rules report that a column which identifies or describes the record is empty, for example INVOICES.INVOICE_NO_MISSING or PHYSICAL_STOCK.WAREHOUSE_ID_MISSING. The finding of such a rule reports the identifier or description that comes from that column as absent. It still carries the other identifiers and the description of the line, as listed in Identifiers per file type.
For example, an Invoices line leaves InvoiceNo empty. The INVOICES.INVOICE_NO_MISSING finding has no documentId, because documentId comes from InvoiceNo, but its systemId, lineId, and documentDescription still locate the line:
{
"code": "INVOICES.INVOICE_NO_MISSING",
"fileType": "INVOICES",
"field": "InvoiceNo",
"documentId": null,
"documentContextId": null,
"documentDescription": "Office chairs",
"systemId": "YOUR_SYSTEM_ID",
"lineId": "1",
"message": "YOUR_MESSAGE"
}
When the empty column is part of the key of the record, the remaining identifiers can match other lines. For example, a Physical Stock file lists one product in three warehouses, and one of those lines leaves WarehouseID empty. The PHYSICAL_STOCK.WAREHOUSE_ID_MISSING finding has no documentContextId, because documentContextId comes from WarehouseID, and reports the product code as documentId. All three lines carry that product code, so the finding identifies the product, but not the line.