Certificate
Una plantilla elegante para certificados de cursos, logros y premios.
Dimensiones: 1200x630
Template ID: certificate
Propiedades
| Propiedad | Tipo | Requerido | Long. Máxima | Validación |
|---|---|---|---|---|
recipientNameNombre del destinatario | string | Sí | 50 | maxLength(50) |
courseNameNombre del curso/logro | string | Sí | 60 | maxLength(60) |
descriptionDescripción | string | Sí | 100 | maxLength(100) |
completionDateFecha de finalización | string | Sí | 30 | maxLength(30) |
instructorNameNombre del instructor/firmante | string | Sí | 40 | maxLength(40) |
imageUrlURL del sello/logo | string (URL) | Sí | - | url (HTTPS only) |
primaryColorColor principal | string (hex) | Sí | - | color (hex) |
accentColorColor de acento | string (hex) | Sí | - | color (hex) |
Ejemplo
{
"template": "certificate",
"recipientName": "John Smith",
"courseName": "Advanced Web Development",
"description": "For successfully completing the course with distinction",
"completionDate": "March 7, 2026",
"instructorName": "Dr. Jane Anderson",
"imageUrl": "https://example.com/seal.png",
"primaryColor": "#1e3a8a",
"accentColor": "#d4af37"
}Ejemplos de código
const response = await fetch("https://assets.qbacode.com/api/v1/generate-asset", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"template": "certificate",
"recipientName": "John Smith",
"courseName": "Advanced Web Development",
"description": "For successfully completing the course with distinction",
"completionDate": "March 7, 2026",
"instructorName": "Dr. Jane Anderson",
"imageUrl": "https://example.com/seal.png",
"primaryColor": "#1e3a8a",
"accentColor": "#d4af37"
})
});
if (response.ok) {
const blob = await response.blob();
const imageUrl = URL.createObjectURL(blob);
document.getElementById("preview").src = imageUrl;
} else {
const error = await response.json();
console.error("Error:", error);
}