---
title: "Imports | Docs | e-TVA Check by R&D Copilot"
description: "Send the pre-filled return and the postings of your ledger. A new import replaces the one before it."
canonical: "https://etva.rdcopilot.com/docs/api-reference/imports/"
language: en
updated: 2026-11-22
---

# Imports

Send the pre-filled return and the postings of your ledger. A new import replaces the one before it.

## Import the pre-filled return

POST `/etva/v1/periods/{periodId}/imports/prefilled`

Sends the pre-filled return: its four rows and the documents behind them. Each row must be the sum of its documents, or the import is refused and nothing changes. A new import replaces the documents of the period; links and explanations that name something that is gone are dropped.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `periodId` | path | `string (uuid)` | Yesrequired | The period. |

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
| `expectedRevision` | `integer` | Yesrequired | The revision of the period you read. |
| `prefilledOn` | `string (date)` | Yesrequired | The day the pre-filled return arrived. |
| `rows` | `ImportRow[]` | Yesrequired | The four rows of the pre-filled return, each once. Each must equal the sum of the documents that fall in it. |
| `rows[].rowId` | `string` | Yesrequired | The row. One of `sales-standard`, `sales-reduced`, `purchases-standard`, `purchases-reduced` |
| `rows[].base` | `string` | Yesrequired | The base of the row in the pre-filled return. |
| `rows[].vat` | `string` | Yesrequired | The VAT of the row in the pre-filled return. |
| `documents` | `object[]` | Yesrequired | The documents behind the rows. A document the authority lists twice is sent twice. |
| `documents[].number` | `string` | Yesrequired | The number of the document. |
| `documents[].direction` | `string` | Yesrequired | `sales` or `purchases`. One of `sales`, `purchases` |
| `documents[].partnerCif` | `string` | Yesrequired | The tax identifier of the other party as printed on the document, with its country prefix. |
| `documents[].partnerName` | `string` | Yesrequired | The name of the other party. |
| `documents[].date` | `string (date)` | Yesrequired | The date of the document. |
| `documents[].parts` | `object[]` | Yesrequired | One part for each rate on the document. |
| `documents[].parts[].rate` | `string` | Yesrequired | The VAT rate of this part of the document, in percent: the standard or the reduced rate. |
| `documents[].parts[].base` | `string` | Yesrequired | The net amount taxed at this rate. |
| `documents[].source` | `string` | Yesrequired | The system of the pre-filled return the document comes from. One of `e-factura`, `e-transport`, `e-saf-t`, `cash-register`, `customs`, `d390`, `d394` |
| `documents[].authorityId` | `string` | Yesrequired | The identifier the authority’s record of the document carries. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | The change was accepted. The body is the operation result: `aggregateId` is the period that was created or changed. | `OperationResult` |
| `400` | The request is not valid JSON or a field is missing or has the wrong type. | `Error` |
| `401` | The token is missing, not valid or has ended. | `Error` |
| `403` | The token does not give access to this data. | `Error` |
| `404` | The period does not exist in your account. | `Error` |
| `409` | `operation_reused`: The `operationId` was already used with a different request. `revision_conflict`: The period changed since the revision you sent. Nothing was applied. `file_locked`: The explanation file of the period is approved or filed, so the period no longer takes changes. | `Error` |
| `422` | `empty_import`: The import has no document. `unsupported_rate`: A document has a part at a rate the rows do not cover. The rows cover the standard and the reduced rate. `rows_do_not_add_up`: 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. | `Error` |
| `429` | The request was refused and not processed: the `code` is `rate_limited`. Wait the seconds in the header `Retry-After`, then send it again with the same `operationId`. | `Error` |
| `503` | The service cannot answer now: the `code` is `unavailable`. Send the request again with the same `operationId`. | `Error` |

### Request

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

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

## Import postings

POST `/etva/v1/periods/{periodId}/imports/postings`

Sends the postings of your ledger for the month, or the invoice-level data of your SAF-T return as postings with `source` `saf-t`. Your return is the sum of these postings. A new import replaces the postings of the month; the period compares against the source of its latest import.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `periodId` | path | `string (uuid)` | Yesrequired | The period. |

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
| `expectedRevision` | `integer` | Yesrequired | The revision of the period you read. |
| `source` | `string` | Yesrequired | `ledger` for the postings of your ledger, `saf-t` for the invoice-level data of your SAF-T return. One of `ledger`, `saf-t` |
| `postings` | `object[]` | Yesrequired | The postings of the month, each document once. |
| `postings[].number` | `string` | Yesrequired | The number of the document. |
| `postings[].direction` | `string` | Yesrequired | `sales` or `purchases`. One of `sales`, `purchases` |
| `postings[].partnerCif` | `string` | Yesrequired | The tax identifier of the other party as printed on the document, with its country prefix. |
| `postings[].partnerName` | `string` | Yesrequired | The name of the other party. |
| `postings[].date` | `string (date)` | Yesrequired | The date of the document. |
| `postings[].parts` | `object[]` | Yesrequired | One part for each rate on the document. |
| `postings[].parts[].rate` | `string` | Yesrequired | The VAT rate of this part of the document, in percent: the standard or the reduced rate. |
| `postings[].parts[].base` | `string` | Yesrequired | The net amount taxed at this rate. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | The change was accepted. The body is the operation result: `aggregateId` is the period that was created or changed. | `OperationResult` |
| `400` | The request is not valid JSON or a field is missing or has the wrong type. | `Error` |
| `401` | The token is missing, not valid or has ended. | `Error` |
| `403` | The token does not give access to this data. | `Error` |
| `404` | The period does not exist in your account. | `Error` |
| `409` | `operation_reused`: The `operationId` was already used with a different request. `revision_conflict`: The period changed since the revision you sent. Nothing was applied. `file_locked`: The explanation file of the period is approved or filed, so the period no longer takes changes. | `Error` |
| `422` | `empty_import`: The import has no document. `unsupported_rate`: A document has a part at a rate the rows do not cover. The rows cover the standard and the reduced rate. `duplicate_posting`: Two postings have the same number and partner. Nothing was imported. | `Error` |
| `429` | The request was refused and not processed: the `code` is `rate_limited`. Wait the seconds in the header `Retry-After`, then send it again with the same `operationId`. | `Error` |
| `503` | The service cannot answer now: the `code` is `unavailable`. Send the request again with the same `operationId`. | `Error` |

### Request

curl

```bash
curl -X POST "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
  "expectedRevision": 2,
  "source": "ledger",
  "postings": [
    {
      "number": "BRT-2026-00044",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    }
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
    "expectedRevision": 2,
    "source": "ledger",
    "postings": [
      {
        "number": "BRT-2026-00044",
        "direction": "sales",
        "partnerCif": "RO39172614",
        "partnerName": "Cofetăria Vălul Alb SRL",
        "date": "2026-07-04",
        "parts": [
          {
            "rate": "21",
            "base": "619.40"
          },
          {
            "rate": "11",
            "base": "2988.00"
          }
        ]
      },
      {
        "number": "LD-2026-3187",
        "direction": "purchases",
        "partnerCif": "RO51603546",
        "partnerName": "Brânzeturi Obcina SRL",
        "date": "2026-07-06",
        "parts": [
          {
            "rate": "11",
            "base": "9124.00"
          }
        ]
      },
      {
        "number": "AC-004402",
        "direction": "purchases",
        "partnerCif": "RO51603619",
        "partnerName": "Ambalaje Carpatin SRL",
        "date": "2026-07-10",
        "parts": [
          {
            "rate": "21",
            "base": "3887.00"
          }
        ]
      }
    ]
  }),
});
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/postings',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '6209510a-497a-47d9-8cc1-961d3560ddd3',
        'expectedRevision': 2,
        'source': 'ledger',
        'postings': [
            {
                'number': 'BRT-2026-00044',
                'direction': 'sales',
                'partnerCif': 'RO39172614',
                'partnerName': 'Cofetăria Vălul Alb SRL',
                'date': '2026-07-04',
                'parts': [
                    {
                        'rate': '21',
                        'base': '619.40',
                    },
                    {
                        'rate': '11',
                        'base': '2988.00',
                    },
                ],
            },
            {
                'number': 'LD-2026-3187',
                'direction': 'purchases',
                'partnerCif': 'RO51603546',
                'partnerName': 'Brânzeturi Obcina SRL',
                'date': '2026-07-06',
                'parts': [
                    {
                        'rate': '11',
                        'base': '9124.00',
                    },
                ],
            },
            {
                'number': 'AC-004402',
                'direction': 'purchases',
                'partnerCif': 'RO51603619',
                'partnerName': 'Ambalaje Carpatin SRL',
                'date': '2026-07-10',
                'parts': [
                    {
                        'rate': '21',
                        'base': '3887.00',
                    },
                ],
            },
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
  "expectedRevision": 2,
  "source": "ledger",
  "postings": [
    {
      "number": "BRT-2026-00044",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    }
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings');
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/postings");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
  "expectedRevision": 2,
  "source": "ledger",
  "postings": [
    {
      "number": "BRT-2026-00044",
      "direction": "sales",
      "partnerCif": "RO39172614",
      "partnerName": "Cofetăria Vălul Alb SRL",
      "date": "2026-07-04",
      "parts": [
        {
          "rate": "21",
          "base": "619.40"
        },
        {
          "rate": "11",
          "base": "2988.00"
        }
      ]
    },
    {
      "number": "LD-2026-3187",
      "direction": "purchases",
      "partnerCif": "RO51603546",
      "partnerName": "Brânzeturi Obcina SRL",
      "date": "2026-07-06",
      "parts": [
        {
          "rate": "11",
          "base": "9124.00"
        }
      ]
    },
    {
      "number": "AC-004402",
      "direction": "purchases",
      "partnerCif": "RO51603619",
      "partnerName": "Ambalaje Carpatin SRL",
      "date": "2026-07-10",
      "parts": [
        {
          "rate": "21",
          "base": "3887.00"
        }
      ]
    }
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
  "status": "accepted",
  "aggregateId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
  "aggregateRevision": 3
}
```

## List imports

GET `/etva/v1/periods/{periodId}/imports`

Returns the imports of a period, newest first: what was sent, from which source, when and how many documents it held.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `periodId` | path | `string (uuid)` | Yesrequired | The period. |
| `limit` | query | `integer` | Nooptional | Records per page, from 1 to 500. Default `100` Range `1` – `500` |
| `cursor` | query | `string` | Nooptional | The `nextCursor` of the previous page. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | A page of imports. | `ImportPage` |
| `401` | The token is missing, not valid or has ended. | `Error` |
| `403` | The token does not give access to this data. | `Error` |
| `404` | The period does not exist in your account. | `Error` |
| `429` | The request was refused and not processed: the `code` is `rate_limited`. Wait the seconds in the header `Retry-After`, then send it again with the same `operationId`. | `Error` |
| `503` | The service cannot answer now: the `code` is `unavailable`. Send the request again with the same `operationId`. | `Error` |

### Request

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

```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
}
```
