Replace a certificate template
/products/{product_id}/certificate-templateReplaces the product's certificate template. Fields omitted from the request body are reset to their default values.
The certificate criteria, QR code position, and font must use one of the supported values.
Send the ETag returned by the retrieve operation in the If-Match header to avoid overwriting a newer version. Templates of replicated products are read-only.
Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.
In: header
Path Parameters
Header Parameters
Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Optional on this operation; when sent, a malformed key returns idempotency_key_invalid, and repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.
Expected revision of the resource, in the same format as the ETag header (W/"<type>:<id>:<revision>"). If the resource has changed since that revision, the request fails with 412 and the revision_mismatch error code. When omitted, the update is applied to the current revision.
Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.
length <= 64Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The certificate template of a product.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/products/string/certificate-template" \ -H "Content-Type: application/json" \ -d '{ "criteria": { "exam_id": "string", "kind": "completion", "percent": 0 }, "defaults": { "color": "string", "font": "arial" }, "enabled": true, "fields": [ { "key": "string", "label": "string", "source": "custom_field" } ], "layout": { "back_side_enabled": true, "background": "string", "fields": { "date": { "color": "string", "enabled": true, "font": "arial" }, "document": { "color": "string", "enabled": true, "font": "arial" }, "name": { "color": "string", "enabled": true, "font": "arial" }, "sequence": { "color": "string", "enabled": true, "font": "arial" } }, "qr": { "background_color": "string", "color": "string", "enabled": true, "position": "bottom-right" }, "show_dates": true, "show_product_name": true }, "object": "certificate_template", "product_id": "string", "revision": "string", "single_issue": true, "texts": { "content": "string", "instructor": "string", "workload": "string" } }'{ "data": { "criteria": { "exam_id": "string", "kind": "completion", "percent": 0 }, "defaults": { "color": "string", "font": "arial" }, "enabled": true, "fields": [ { "key": "string", "label": "string", "source": "custom_field" } ], "layout": { "back_side_enabled": true, "background": "string", "fields": { "date": { "color": "string", "enabled": true, "font": "arial" }, "document": { "color": "string", "enabled": true, "font": "arial" }, "name": { "color": "string", "enabled": true, "font": "arial" }, "sequence": { "color": "string", "enabled": true, "font": "arial" } }, "qr": { "background_color": "string", "color": "string", "enabled": true, "position": "bottom-right" }, "show_dates": true, "show_product_name": true }, "object": "certificate_template", "product_id": "string", "revision": "string", "single_issue": true, "texts": { "content": "string", "instructor": "string", "workload": "string" } }}Retrieve a certificate template GET
The certificate template has no ID of its own and is addressed through its product. The response includes an `ETag` representing the current revision of the product. Send this value in the `If-Match` header when replacing the template to avoid overwriting a newer version. Because the revision covers the whole product, other changes to the product also produce a new `ETag`.
Preview a certificate template POST
Renders a sample certificate from the product's current certificate template, using placeholder data. A preview is not an issued certificate: it does not appear in certificate listings or reports and cannot be verified through public validation. The response does not include a `file_id`; use `pdf_url` to access the rendered PDF. Templates of replicated products cannot be previewed.