Embed signature value (PostSign)
const url = 'https://api.test.certilia.com/pades/v2';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"<token from ePotpis>","signatureFormat":"pades","signatureLevel":"lta","userCertificate":"<userCertificate from ePotpis>","tsaAccess":{"url":"https://tsa.test.certilia.com/qts","username":"<TSA username>","password":"<TSA password>"},"documents":[{"verificationCode":"00000000-0000-0000-0000-000000000001","hash":"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF","signedHash":"<signedHash from ePotpis>"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.test.certilia.com/pades/v2 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "<token from ePotpis>", "signatureFormat": "pades", "signatureLevel": "lta", "userCertificate": "<userCertificate from ePotpis>", "tsaAccess": { "url": "https://tsa.test.certilia.com/qts", "username": "<TSA username>", "password": "<TSA password>" }, "documents": [ { "verificationCode": "00000000-0000-0000-0000-000000000001", "hash": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF", "signedHash": "<signedHash from ePotpis>" } ] }'Embeds the signature value created in ePotpis into the prepared (presign) document and returns the signed PDF.
- Uses the eIDAS PAdES standard, levels B-B, B-T, B-LT and B-LTA (
signatureLevel). - For levels B-T, B-LT and B-LTA the API adds a time stamp from the AKD time-stamping service (TSA);
send its access data in
tsaAccess. - One request can hold one or more signature values, each for its prepared document.
- The API finds the stored prepared file and embeds the signature value. The prepared file is deleted after this call, whatever the result.
Authorizations
Odjeljak „Authorizations”Request Bodyrequired
Odjeljak „Request Bodyrequired”PostSign request. Holds the signature values to embed and the time-stamp settings.
object
EPotpis transaction token, the same as in PreSign.
Signature format. Always pades.
EIDAS PAdES baseline signature level:
b: B-B, without a time stamp.t: B-T, with a signature time stamp.lt: B-LT, B-T plus the data for long-term validation.lta: B-LTA, B-LT plus an archive time stamp.
Levels t, lt and lta need tsaAccess.
The signer’s X.509 certificate in hexadecimal, unchanged as received from ePotpis with the signed data
(signingData.userCertificate).
Access data for the AKD time-stamping service (TSA). Required for signature levels t, lt and lta.
The API uses only the AKD TSA. AKD issues the access data on request; the request form is on certilia.com.
object
TSA URL:
- Test:
https://tsa.test.certilia.com/qts - Production:
https://tsa.certilia.com/qts
TSA username.
TSA password.
One entry per signature value to embed.
One signature value and the document it belongs to.
object
Verification code, the same as in PreSign.
The hash that PreSign returned for this document.
The signature value for this hash, as received from ePotpis (signedHash).
Example
{ "token": "<token from ePotpis>", "signatureFormat": "pades", "signatureLevel": "lta", "userCertificate": "<userCertificate from ePotpis>", "tsaAccess": { "url": "https://tsa.test.certilia.com/qts", "username": "<TSA username>", "password": "<TSA password>" }, "documents": [ { "verificationCode": "00000000-0000-0000-0000-000000000001", "hash": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF", "signedHash": "<signedHash from ePotpis>" } ]}Responses
Odjeljak „Responses”The signed document(s).
PostSign response.
object
EPotpis transaction token, the same as in the request.
One entry per signed document.
One signed document.
object
Verification code, the same as in the request.
Document name, as sent in PreSign.
The signed PDF, Base64-encoded.
Document type. pdf for PAdES.
Example
{ "token": "<token from ePotpis>", "documents": [ { "verificationCode": "00000000-0000-0000-0000-000000000001", "documentName": "Contract 2026-001.pdf", "base64Document": "JVBERi0xLjcK...", "mimeType": "pdf" } ]}The request contains invalid values, or another error occurred during PostSign.
All error codes are listed by GET /pades/errors.
Error response.
object
Error details.
object
Trace identifier, if the response has one. Send it to support when you report a problem.
Error type, the group the error belongs to.
Error code. The first digit is the API code (6 for this API); the remaining digits are the error
number. Example: 65 is error 5 of API 6.
HTTP status code.
Public error name.
Error description, in Croatian. If a required field is missing from the request, type and code are
empty, message is ERROR, and this field lists the missing fields in English (for example
The Token field is required.).
Additional information about the error.
Language of description.
Public error name, the same as message (kept for compatibility).
Example
{ "error": { "type": "HL_INVALID_AUTHORIZATION_CREDENTIALS", "code": "664", "message": "INVALID_TSA_CREDENTIALS", "description": "Neispravni autorizacijski podaci." }}