Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Event catalogue

    Use assignment and certificate events to keep the training record in your HR system current.

    TypeWhen it occurs and what it carries
    com.rdcopilot.elearning.assignment.created.v1One event per newly assigned learner. Data is the assignment record.
    com.rdcopilot.elearning.assignment.completed.v1All required lessons are complete. Data is the assignment record.
    com.rdcopilot.elearning.certificate.issued.v1A course issues a certificate. Data is the certificate record.
    com.rdcopilot.elearning.certificate.expired.v1The last valid date has passed. Data is the certificate record.

    Deduplicate by event ID. An assignment and its certificate may arrive in separate deliveries. Read the current assignment to reconcile events, and keep a durable record of received IDs before acknowledging delivery.

    curl

    curl "$RDC_BASE_URL/elearning/v1/events" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

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

    PHP

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

    Response 200

    {
      "items": [
        {
          "event": {
            "specversion": "1.0",
            "id": "9d84cb4b-4032-4fd2-aa74-a9489ba68145",
            "type": "com.rdcopilot.elearning.certificate.issued.v1",
            "source": "/elearning/v1",
            "time": "2025-11-20T09:00:00Z",
            "customerOrgId": "brumar",
            "legalCompanyId": "brumar-distributie",
            "aggregateType": "assignment",
            "aggregateId": "ASG-2025-0214",
            "aggregateRevision": 5,
            "correlationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
            "causationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
            "actor": {
              "type": "user",
              "id": "radu-ionescu"
            },
            "data": {
              "id": "CRT-2025-0171",
              "issuedOn": "2025-11-20",
              "validUntil": "2026-11-20",
              "assignmentId": "ASG-2025-0214"
            }
          },
          "state": "parked"
        }
      ],
      "nextCursor": null
    }