BCdiploma Knowledge BaseBCdiploma Knowledge Base
User guide
Technical guide
API
Terms and Data
  • English
  • Français
  • Español
User guide
Technical guide
API
Terms and Data
  • English
  • Français
  • Español
  • API

    • How to use BCdiploma API
    • Automate issuing process
    • Deletions and revocations
    • Update
    • Template Management
    • Reference Table Management
    • Learning Pathway Management
    • Download
    • Data Export
    • Miscellaneous APIs
    • Management of errors

Reference Table Management

Update the Entries of a Reference Table

Tips

This API requires a management or administrator API key.

A template's reference tables are an integral part of its JSON definition. To make updating them easier, a dedicated endpoint lets you send only the new or modified entries, rather than the template's entire JSON.

Important

Modifying an existing entry updates all certificates already issued that refer to this key.

The update is performed via a PUT request to the endpoint [API-URL]/template/tables.

Required HTTP header: Content-Type: application/json

The request body is a JSON object containing the following required fields:

  • templateId: the identifier of the template containing the reference table
  • references: the list of entries to create or replace. Each entry consists of:
    • table: the name of the reference table, as defined in the template (for example ref_formation)
    • key: the entry's key, i.e. the value used in your import files when creating your campaigns
    • definition: an object containing the values associated with the key, for each column of the table
{
  "templateId": "1x04",
  "references": [
    {
      "table": "ref_formation",
      "key": "Digital Transformation",
      "definition": {
        "title_fr": "Transformation numérique",
        "title_en": "Digital Transformation"
      }
    },
    {
      "table": "ref_formation",
      "key": "Medical Statistics",
      "definition": {
        "title_fr": "Statistiques médicales",
        "title_en": "Medical Statistics"
      }
    }
  ]
}

Tips

  • the reference table must already exist in the template: it is not created by this call. You can check the structure of your reference tables by retrieving the template definition.
  • if the key already exists in the table, the entry is entirely replaced by the new definition. If the key does not exist, the entry is added.
  • the references list can contain as many entries as needed, including entries for several reference tables of the same template.

Warning

No check is performed on the content of the definition object: a missing or extra column does not raise an error. Make sure you provide exactly the columns expected by the reference table.

Propagation to the Staging Environment

If your license includes a staging environment, which is the case for all licenses except the Essentials plan, reference table updates made in production are automatically replicated to it at regular intervals (every hour).

Info

The order of the entries in the reference table is not guaranteed to be preserved during this propagation.

Prev
Template Management
Next
Learning Pathway Management