Certyfikaty
Endpointy „Certyfikaty” Zanfia Workspace API — ze schematami i przykładami kodu.
Certyfikaty ukończenia kursu i szablony, z których są renderowane. Wystawianie jest asynchroniczne: POST /certificates/issue waliduje paczkę, pomija klientów, którzy już mają certyfikat, i kolejkuje jedno zadanie na klienta — render PDF i e-mail z certyfikatem dzieją się w tle, więc odpowiedź to 202 z samymi licznikami. Odpytuj GET /certificates?productId=…, aż pojawi się wiersz klienta. Pojedyncze wystawienie to to samo wywołanie z jednym clientId. Certyfikaty adresowane są publicznym id poświadczenia (cert_…); unieważnienie da się cofnąć przez przywrócenie. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.
Lista certyfikatów
/certificatesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Query Parameters
Course product id — omit for all courses.
1 <= lengthMax rows, newest first (max 500; the service default applies when omitted).
0 < value <= 500Response Body
application/json
application/json
curl -X GET "https://example.com/certificates"{ "certificates": [ { "id": "string", "certificateId": "string", "workspaceId": "string", "productId": "string", "courseId": "string", "clientId": "string", "recipientName": "string", "recipientEmail": "string", "courseName": "string", "issuerName": "string", "completionDate": "string", "issuedAt": "string", "issuedBy": "manual", "templateId": "string", "templateVersion": 0, "certificateHash": "string", "pdfStoragePath": "string", "pdfPublicUrl": "string", "verificationUrl": "string", "status": "active", "revokedAt": "string", "expiresAt": "string", "engagement": { "emailStatus": "submitted", "emailStatusAt": "string", "firstViewedAt": "string", "lastViewedAt": "string", "viewCount": 0, "downloadedAt": "string", "linkedInAddedAt": "string" } } ]}{ "error": "string", "message": "string"}Wystaw certyfikaty (asynchronicznie)
/certificates/issueAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/certificates/issue" \ -H "Content-Type: application/json" \ -d '{ "productId": "string", "clientIds": [ "string" ] }'{ "enqueued": 0, "skippedExistingCertificate": 0}{ "error": "string", "message": "string"}Lista szablonów certyfikatów
/certificates/templatesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/certificates/templates"{ "templates": [ { "id": "string", "workspaceId": "string", "name": "string", "version": 0, "template": { "basePdf": null, "schemas": [ null ] }, "isDefault": true, "designConfig": { "preset": "elegant", "accentColor": "string", "typeface": "serif", "locale": "en", "wording": { "title": "string", "presentedToLabel": "string", "completedLabel": "string", "issuedByLabel": "string" }, "signature": { "enabled": true, "name": "string" }, "elements": { "logo": true, "completionDate": true, "credentialId": true, "verificationQr": true, "customText": true }, "logo": { "dataUri": "string", "width": 0, "height": 0, "size": "sm" } }, "createdAt": "string", "updatedAt": "string" } ]}{ "error": "string", "message": "string"}Utwórz szablon certyfikatu
/certificates/templatesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/certificates/templates" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "template": { "id": "string", "workspaceId": "string", "name": "string", "version": 0, "template": { "basePdf": null, "schemas": [ null ] }, "isDefault": true, "designConfig": { "preset": "elegant", "accentColor": "string", "typeface": "serif", "locale": "en", "wording": { "title": "string", "presentedToLabel": "string", "completedLabel": "string", "issuedByLabel": "string" }, "signature": { "enabled": true, "name": "string" }, "elements": { "logo": true, "completionDate": true, "credentialId": true, "verificationQr": true, "customText": true }, "logo": { "dataUri": "string", "width": 0, "height": 0, "size": "sm" } }, "createdAt": "string", "updatedAt": "string" }}{ "error": "string", "message": "string"}Szczegóły szablonu certyfikatu
/certificates/templates/{templateId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/certificates/templates/string"{ "template": { "id": "string", "workspaceId": "string", "name": "string", "version": 0, "template": { "basePdf": null, "schemas": [ null ] }, "isDefault": true, "designConfig": { "preset": "elegant", "accentColor": "string", "typeface": "serif", "locale": "en", "wording": { "title": "string", "presentedToLabel": "string", "completedLabel": "string", "issuedByLabel": "string" }, "signature": { "enabled": true, "name": "string" }, "elements": { "logo": true, "completionDate": true, "credentialId": true, "verificationQr": true, "customText": true }, "logo": { "dataUri": "string", "width": 0, "height": 0, "size": "sm" } }, "createdAt": "string", "updatedAt": "string" }}{ "error": "string", "message": "string"}Aktualizuj szablon certyfikatu
/certificates/templates/{templateId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/certificates/templates/string" \ -H "Content-Type: application/json" \ -d '{}'{ "template": { "id": "string", "workspaceId": "string", "name": "string", "version": 0, "template": { "basePdf": null, "schemas": [ null ] }, "isDefault": true, "designConfig": { "preset": "elegant", "accentColor": "string", "typeface": "serif", "locale": "en", "wording": { "title": "string", "presentedToLabel": "string", "completedLabel": "string", "issuedByLabel": "string" }, "signature": { "enabled": true, "name": "string" }, "elements": { "logo": true, "completionDate": true, "credentialId": true, "verificationQr": true, "customText": true }, "logo": { "dataUri": "string", "width": 0, "height": 0, "size": "sm" } }, "createdAt": "string", "updatedAt": "string" }}{ "error": "string", "message": "string"}Usuń szablon certyfikatu
/certificates/templates/{templateId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/certificates/templates/string"{ "deleted": true}{ "error": "string", "message": "string"}Unieważnij certyfikat
/certificates/{certificateId}/revokeAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/certificates/string/revoke"{ "certificate": { "id": "string", "certificateId": "string", "workspaceId": "string", "productId": "string", "courseId": "string", "clientId": "string", "recipientName": "string", "recipientEmail": "string", "courseName": "string", "issuerName": "string", "completionDate": "string", "issuedAt": "string", "issuedBy": "manual", "templateId": "string", "templateVersion": 0, "certificateHash": "string", "pdfStoragePath": "string", "pdfPublicUrl": "string", "verificationUrl": "string", "status": "active", "revokedAt": "string", "expiresAt": "string", "engagement": { "emailStatus": "submitted", "emailStatusAt": "string", "firstViewedAt": "string", "lastViewedAt": "string", "viewCount": 0, "downloadedAt": "string", "linkedInAddedAt": "string" } }}{ "error": "string", "message": "string"}Przywróć certyfikat
/certificates/{certificateId}/reinstateAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/certificates/string/reinstate"{ "certificate": { "id": "string", "certificateId": "string", "workspaceId": "string", "productId": "string", "courseId": "string", "clientId": "string", "recipientName": "string", "recipientEmail": "string", "courseName": "string", "issuerName": "string", "completionDate": "string", "issuedAt": "string", "issuedBy": "manual", "templateId": "string", "templateVersion": 0, "certificateHash": "string", "pdfStoragePath": "string", "pdfPublicUrl": "string", "verificationUrl": "string", "status": "active", "revokedAt": "string", "expiresAt": "string", "engagement": { "emailStatus": "submitted", "emailStatusAt": "string", "firstViewedAt": "string", "lastViewedAt": "string", "viewCount": 0, "downloadedAt": "string", "linkedInAddedAt": "string" } }}{ "error": "string", "message": "string"}Usuń unieważniony certyfikat
/certificates/{certificateId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/certificates/string"{ "deleted": true}{ "error": "string", "message": "string"}Wyślij ponownie e-mail z certyfikatem
/certificates/{certificateId}/resend-emailAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/certificates/string/resend-email"{ "property1": null, "property2": null}{ "error": "string", "message": "string"}Czy ten artykuł był pomocny?

