Skip to main content

certificatetemplatelabels

Each row represents a single label positioned on a certificate template: the placement (x, y), styling (font size, color, alignment), and which certificate field's value is rendered there. A template typically has many labels (one for the learner's name, one for the course title, one for the issue date, one for the unique identifier, and so on).

Full schema

View all columns and table relationships

Status group

Yes, this table includes a statusgroup column. See Status Group for details.

Column details

For columns that appear across many tables (id, companyid, createdat, updatedat, statusgroup, etc.), see Common Columns. The columns below are specific to certificate template labels.

certificatetemplateid: the id of the parent certificate template this label belongs to. Joins to certificatetemplates.id. Each template typically has multiple labels.

certificatefieldid: identifies which certificate field's value is rendered at this label's position. Joins to certificatefieldsblocks.id. Certificate fields define the actual data shown on a certificate (for example "Learner Name", "Course Title", "Issue Date", "Unique Identifier"). A given certificate field can only be placed on a template once (no duplicate fields per template).

certificatefieldshortid: the short identifier of the referenced certificate field within the company's certificate-fields configuration. Stays stable even if the field's label or settings are later updated.

shortid: a short identifier for the label within the parent template's label set. Stays stable even if the label's position or styling are later updated.

x and y: the position of the label on the certificate, in pixels measured from the top-left corner of the certificate asset.

fontsize: the font size used to render the label's text, in pixels. Minimum value is 5.

fontcolor: the font color, as a hex color string (always including the # prefix). For example: #000000 (black), #FFFFFF (white), #FF0000 (red). Both 3-digit and 6-digit hex forms are valid.

textalign

How the label's text is aligned relative to its x position. One of:

  • left: text is left-aligned (the x position is the start of the text).
  • center: text is centered horizontally around the x position.

Right-alignment is not supported.

Sample query

select
t.certificatetemplateid,
t.certificatefieldid,
t.x,
t.y,
t.fontsize,
t.fontcolor,
t.textalign
from certificatetemplatelabels as t
limit 100

Joining labels to their template

Each label belongs to a single template via certificatetemplateid:

select
ct.title as template_title,
ctl.x,
ctl.y,
ctl.fontsize,
ctl.fontcolor,
ctl.textalign
from certificatetemplatelabels as ctl
left join certificatetemplates as ct on ct.id = ctl.certificatetemplateid
limit 100

Joining labels to the certificate field they render

Each label references a certificate field. Join to certificatefieldsblocks to see the field's type and configured label:

select
ct.title as template_title,
cfb.label as field_label,
cfb.type as field_type,
ctl.x,
ctl.y,
ctl.fontsize,
ctl.textalign
from certificatetemplatelabels as ctl
left join certificatetemplates as ct on ct.id = ctl.certificatetemplateid
left join certificatefieldsblocks as cfb on cfb.id = ctl.certificatefieldid
limit 100