Skip to content

Verify the signatures of a PDF

POST
/verify
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.

Media typeapplication/json
object
key
required
string
/^verify\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.pdf$/
Examplegenerated
{
"key": "example"
}

The validation report.

Media typeapplication/json
object
documentSha256
required
string
issuedByTrustInk
required
boolean
validationTime
required
string
trustedListsIssuedAt
string
signatures
required
Array<object>
object
id
required
string
signedBy
string
signingTime
string
bestSignatureTime
string
indication
required
string
Allowed values: TOTAL_PASSED INDETERMINATE TOTAL_FAILED
subIndication
string
level
string
Allowed values: B-B B-T LT LTA
format
string
qualification
string
issuedByTrustInk
required
boolean
timestamps
required
Array<object>
object
type
string
producedBy
string
productionTime
string
indication
string
subIndication
string
qualification
string
errors
Array<string>
Example
{
"signatures": [
{
"indication": "TOTAL_PASSED",
"level": "B-B"
}
]
}

The request failed validation: validationErrors says where and why.

Media typeapplication/json
object
message
required
string
validationErrors
required
Array<object>
object
instancePath
required
string
keyword
required
string
params
required
object
key
additional properties
message
required
string
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.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

The document is larger than 25 MB. code: DOCUMENT_TOO_LARGE.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

The upload is not a PDF, or its signatures cannot be read. code: NOT_A_PDF, UNREADABLE_DOCUMENT.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Too many requests to the public routes: API Gateway throttles them (it answers {message} only); try again shortly.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}