Verify the signatures of a PDF
const url = 'https://api-sandbox.trustink.io/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"key":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-sandbox.trustink.io/verify \ --header 'Content-Type: application/json' \ --data '{ "key": "example" }'Validates every signature of the PDF uploaded under key with the EU DSS library and answers its report: per signature the signer, the indication (TOTAL_PASSED, INDETERMINATE, TOTAL_FAILED), the PAdES level, the eIDAS qualification (QESig…) and the timestamps; for the document its SHA-256 and whether TrustInk issued it (issuedByTrustInk). It trusts the TrustInk root and the EU trusted lists. The upload is deleted afterwards. See Verification.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "key": "example"}Responses
Section titled “ Responses ”The validation report.
object
object
object
Example
{ "signatures": [ { "indication": "TOTAL_PASSED", "level": "B-B" } ]}The request failed validation: validationErrors says where and why.
object
object
object
Examplegenerated
{ "message": "example", "validationErrors": [ { "instancePath": "example", "keyword": "example", "params": { "additionalProperty": "example" }, "message": "example" } ]}Nothing was uploaded under the key, the upload expired, or it was verified already. code: DOCUMENT_NOT_FOUND.
object
Examplegenerated
{ "code": "example", "message": "example"}The document is larger than 25 MB. code: DOCUMENT_TOO_LARGE.
object
Examplegenerated
{ "code": "example", "message": "example"}The upload is not a PDF, or its signatures cannot be read. code: NOT_A_PDF, UNREADABLE_DOCUMENT.
object
Examplegenerated
{ "code": "example", "message": "example"}Too many requests to the public routes: API Gateway throttles them (it answers {message} only); try again shortly.
object
Examplegenerated
{ "code": "example", "message": "example"}default
Section titled “default”Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.
object
Examplegenerated
{ "code": "example", "message": "example"}