---
title: "Import the pre-filled return | Docs | e-TVA Check by R&D Copilot"
description: "Send the four rows of the pre-filled VAT return and the documents behind them, check that the rows equal the documents, and replace an import when a new one arrives."
canonical: "https://etva.rdcopilot.com/docs/guides/import-the-prefilled-return/"
language: en
updated: 2026-11-22
---

# Import the pre-filled return

Send the four rows of the pre-filled VAT return and the documents behind them, check that the rows equal the documents, and replace an import when a new one arrives.

The pre-filled side of a period is what you import here. One request carries the four rows of the return and every document the authority lists behind them. The product takes the figure of each row from the documents and compares it with the figure you stated, so the two cannot drift apart.

1.  Read the period
    
    Read it with `getPeriod` and keep its `revision`. Every import is sent with it as `expectedRevision`.
    
2.  List the documents
    
    Take every document of the pre-filled return, as the authority lists it, with its parts.
    
3.  Add up the four rows
    
    For each row, add the base and the VAT of the parts that fall in it.
    
4.  Send the import
    
    Send rows and documents in one `importPrefilled` request.
    
5.  Check the record
    
    Read `listImports`: the new import is the first one of the list, with its `count`.
    

## Build the rows and the documents

Each document has a `number`, a `source` (for example `e-factura`), a `direction` (`sales` or `purchases`), the `partnerCif` and `partnerName`, the `date`, the `authorityId` and its `parts`. A part is a `rate` and a `base`. The direction and the rate decide the row: sales at 21% fall in `sales-standard`, purchases at 11% in `purchases-reduced`. The VAT of a part is the base times the rate, rounded to the nearest ban with halves rounded up; a row is the sum of these amounts.

| Row | Document | Base | VAT |
| --- | --- | --- | --- |
| `sales-standard` | `BRT-2026-00044` | 619.40 | 130.07 |
| `sales-reduced` | `BRT-2026-00044` | 2988.00 | 328.68 |
| `purchases-standard` | `AC-004402, BT-26-0987` | 10289.50 | 2160.80 |
| `purchases-reduced` | `LD-2026-3187` | 9124.00 | 1003.64 |

The invoice `BRT-2026-00044` has two parts, one at each rate, so it feeds two rows. Amounts are decimal strings in lei. Send the import with the revision of the period you read.

curl

```bash
curl -X POST "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
  "expectedRevision": 1,
  "prefilledOn": "2026-09-04",
  "rows": [
    {
      "rowId": "sales-standard",
      "base": "619.40",
      "vat": "130.07"
    },
    {
      "rowId": "sales-reduced",
      "base": "2988.00",
      "vat": "328.68"
    },
    {
      "rowId": "purchases-standard",
      "base": "10289.50",
      "vat": "2160.80"
    },
    {
      "rowId": "purchases-reduced",
      "base": "9124.00",
      "vat": "1003.64"
    }
  ],
  "documents": [
    {
      "number": "BRT-2026-00044",
      "source": "e-factura",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "authorityId": "5011900200",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "authorityId": "5011900201",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "authorityId": "5011900202",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    },
    {
      "number": "BT-26-0987",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603783",
      "partnerName": "Băuturi Trotuș SRL",
      "date": "2026-07-12",
      "authorityId": "5011900203",
      "parts": [
        {
          "rate": "21",
          "base": "6402.50"
        }
      ]
    }
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
    "expectedRevision": 1,
    "prefilledOn": "2026-09-04",
    "rows": [
      {
        "rowId": "sales-standard",
        "base": "619.40",
        "vat": "130.07"
      },
      {
        "rowId": "sales-reduced",
        "base": "2988.00",
        "vat": "328.68"
      },
      {
        "rowId": "purchases-standard",
        "base": "10289.50",
        "vat": "2160.80"
      },
      {
        "rowId": "purchases-reduced",
        "base": "9124.00",
        "vat": "1003.64"
      }
    ],
    "documents": [
      {
        "number": "BRT-2026-00044",
        "source": "e-factura",
        "direction": "sales",
        "partnerCif": "RO39172614",
        "partnerName": "Cofetăria Vălul Alb SRL",
        "date": "2026-07-04",
        "authorityId": "5011900200",
        "parts": [
          {
            "rate": "21",
            "base": "619.40"
          },
          {
            "rate": "11",
            "base": "2988.00"
          }
        ]
      },
      {
        "number": "LD-2026-3187",
        "source": "e-factura",
        "direction": "purchases",
        "partnerCif": "RO51603546",
        "partnerName": "Brânzeturi Obcina SRL",
        "date": "2026-07-06",
        "authorityId": "5011900201",
        "parts": [
          {
            "rate": "11",
            "base": "9124.00"
          }
        ]
      },
      {
        "number": "AC-004402",
        "source": "e-factura",
        "direction": "purchases",
        "partnerCif": "RO51603619",
        "partnerName": "Ambalaje Carpatin SRL",
        "date": "2026-07-10",
        "authorityId": "5011900202",
        "parts": [
          {
            "rate": "21",
            "base": "3887.00"
          }
        ]
      },
      {
        "number": "BT-26-0987",
        "source": "e-factura",
        "direction": "purchases",
        "partnerCif": "RO51603783",
        "partnerName": "Băuturi Trotuș SRL",
        "date": "2026-07-12",
        "authorityId": "5011900203",
        "parts": [
          {
            "rate": "21",
            "base": "6402.50"
          }
        ]
      }
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'bafe8dd8-88ba-4fa9-ad25-f4425032312a',
        'expectedRevision': 1,
        'prefilledOn': '2026-09-04',
        'rows': [
            {
                'rowId': 'sales-standard',
                'base': '619.40',
                'vat': '130.07',
            },
            {
                'rowId': 'sales-reduced',
                'base': '2988.00',
                'vat': '328.68',
            },
            {
                'rowId': 'purchases-standard',
                'base': '10289.50',
                'vat': '2160.80',
            },
            {
                'rowId': 'purchases-reduced',
                'base': '9124.00',
                'vat': '1003.64',
            },
        ],
        'documents': [
            {
                'number': 'BRT-2026-00044',
                'source': 'e-factura',
                'direction': 'sales',
                'partnerCif': 'RO39172614',
                'partnerName': 'Cofetăria Vălul Alb SRL',
                'date': '2026-07-04',
                'authorityId': '5011900200',
                'parts': [
                    {
                        'rate': '21',
                        'base': '619.40',
                    },
                    {
                        'rate': '11',
                        'base': '2988.00',
                    },
                ],
            },
            {
                'number': 'LD-2026-3187',
                'source': 'e-factura',
                'direction': 'purchases',
                'partnerCif': 'RO51603546',
                'partnerName': 'Brânzeturi Obcina SRL',
                'date': '2026-07-06',
                'authorityId': '5011900201',
                'parts': [
                    {
                        'rate': '11',
                        'base': '9124.00',
                    },
                ],
            },
            {
                'number': 'AC-004402',
                'source': 'e-factura',
                'direction': 'purchases',
                'partnerCif': 'RO51603619',
                'partnerName': 'Ambalaje Carpatin SRL',
                'date': '2026-07-10',
                'authorityId': '5011900202',
                'parts': [
                    {
                        'rate': '21',
                        'base': '3887.00',
                    },
                ],
            },
            {
                'number': 'BT-26-0987',
                'source': 'e-factura',
                'direction': 'purchases',
                'partnerCif': 'RO51603783',
                'partnerName': 'Băuturi Trotuș SRL',
                'date': '2026-07-12',
                'authorityId': '5011900203',
                'parts': [
                    {
                        'rate': '21',
                        'base': '6402.50',
                    },
                ],
            },
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
  "expectedRevision": 1,
  "prefilledOn": "2026-09-04",
  "rows": [
    {
      "rowId": "sales-standard",
      "base": "619.40",
      "vat": "130.07"
    },
    {
      "rowId": "sales-reduced",
      "base": "2988.00",
      "vat": "328.68"
    },
    {
      "rowId": "purchases-standard",
      "base": "10289.50",
      "vat": "2160.80"
    },
    {
      "rowId": "purchases-reduced",
      "base": "9124.00",
      "vat": "1003.64"
    }
  ],
  "documents": [
    {
      "number": "BRT-2026-00044",
      "source": "e-factura",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "authorityId": "5011900200",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "authorityId": "5011900201",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "authorityId": "5011900202",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    },
    {
      "number": "BT-26-0987",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603783",
      "partnerName": "Băuturi Trotuș SRL",
      "date": "2026-07-12",
      "authorityId": "5011900203",
      "parts": [
        {
          "rate": "21",
          "base": "6402.50"
        }
      ]
    }
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
  "expectedRevision": 1,
  "prefilledOn": "2026-09-04",
  "rows": [
    {
      "rowId": "sales-standard",
      "base": "619.40",
      "vat": "130.07"
    },
    {
      "rowId": "sales-reduced",
      "base": "2988.00",
      "vat": "328.68"
    },
    {
      "rowId": "purchases-standard",
      "base": "10289.50",
      "vat": "2160.80"
    },
    {
      "rowId": "purchases-reduced",
      "base": "9124.00",
      "vat": "1003.64"
    }
  ],
  "documents": [
    {
      "number": "BRT-2026-00044",
      "source": "e-factura",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "authorityId": "5011900200",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "authorityId": "5011900201",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "authorityId": "5011900202",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    },
    {
      "number": "BT-26-0987",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603783",
      "partnerName": "Băuturi Trotuș SRL",
      "date": "2026-07-12",
      "authorityId": "5011900203",
      "parts": [
        {
          "rate": "21",
          "base": "6402.50"
        }
      ]
    }
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
  "status": "accepted",
  "aggregateId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
  "aggregateRevision": 2
}
```

The answer is `202` with the operation result. The period moves to the next revision and its rows, differences and statuses are found again. Repeat the same request with the same `operationId` after a timeout: the import is applied once. See [Idempotency](https://etva.rdcopilot.com/docs/reference/idempotency/).

## The rows must equal the documents

The import is accepted only when the four rows appear once each and every row equals the sum of its documents, in base and in VAT. If one row is off by a ban, the whole import is refused with `422` `rows_do_not_add_up` and nothing changes. Here the first row states `130.00` where the document gives `130.07`.

Refused import

curl

```bash
curl -X POST "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "0ee8ad19-86d5-4511-9146-3aa6ce971ca2",
  "expectedRevision": 1,
  "prefilledOn": "2026-09-04",
  "rows": [
    {
      "rowId": "sales-standard",
      "base": "619.40",
      "vat": "130.00"
    },
    {
      "rowId": "sales-reduced",
      "base": "2988.00",
      "vat": "328.68"
    },
    {
      "rowId": "purchases-standard",
      "base": "10289.50",
      "vat": "2160.80"
    },
    {
      "rowId": "purchases-reduced",
      "base": "9124.00",
      "vat": "1003.64"
    }
  ],
  "documents": [
    {
      "number": "BRT-2026-00044",
      "source": "e-factura",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "authorityId": "5011900200",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "authorityId": "5011900201",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "authorityId": "5011900202",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    },
    {
      "number": "BT-26-0987",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603783",
      "partnerName": "Băuturi Trotuș SRL",
      "date": "2026-07-12",
      "authorityId": "5011900203",
      "parts": [
        {
          "rate": "21",
          "base": "6402.50"
        }
      ]
    }
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "0ee8ad19-86d5-4511-9146-3aa6ce971ca2",
    "expectedRevision": 1,
    "prefilledOn": "2026-09-04",
    "rows": [
      {
        "rowId": "sales-standard",
        "base": "619.40",
        "vat": "130.00"
      },
      {
        "rowId": "sales-reduced",
        "base": "2988.00",
        "vat": "328.68"
      },
      {
        "rowId": "purchases-standard",
        "base": "10289.50",
        "vat": "2160.80"
      },
      {
        "rowId": "purchases-reduced",
        "base": "9124.00",
        "vat": "1003.64"
      }
    ],
    "documents": [
      {
        "number": "BRT-2026-00044",
        "source": "e-factura",
        "direction": "sales",
        "partnerCif": "RO39172614",
        "partnerName": "Cofetăria Vălul Alb SRL",
        "date": "2026-07-04",
        "authorityId": "5011900200",
        "parts": [
          {
            "rate": "21",
            "base": "619.40"
          },
          {
            "rate": "11",
            "base": "2988.00"
          }
        ]
      },
      {
        "number": "LD-2026-3187",
        "source": "e-factura",
        "direction": "purchases",
        "partnerCif": "RO51603546",
        "partnerName": "Brânzeturi Obcina SRL",
        "date": "2026-07-06",
        "authorityId": "5011900201",
        "parts": [
          {
            "rate": "11",
            "base": "9124.00"
          }
        ]
      },
      {
        "number": "AC-004402",
        "source": "e-factura",
        "direction": "purchases",
        "partnerCif": "RO51603619",
        "partnerName": "Ambalaje Carpatin SRL",
        "date": "2026-07-10",
        "authorityId": "5011900202",
        "parts": [
          {
            "rate": "21",
            "base": "3887.00"
          }
        ]
      },
      {
        "number": "BT-26-0987",
        "source": "e-factura",
        "direction": "purchases",
        "partnerCif": "RO51603783",
        "partnerName": "Băuturi Trotuș SRL",
        "date": "2026-07-12",
        "authorityId": "5011900203",
        "parts": [
          {
            "rate": "21",
            "base": "6402.50"
          }
        ]
      }
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '0ee8ad19-86d5-4511-9146-3aa6ce971ca2',
        'expectedRevision': 1,
        'prefilledOn': '2026-09-04',
        'rows': [
            {
                'rowId': 'sales-standard',
                'base': '619.40',
                'vat': '130.00',
            },
            {
                'rowId': 'sales-reduced',
                'base': '2988.00',
                'vat': '328.68',
            },
            {
                'rowId': 'purchases-standard',
                'base': '10289.50',
                'vat': '2160.80',
            },
            {
                'rowId': 'purchases-reduced',
                'base': '9124.00',
                'vat': '1003.64',
            },
        ],
        'documents': [
            {
                'number': 'BRT-2026-00044',
                'source': 'e-factura',
                'direction': 'sales',
                'partnerCif': 'RO39172614',
                'partnerName': 'Cofetăria Vălul Alb SRL',
                'date': '2026-07-04',
                'authorityId': '5011900200',
                'parts': [
                    {
                        'rate': '21',
                        'base': '619.40',
                    },
                    {
                        'rate': '11',
                        'base': '2988.00',
                    },
                ],
            },
            {
                'number': 'LD-2026-3187',
                'source': 'e-factura',
                'direction': 'purchases',
                'partnerCif': 'RO51603546',
                'partnerName': 'Brânzeturi Obcina SRL',
                'date': '2026-07-06',
                'authorityId': '5011900201',
                'parts': [
                    {
                        'rate': '11',
                        'base': '9124.00',
                    },
                ],
            },
            {
                'number': 'AC-004402',
                'source': 'e-factura',
                'direction': 'purchases',
                'partnerCif': 'RO51603619',
                'partnerName': 'Ambalaje Carpatin SRL',
                'date': '2026-07-10',
                'authorityId': '5011900202',
                'parts': [
                    {
                        'rate': '21',
                        'base': '3887.00',
                    },
                ],
            },
            {
                'number': 'BT-26-0987',
                'source': 'e-factura',
                'direction': 'purchases',
                'partnerCif': 'RO51603783',
                'partnerName': 'Băuturi Trotuș SRL',
                'date': '2026-07-12',
                'authorityId': '5011900203',
                'parts': [
                    {
                        'rate': '21',
                        'base': '6402.50',
                    },
                ],
            },
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "0ee8ad19-86d5-4511-9146-3aa6ce971ca2",
  "expectedRevision": 1,
  "prefilledOn": "2026-09-04",
  "rows": [
    {
      "rowId": "sales-standard",
      "base": "619.40",
      "vat": "130.00"
    },
    {
      "rowId": "sales-reduced",
      "base": "2988.00",
      "vat": "328.68"
    },
    {
      "rowId": "purchases-standard",
      "base": "10289.50",
      "vat": "2160.80"
    },
    {
      "rowId": "purchases-reduced",
      "base": "9124.00",
      "vat": "1003.64"
    }
  ],
  "documents": [
    {
      "number": "BRT-2026-00044",
      "source": "e-factura",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "authorityId": "5011900200",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "authorityId": "5011900201",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "authorityId": "5011900202",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    },
    {
      "number": "BT-26-0987",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603783",
      "partnerName": "Băuturi Trotuș SRL",
      "date": "2026-07-12",
      "authorityId": "5011900203",
      "parts": [
        {
          "rate": "21",
          "base": "6402.50"
        }
      ]
    }
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "0ee8ad19-86d5-4511-9146-3aa6ce971ca2",
  "expectedRevision": 1,
  "prefilledOn": "2026-09-04",
  "rows": [
    {
      "rowId": "sales-standard",
      "base": "619.40",
      "vat": "130.00"
    },
    {
      "rowId": "sales-reduced",
      "base": "2988.00",
      "vat": "328.68"
    },
    {
      "rowId": "purchases-standard",
      "base": "10289.50",
      "vat": "2160.80"
    },
    {
      "rowId": "purchases-reduced",
      "base": "9124.00",
      "vat": "1003.64"
    }
  ],
  "documents": [
    {
      "number": "BRT-2026-00044",
      "source": "e-factura",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "authorityId": "5011900200",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "authorityId": "5011900201",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "authorityId": "5011900202",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    },
    {
      "number": "BT-26-0987",
      "source": "e-factura",
      "direction": "purchases",
      "partnerCif": "RO51603783",
      "partnerName": "Băuturi Trotuș SRL",
      "date": "2026-07-12",
      "authorityId": "5011900203",
      "parts": [
        {
          "rate": "21",
          "base": "6402.50"
        }
      ]
    }
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 422

```json
{
  "code": "rows_do_not_add_up",
  "message": "The rows of the pre-filled return are not the four rows once each, or a row is not the sum of its documents. Nothing was imported."
}
```

Correct the row or the document and send the import again with the same revision: nothing was applied. A rate other than the two in force is refused with `unsupported_rate`, and an import without documents with `empty_import`.

## A document the authority lists twice

Send what the authority lists, exactly as listed. In the September period of Brumar Distribuție SRL the invoice `BRD-2026-00372` appears twice, with the `authorityId` values `5012300113` and `5012300114`. Both go into the import as two documents, and both count in the row `sales-standard`. The second copy gets the match state `duplicate`, and the difference of kind `duplicate` shows `-1142.90` VAT on that row. Do not merge the two copies: the rows would no longer equal the documents, and the import would be refused.

The next step is [Resolve a duplicate](https://etva.rdcopilot.com/docs/guides/resolve-a-duplicate/).

## Replace an import

A new import replaces all documents of the period. The differences are derived again; an id stays the same while the data behind it does not change. A link or an explanation that names a document or a difference that no longer exists is dropped. The period must be in the state `draft`: once the explanation file is approved or filed, the import is refused with `file_locked`. Withdraw the approval first.

## List the imports

Every import is kept as a record with its `kind` (`prefilled` or `postings`), its `source`, the time `at` and the `count` of documents or postings.

The list is newest first. The example is that of the September period of Brumar Distribuție SRL: first the postings of the ledger (`count` `13`, `ledger`), then the pre-filled import (`count` `15`, `e-factura`) that came before them.

curl

```bash
curl "$RDC_BASE_URL/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/imports?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/imports?limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/imports?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/imports?limit=20');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/imports?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "items": [
    {
      "id": "d5fd1de6-a22f-4847-a4ba-a99b33659b2c",
      "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
      "kind": "postings",
      "source": "ledger",
      "at": "2026-11-04T05:40:00Z",
      "count": 13
    },
    {
      "id": "e47ce4db-7a14-45cc-8771-4d1e9170dcc6",
      "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
      "kind": "prefilled",
      "source": "e-factura",
      "at": "2026-11-04T05:10:00Z",
      "count": 15
    }
  ],
  "nextCursor": null
}
```

The next import, the postings of your ledger, is in [Compare with your return](https://etva.rdcopilot.com/docs/guides/compare-with-your-return/). The fields are in the [imports reference](https://etva.rdcopilot.com/docs/api-reference/imports/).
