8 Service APIs
This section provides a reference for APIs that should be implemented by this Building Block.
Last updated
Was this helpful?
This section provides a reference for APIs that should be implemented by this Building Block.
Last updated
Was this helpful?
A Set of microservices is defined to receive requests from other GovStack-compatible Building Blocks and third-party Services with relevant inputs and return processed results from key digital functionalities of this Building Block. This section provides a reference for APIs that should be implemented by this Building Block. The APIs defined here establish a blueprint for how the Building Block will interact with other Building Blocks or third-party services. Additional APIs may be implemented by the Building Block, but the listed APIs define a minimal set of functionality that should be provided by any implementation of this Building Block.
eSignature Building Block must expose its microservices through RESTful API interfaces as defined by OpenAPI v3+ standards. A summary of the APIS exposed by this Building Block is summarized in the table below.
The update API can be used to revoke the certificate. All revoked certificates will be available over OCSP.
Use one time Certificate and keys created on the fly to make an eSignature
/{version}/sign/onetime
API version
v1
JWT Authentication token received from ID BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
JWT Authentication token received from Payment BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
hash as byte array encoded in base64
53F4yGNsOXymuGL9JjF3/Qi377pQVLqkDZuc1shPJB3xFJHJnhW8yepjhU8ILTz/wYoahXnzKj8xyT7PtbtwEA==
Data to be displayed on users SCD (for ex transactionId)
Please sign the consent form as requested (transactionId: 1234)
Timestamp in ISO 8601
2023-03-20T09:12:28Z
Pre format the signature in a given format so that it can be inserted by the formatting library XAdES|CAdES|ASIC|JWS|PAdES
PAdES
XAdES
, CAdES
, ASIC
, JWS
, PAdES
hash type used SHA2-256|SHA2-384|SHA2-512|SHA3-256|SHA3-384|SHA3-512|BLAKE2B
SHA2-256
SHA2-256
, SHA2-384
, SHA2-512
, SHA3-256
, SHA3-384
, SHA3-512
, BLAKE2B
Create certificate on user's SCD (Signature Creation Device)
/{version}/cert/create
API version
v1
JWT Authentication token received from ID BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
JWT Authentication token received from Payment BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
Certificate Signing Request, in base64
Device token (Android/Apple) for REMOTE_SCD_APP* and REMOTE_SCD_APP_SE*, for other TBD
Key index to be used on SCD
Optional pseodonym chosen by user
Timestamp in ISO 8601
Remote SCD type REMOTE_SCD_APP_APPLE|REMOTE_SCD_APP_ANDROID|REMOTE_SCD_APP_SE_APPLE|REMOTE_SCD_APP_SE_ANDROID|REMOTE_SCD_SIM|REMOTE_SCD_ESIM
REMOTE_SCD_APP_APPLE
, REMOTE_SCD_APP_ANDROID
, REMOTE_SCD_APP_SE_APPLE
, REMOTE_SCD_APP_SE_ANDROID
, REMOTE_SCD_SIM
, REMOTE_SCD_ESIM
Get list of all user certificates
/{version}/cert/list
API version
v1
Add filter condition ALL|ACTIVATED|EXPIRED|REVOKED|SUSPENDED
ALL
ALL
, ACTIVATED
, EXPIRED
, REVOKED
, SUSPENDED
JWT Authentication token received from ID BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
Update certificate status
/{version}/cert/{certificateId}
API version
v1
certificateId that indicates the certificate to be updated
09440694c5c1798a23aad320abcd04b83f02f5ea12b8865df073d0e77ad5ae27
JWT Authentication token received from ID BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
Timestamp in ISO 8601
Use user's SCD (Signature Creation Device) to create an eSignature
/{version}/sign/pseudonym
API version
v1
JWT pseudonym token
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA
hash as byte array encoded in base64
53F4yGNsOXymuGL9JjF3/Qi377pQVLqkDZuc1shPJB3xFJHJnhW8yepjhU8ILTz/wYoahXnzKj8xyT7PtbtwEA==
Data to be displayed on users SCD (for ex transactionId)
Please sign the consent form as requested (transactionId: 1234)
hex string value of hash to mitigate replay attacks
d2dff00401c92ca6879ef5f0938ce31580898266d59832d8531e8d04fc3898a6
hex string value of hash used to maintain state between the request and the callback
2569cb4125cb7303f0f16782e7e2814b2269888c734af4c90639653e4f92d3a5
Timestamp in ISO 8601
2023-03-20T09:12:28Z
Pre format the signature in a give format so that it can be inserted by the formatting library XAdES|CAdES|ASIC|JWS|PAdES
PAdES
XAdES
, CAdES
, ASIC
, JWS
, PAdES
hash type used SHA2-256|SHA2-384|SHA2-512|SHA3-256|SHA3-384|SHA3-512|BLAKE2B
SHA2-256
SHA2-256
, SHA2-384
, SHA2-512
, SHA3-256
, SHA3-384
, SHA3-512
, BLAKE2B
Provide interactive html for pseodonym entry form that will get the signature via sign/pseudonym and will call callbackUrl
/{version}/sign/interactivePseudonym
API version
v1
Pre format the signature in a give format so that it can be more inserted by the formatting library XAdES|CAdES|ASIC|JWS|PAdES
PAdES
XAdES
, CAdES
, ASIC
, JWS
, PAdES
hash as byte array encoded in base64
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
hash type used SHA2-256|SHA2-384|SHA2-512|SHA3-256|SHA3-384|SHA3-512|BLAKE2B
SHA2-256
SHA2-256
, SHA2-384
, SHA2-512
, SHA3-256
, SHA3-384
, SHA3-512
, BLAKE2B
Data to be displayed on users SCD (for ex transactionId)
UGxlYXNlIHNpZ24gdGhlIGNvbnNlbnQgZm9ybSBhcyByZXF1ZXN0ZWQgKHRyYW5zYWN0aW9uSWQ6MTIzNCk
Timestamp in ISO 8601
2023-03-20T09%3A12%3A28Z
hex string value of hash to mitigate replay attacks
d2dff00401c92ca6879ef5f0938ce31580898266d59832d8531e8d04fc3898a6
hex string value of hash used to maintain state between the request and the callback
2569cb4125cb7303f0f16782e7e2814b2269888c734af4c90639653e4f92d3a5
Callback url to be sent on signing response. Callback URL will have query parameters from SignatureResponse statusCode(base64urlencoded), statusMessage(base64urlencoded), signature (base64urlencoded), certificate (base64urlencoded), signatureTimestamp (base64urlencoded), responseTimestamp (urlencoded), pseudonymToken (jwt)
https%3A%2F%2Fmysite
In order not to get the pseodonym token internally
/{version}/sign/response/{signatureId}
API version
v1
get signature response for signatureId
7607fa7f45b2558201baf05215521a7df63078774f0b0d1ad15ccfcb0aad9484
eSignature BB will call this callback URL on external service once signing is completed
/{version}/esignature/callback
API version
v1
signatureId that can be used to retreive the response as hex string of hash
7607fa7f45b2558201baf05215521a7df63078774f0b0d1ad15ccfcb0aad9484
hex string value of hash to mitigate replay attacks
d2dff00401c92ca6879ef5f0938ce31580898266d59832d8531e8d04fc3898a6
hex string value of hash used to maintain state between the request and the callback
2569cb4125cb7303f0f16782e7e2814b2269888c734af4c90639653e4f92d3a5
Way for users and auditors to review the signature requests made
/{version}/audit/log
API version
v1
Timestamp in ISO 8601
2023-03-20T09%3A12%3A28Z
Timestamp in ISO 8601
2023-03-20T09%3A12%3A28Z
JWT Authentication token received from ID BB
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjcyNzcyYzI5OGNkZDNmYmQ3YmQxNmI5NTAxZDY0ODdiIn0.eyJwdWIiOiJKb2huIERvZSJ9.zNNhLDuydPHC7-YQYDhaGTaqS-efAL79pJXdWWm5Y7Fd94fVRCLvRTaA16ffQyhYPXHKcx8Q9baTB_fX0PtBuA