Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Receipts

    The file the authority returned for an accepted return, stored with its hash.

    On this page

    List receipts

    GET /declarations/v1/receipts

    Parameters

    NameInTypeRequiredMeaning
    companyId query string (uuid) Yesrequired The company whose records you want. It is the id of a company of your account.
    form query string Nooptional Only returns of this form. One of D300, D390, D394, D406
    period query string Nooptional Only this period, as YYYY-MM.
    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

    StatusMeaningBody
    200 A page of receipts. ReceiptPage
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The company 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/receipts?companyId=a79a302d-e7f0-4fde-9086-48c003b9709a&limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/receipts?companyId=a79a302d-e7f0-4fde-9086-48c003b9709a&limit=20`, {
      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/receipts?companyId=a79a302d-e7f0-4fde-9086-48c003b9709a&limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/receipts?companyId=a79a302d-e7f0-4fde-9086-48c003b9709a&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#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/declarations/v1/receipts?companyId=a79a302d-e7f0-4fde-9086-48c003b9709a&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": "c7170b80-c031-4d62-8818-7d4be2223cdf",
          "returnId": "bffa5db8-996e-4309-a693-d91075904265",
          "submissionId": "e368d9bf-b37c-4987-979b-0e7d66d6acef",
          "uploadIndex": "5013480112",
          "name": "recipisa-D300-2026-09-v1.pdf",
          "contentType": "application/pdf",
          "sha256": "34aae118094190a91f9948cb3bee8a0e14d9ffc82d5796c69e32f7659f0cdf6b",
          "storedAt": "2026-10-22T09:47:40Z"
        },
        {
          "id": "a9955f5a-44c4-4dfd-a17e-6032bb936190",
          "returnId": "188e602f-ac95-4698-a7b7-1be1e6dc2227",
          "submissionId": "fcd7a804-a4d1-4dec-bafb-74432359303e",
          "uploadIndex": "5013480118",
          "name": "recipisa-D390-2026-09-v1.pdf",
          "contentType": "application/pdf",
          "sha256": "a9d10e2b35c78ccf04374fd32b9e8148e5fa8cc6c53ce386f38ba2fb35653b44",
          "storedAt": "2026-10-22T10:17:40Z"
        },
        {
          "id": "679a8b44-d1c2-4923-af39-08aec3adbd25",
          "returnId": "8ced2143-3296-4997-b27b-4ee93ec13aa1",
          "submissionId": "4a9bfb0a-2b07-4b7c-a2e5-8e3505bfd295",
          "uploadIndex": "5013480131",
          "name": "recipisa-D394-2026-09-v1.pdf",
          "contentType": "application/pdf",
          "sha256": "94ebccfd00512436815a3e9bc1f52e181ad987a2db9a6d766cf21b3fce988426",
          "storedAt": "2026-10-26T10:42:40Z"
        },
        {
          "id": "4c6b9d25-68e1-46a6-99f9-e4993a807e40",
          "returnId": "2117dae0-ce0b-4500-afc9-54af48b708e9",
          "submissionId": "77a39eaf-1bcd-4530-98a7-5b776bd2d224",
          "uploadIndex": "5013480144",
          "name": "recipisa-D406-2026-09-v1.pdf",
          "contentType": "application/pdf",
          "sha256": "32cbe7672b848679899515612fe5a5ffabbfed3571a0c631dc688470f041e6e9",
          "storedAt": "2026-10-27T11:57:40Z"
        }
      ],
      "nextCursor": null
    }

    Get a receipt

    GET /declarations/v1/receipts/{receiptId}

    Returns the record the product stores for an accepted return: the file name, the upload index it answers and the SHA-256 of the stored file.

    Parameters

    NameInTypeRequiredMeaning
    receiptId path string (uuid) Yesrequired The receipt.

    Responses

    StatusMeaningBody
    200 The receipt. Receipt
    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 has no receipt. A receipt exists for an accepted return. 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/receipts/c7170b80-c031-4d62-8818-7d4be2223cdf" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/declarations/v1/receipts/c7170b80-c031-4d62-8818-7d4be2223cdf`, {
      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/receipts/c7170b80-c031-4d62-8818-7d4be2223cdf',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/declarations/v1/receipts/c7170b80-c031-4d62-8818-7d4be2223cdf');
    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/receipts/c7170b80-c031-4d62-8818-7d4be2223cdf");
    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

    {
      "id": "c7170b80-c031-4d62-8818-7d4be2223cdf",
      "returnId": "bffa5db8-996e-4309-a693-d91075904265",
      "submissionId": "e368d9bf-b37c-4987-979b-0e7d66d6acef",
      "uploadIndex": "5013480112",
      "name": "recipisa-D300-2026-09-v1.pdf",
      "contentType": "application/pdf",
      "sha256": "34aae118094190a91f9948cb3bee8a0e14d9ffc82d5796c69e32f7659f0cdf6b",
      "storedAt": "2026-10-22T09:47:40Z"
    }