Embed signature value (PostSign)
const url = 'https://api.test.certilia.com/jades/v1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"<token from ePotpis>","signatureFormat":"jades","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>","timeStamp":"<timeStamp 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/jades/v1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "<token from ePotpis>", "signatureFormat": "jades", "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>", "timeStamp": "<timeStamp from ePotpis>" } ] }'Embeds the signature value created in ePotpis in the prepared (presign) file and returns the signed document.
- Uses the eIDAS JAdES standard.
- Time stamping is optional. Available eIDAS levels: T, LT and LTA.
- One request can hold one or more signature values, each for its prepared file.
- 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, the same as in PreSign.
EIDAS signature level: b (B-B), t (B-T), lt (B-LT) or lta (B-LTA). Time stamping is optional;
t, lt and lta add a time stamp and need tsaAccess.
The signer’s X.509 certificate in hexadecimal, unchanged as received from ePotpis with the signed data
(signingData.userCertificate). A certificate in Base64 fails with POSTSIGN_BUILD_ERROR.
Access data for the AKD time-stamping service (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).
The signing time ePotpis sent with the signed data for this document (timeStamp), unchanged: a UTC date
and time as hex-encoded ASCII text (323032362D31312D31335432333A34323A34305A is
2026-11-13T23:42:40Z). The API writes it into the signature as the signing time.
Example
{ "token": "<token from ePotpis>", "signatureFormat": "jades", "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>", "timeStamp": "<timeStamp 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, for display to the user.
The signed document, Base64-encoded: a JWS in the JSON serialization (payload holds your JSON document,
signatures the signature with the signer’s certificate).
Document type, json.
Example
{ "token": "<token from ePotpis>", "documents": [ { "verificationCode": "00000000-0000-0000-0000-000000000001", "documentName": "Order 2026-0001.json", "mimeType": "json" } ]}The request contains invalid values, or another error occurred during PostSign.
All error codes are listed by GET /jades/errors. POSTSIGN_BUILD_ERROR means the signature could not
be embedded, for example because the prepared file has expired or userCertificate is not in hexadecimal.
Error response.
object
Error details.
object
Trace identifier. Send it to support when you report a problem.
Error type, the group the error belongs to.
Error code. Structure: the first character identifies the API (B for JAdES), the remaining characters
are the error number. Example: B111 is error 111 of the JAdES web API.
HTTP status code.
Public error name.
Localised error description, in Croatian or English. The language is set on the server; the default is
Croatian (HR).
Additional information about the error.
Language of description.
Public error name, the same as message (kept for compatibility).
Example
{ "error": { "type": "HG_GENERAL_ERROR", "code": "B111", "message": "POSTSIGN_BUILD_ERROR", "description": "PostSign error." }}