---
title: "Aprobă și depune | Documentație | Tax Filing by R&D Copilot"
description: "Semnează, aprobă și depune o declarație validată și urmărește-o până la răspunsul autorității."
canonical: "https://declarations.rdcopilot.com/ro/docs/guides/approve-and-file/"
language: ro
updated: 2026-11-22
---

# Aprobă și depune

Semnează, aprobă și depune o declarație validată și urmărește-o până la răspunsul autorității.

Trei pași stau între o declarație validată și autoritate: cineva semnează, altcineva aprobă, iar declarația este depusă. Fiecare pas înregistrează cine l-a făcut și când și refuză dacă declarația nu este pregătită.

## Semnează

Trimite `id`\-ul persoanei care semnează ca `signedBy`. Persoana trebuie să aibă dreptul de semnare; altfel răspunsul este `not_a_signer`. Declarația devine `signed`, iar dovada semnării este înregistrată.

curl

```bash
curl -X POST "$RDC_BASE_URL/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence/signing" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "6491ee32-5059-4639-bcbf-f33d64d78d07",
  "expectedRevision": 6,
  "signedBy": "adacf598-0e46-4866-a3c6-ba0234ecacc4"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence/signing`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "6491ee32-5059-4639-bcbf-f33d64d78d07",
    "expectedRevision": 6,
    "signedBy": "adacf598-0e46-4866-a3c6-ba0234ecacc4"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence/signing',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '6491ee32-5059-4639-bcbf-f33d64d78d07',
        'expectedRevision': 6,
        'signedBy': 'adacf598-0e46-4866-a3c6-ba0234ecacc4',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "6491ee32-5059-4639-bcbf-f33d64d78d07",
  "expectedRevision": 6,
  "signedBy": "adacf598-0e46-4866-a3c6-ba0234ecacc4"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence/signing');
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")}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence/signing");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "6491ee32-5059-4639-bcbf-f33d64d78d07",
  "expectedRevision": 6,
  "signedBy": "adacf598-0e46-4866-a3c6-ba0234ecacc4"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "6491ee32-5059-4639-bcbf-f33d64d78d07",
  "status": "accepted",
  "aggregateId": "3b559a77-5de4-4b9a-9e2e-ca6625d123f2",
  "aggregateRevision": 7
}
```

## Aprobă

Trimite `id`\-ul aprobatorului ca `approvedBy`. Aprobatorul trebuie să aibă dreptul de aprobare și să nu fie persoana care a semnat (`self_approval`). Declarația devine `authorized`.

curl

```bash
curl -X POST "$RDC_BASE_URL/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/approval" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "36ef1b08-90df-4b5d-946f-33b8ad4f29ed",
  "expectedRevision": 7,
  "approvedBy": "a0eaa217-d9ed-4f3e-b95a-c4b3176cf035"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/approval`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "36ef1b08-90df-4b5d-946f-33b8ad4f29ed",
    "expectedRevision": 7,
    "approvedBy": "a0eaa217-d9ed-4f3e-b95a-c4b3176cf035"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/approval',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '36ef1b08-90df-4b5d-946f-33b8ad4f29ed',
        'expectedRevision': 7,
        'approvedBy': 'a0eaa217-d9ed-4f3e-b95a-c4b3176cf035',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "36ef1b08-90df-4b5d-946f-33b8ad4f29ed",
  "expectedRevision": 7,
  "approvedBy": "a0eaa217-d9ed-4f3e-b95a-c4b3176cf035"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/approval');
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")}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/approval");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "36ef1b08-90df-4b5d-946f-33b8ad4f29ed",
  "expectedRevision": 7,
  "approvedBy": "a0eaa217-d9ed-4f3e-b95a-c4b3176cf035"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "36ef1b08-90df-4b5d-946f-33b8ad4f29ed",
  "status": "accepted",
  "aggregateId": "3b559a77-5de4-4b9a-9e2e-ca6625d123f2",
  "aggregateRevision": 8
}
```

## Depune

Depunerea pune declarația în coadă și o încarcă într-o singură acțiune. Răspunsul este `accepted`, iar declarația este `submitted` cu indexul de încărcare dat de autoritate.

curl

```bash
curl -X POST "$RDC_BASE_URL/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "800ebcec-00c4-4bf8-af9b-5019046edc00",
  "expectedRevision": 5
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "800ebcec-00c4-4bf8-af9b-5019046edc00",
    "expectedRevision": 5
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '800ebcec-00c4-4bf8-af9b-5019046edc00',
        'expectedRevision': 5,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "800ebcec-00c4-4bf8-af9b-5019046edc00",
  "expectedRevision": 5
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission');
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")}/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "800ebcec-00c4-4bf8-af9b-5019046edc00",
  "expectedRevision": 5
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "800ebcec-00c4-4bf8-af9b-5019046edc00",
  "status": "accepted",
  "aggregateId": "6e1e206c-d65e-48d6-8fa8-628da226d100",
  "aggregateRevision": 6
}
```

## Urmărește răspunsul

Întreabă autoritatea în ce stadiu se află încărcarea, cu [refreshSubmission](https://declarations.rdcopilot.com/ro/docs/api-reference/submissions/#refresh-submission), sau așteaptă evenimentul. Primul apel mută o declarație `submitted` în `processing` (în prelucrare); următorul dă răspunsul: `accepted` (ok) cu recipisa sau `rejected` (nok) cu mesajul.

curl

```bash
curl -X POST "$RDC_BASE_URL/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission/refresh" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "f7f97d0a-f0e5-4a45-a412-8a71910acd77",
  "expectedRevision": 6
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission/refresh`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "f7f97d0a-f0e5-4a45-a412-8a71910acd77",
    "expectedRevision": 6
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission/refresh',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'f7f97d0a-f0e5-4a45-a412-8a71910acd77',
        'expectedRevision': 6,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "f7f97d0a-f0e5-4a45-a412-8a71910acd77",
  "expectedRevision": 6
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission/refresh');
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")}/declarations/v1/returns/6e1e206c-d65e-48d6-8fa8-628da226d100/submission/refresh");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "f7f97d0a-f0e5-4a45-a412-8a71910acd77",
  "expectedRevision": 6
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "f7f97d0a-f0e5-4a45-a412-8a71910acd77",
  "status": "accepted",
  "aggregateId": "6e1e206c-d65e-48d6-8fa8-628da226d100",
  "aggregateRevision": 7
}
```

## Când rezultatul este necunoscut

Dacă încărcarea depășește timpul de așteptare și produsul nu poate stabili dacă fișierul a ajuns, declarația este `manual_review`. Verifică la autoritate și trimite-o din nou o singură dată cu [resendSubmission](https://declarations.rdcopilot.com/ro/docs/api-reference/submissions/#resend-submission); noua încărcare primește următorul index, iar încercarea anterioară rămâne în istoric.

curl

```bash
curl -X POST "$RDC_BASE_URL/declarations/v1/returns/e0a7f7b8-c7cd-46bc-9053-95e250975d06/submission/resend" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "b083c6be-6a99-487b-ae79-e047223782a3",
  "expectedRevision": 7
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/returns/e0a7f7b8-c7cd-46bc-9053-95e250975d06/submission/resend`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "b083c6be-6a99-487b-ae79-e047223782a3",
    "expectedRevision": 7
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/declarations/v1/returns/e0a7f7b8-c7cd-46bc-9053-95e250975d06/submission/resend',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'b083c6be-6a99-487b-ae79-e047223782a3',
        'expectedRevision': 7,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "b083c6be-6a99-487b-ae79-e047223782a3",
  "expectedRevision": 7
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/returns/e0a7f7b8-c7cd-46bc-9053-95e250975d06/submission/resend');
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")}/declarations/v1/returns/e0a7f7b8-c7cd-46bc-9053-95e250975d06/submission/resend");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "b083c6be-6a99-487b-ae79-e047223782a3",
  "expectedRevision": 7
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "b083c6be-6a99-487b-ae79-e047223782a3",
  "status": "accepted",
  "aggregateId": "e0a7f7b8-c7cd-46bc-9053-95e250975d06",
  "aggregateRevision": 8
}
```
