Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Issue and renew certificates

    Read the certificate after completion and retain the old record when issuing a renewal assignment.

    On this page

    Read the issued certificate

    After the final quiz passes, read the assignment’s certificate. A 422 with certificate_unavailable means the assignment has no certificate. Use the last valid date in validUntil for status and renewal decisions.

    curl

    curl "$RDC_BASE_URL/elearning/v1/assignments/ASG-2025-0214/certificate" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/elearning/v1/assignments/ASG-2025-0214/certificate`, {
      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"]}/elearning/v1/assignments/ASG-2025-0214/certificate',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/elearning/v1/assignments/ASG-2025-0214/certificate');
    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")}/elearning/v1/assignments/ASG-2025-0214/certificate");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "id": "CRT-2025-0171",
      "issuedOn": "2025-11-20",
      "validUntil": "2026-11-20",
      "assignmentId": "ASG-2025-0214"
    }

    Assign after expiry

    Once status is expired, assign the course again to an eligible group. Keep both assignment IDs. The old certificate remains available for history, and the new assignment produces a certificate only at completion.

    curl

    curl -X POST "$RDC_BASE_URL/elearning/v1/assignments" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
      "expectedRevision": 0,
      "groupId": "logistics",
      "courseId": "receiving-goods",
      "dueOn": "2026-12-05",
      "mandatory": true
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/elearning/v1/assignments`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
        "expectedRevision": 0,
        "groupId": "logistics",
        "courseId": "receiving-goods",
        "dueOn": "2026-12-05",
        "mandatory": true
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/elearning/v1/assignments',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '4e08713a-ec34-4a5a-92d3-81fd425640ad',
            'expectedRevision': 0,
            'groupId': 'logistics',
            'courseId': 'receiving-goods',
            'dueOn': '2026-12-05',
            'mandatory': True,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
      "expectedRevision": 0,
      "groupId": "logistics",
      "courseId": "receiving-goods",
      "dueOn": "2026-12-05",
      "mandatory": true
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/elearning/v1/assignments');
    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")}/elearning/v1/assignments");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
      "expectedRevision": 0,
      "groupId": "logistics",
      "courseId": "receiving-goods",
      "dueOn": "2026-12-05",
      "mandatory": true
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
      "status": "accepted",
      "aggregateRevision": null
    }