Evidence
The three records kept before approval: generation, validation and signing. Sign a validated return here.
On this page
Get the evidence of a return
GET /declarations/v1/returns/{returnId}/evidence
Returns the three records in the order they are made: generation, validation, signing. A record that does not exist yet is null. Each carries the hash of the artifact it covers and where it is kept.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
returnId | path | string (uuid) | Yesrequired | The return. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The evidence. | Evidence |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this data. | Error |
404 | The return does not exist in your account. | Error |
429 | Too many requests. Retry-After gives the seconds to wait; the request was not processed. | Error |
503 | The service cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/declarations/v1/returns/3b559a77-5de4-4b9a-9e2e-ca6625d123f2/evidence");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"returnId": "3b559a77-5de4-4b9a-9e2e-ca6625d123f2",
"revision": 4,
"generation": {
"at": "2026-11-19T09:05:00Z",
"snapshot": 1,
"generatorId": "declarations-generator",
"generatorVersion": "1.4.0",
"rulesetVersion": "2026.11",
"artifactHash": "sha256:1bd72ce4ad1013289b3f4350b4cb1a99480aa55f57c10cebb8c64434203aa38b",
"evidenceRef": "archive://declarations/brumar/2026-10/D300/v1/generation"
},
"validation": {
"at": "2026-11-19T09:06:00Z",
"validatorId": "declarations-validator",
"validatorVersion": "1.4.0",
"rulesetVersion": "2026.11",
"warnings": 0,
"artifactHash": "sha256:1bd72ce4ad1013289b3f4350b4cb1a99480aa55f57c10cebb8c64434203aa38b",
"evidenceRef": "archive://declarations/brumar/2026-10/D300/v1/validation"
},
"signing": {
"at": "2026-11-19T09:20:00Z",
"signedBy": {
"id": "adacf598-0e46-4866-a3c6-ba0234ecacc4",
"name": "Ioana Marin",
"role": "Chief accountant"
},
"signerId": "declarations-signer",
"signerVersion": "1.4.0",
"inputArtifactHash": "sha256:1bd72ce4ad1013289b3f4350b4cb1a99480aa55f57c10cebb8c64434203aa38b",
"signedArtifactHash": "sha256:a00eec95ee91fb7b6770aa59387c101dddb3f36eb60d902cc74c1a7ff7ecac6f",
"evidenceRef": "archive://declarations/brumar/2026-10/D300/v1/signing"
}
} Sign a return
POST /declarations/v1/returns/{returnId}/evidence/signing
Records the signing evidence of a validated return: who signed and when. The person must hold the signing right. It is refused while an error finding remains.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
returnId | path | string (uuid) | Yesrequired | The return. |
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 return you read. |
signedBy | string (uuid) | Yesrequired | The person who signs: the id of a person of your account who holds the signing right. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this data. | Error |
404 | The return does not exist in your account. | Error |
409 | revision_conflict: The return changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. invalid_status: The return is not in a status that allows this. | Error |
422 | blocked_by_findings: The return has an error finding. It cannot be signed, approved or filed while one remains. Nothing was changed. not_a_signer: The person may not sign returns of this company. | Error |
429 | Too many requests. Retry-After gives the seconds to wait; the request was not processed. | Error |
503 | The service cannot answer now. | Error |
Request
curl
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
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
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
$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#
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(); Response 202
{
"operationId": "6491ee32-5059-4639-bcbf-f33d64d78d07",
"status": "accepted",
"aggregateId": "3b559a77-5de4-4b9a-9e2e-ca6625d123f2",
"aggregateRevision": 7
}