Berikut di bawah ini gambaran proses keseluruhan terkait penggunaan API Central Sign. Modul Central Sign ini dapat digunakan untuk meng-integrasikan aplikasi yang dikembangkan dengan SADEWA (sadewa.jogjaprov.go.id), sehingga fitur TTE pada SADEWA dapat dimanfaatkan pada aplikasi yang akan diintegrasikan. OPD yang ingin melakukan implementasi Central Sign dapat melakukan request user API ke Diskominfo DIY dengan mengirimkan surat permohonan integrasi Central Sign Sadewa.
Upload Document
https://sadewa.jogjaprov.go.id/api/centralsign/document_upload [POST]
Authorization Basic Auth (username, password)
Body form-data
- file: attachmed pdf file
- name: document name
Response
{
"status": 200,
"response": {
"id": "xxxxxx-c788-40cf-8da7-xxxxxx",
"name": "Document name",
"path": "./public/central_sign/username/2024/06/1411840f-8053-4533-b6f3-xxxxxxxx.pdf",
"central_user_id": "231cd9ce-53bd-xxxx-91ac-xxxxxxx",
"updatedAt": "2024-06-25T08:50:38.348Z",
"createdAt": "2024-06-25T08:50:38.348Z"
}
}
Get Document Info
https://sadewa.jogjaprov.go.id/api/centralsign/document_info [POST]
Authorization Basic Auth (username, password)
Body JSON
{
"doc_id": "03495c52-c788-40cf-8da7-xxxxxxx"
}
Response:
{
"sign_info": {
"nama_dokumen": "xxxxxxxxxxxxxxxxa.pdf",
"jumlah_signature": 1,
"notes": "Dokumen valid, Sertifikat yang digunakan terpercaya",
"details": [
{
"info_tsa": {
"name": "Timestamp Authority Badan Siber dan Sandi Negara",
"tsa_cert_validity": null
},
"signature_field": "xxxxxxxxx",
"info_signer": {
"issuer_dn": "xxxxxxxxxx",
"signer_name": "xxxxxxx",
"signer_cert_validity": "2024-06-25 16:36:41.503 to 2024-06-25 16:36:41.503",
"signer_dn": "xxxxxxxx",
"cert_user_certified": true
},
"signature_document": {
"signed_using_tsa": xxxxx,
"reason": "xxxxxxxx",
"document_integrity": true,
"signature_value": null,
"signed_in": "2024-06-25 16:36:41.503",
"location": "xxxxxx,
"hash_value": null
}
}
],
"summary": "VALID"
},
"doc_info": {
"id": "xxxxxxxxxxxxx",
"name": "Document name",
"path": "./path/to/doc.pdf",
"createdAt": "2024-06-25T09:43:01.000Z",
"updatedAt": "2024-06-25T09:43:01.000Z",
"central_user_id": "xxxxxxx-xxxxxxx-xxxx-xx",
"CentralSigners": [
{
"id": "xxxxxxxxx",
"is_signed": true,
"visibility": "visible",
"pos_llx": 100,
"pos_lly": 100,
"pos_urx": 200,
"pos_ury": 200,
"page": null,
"createdAt": "2024-06-25T09:43:12.000Z",
"updatedAt": "2024-06-25T09:43:25.000Z",
"central_dokumen_id": "xxxxxxxxxxxxxx",
"nip": "xxxxxxxxxxxx"
}
]
}
}
Download Document
https://sadewa.jogjaprov.go.id/api/pdf/central-sign?path=./path/to/doc.pdf [GET]
Authorization Basic Auth (username, password)
Response (PDF file)
Add Signer
https://sadewa.jogjaprov.go.id/api/centralsign/add_signer [POST]
Authorization Basic Auth (username, password)
Body JSON
{
"visibility": "visible", // visible/invisible
"pos_llx": 100,
"pos_lly": 100,
"pos_urx": 200,
"pos_ury": 200,
"page": 1,
"nip": "19940727XXXXXXX",
"doc_id": "03495c52-c788-40cf-8da7-XXXXXXX"
}
Response
{
"status": 200,
"response": {
"id": "b6f0ffcf-4791-44f1-a2ea-7996f587c67e",
"is_signed": false,
"visibility": "visible",
"pos_llx": 100,
"pos_lly": 100,
"pos_urx": 200,
"pos_ury": 200,
"page": 1,
"nip": "19940727XXXXXXX",
"central_dokumen_id": "03495c52-c788-40cf-8da7-XXXXXXX",
"updatedAt": "2024-09-14T16:09:10.618Z",
"createdAt": "2024-09-14T16:09:10.618Z"
}
}
Berikut pengaturan positioning spesimen tanda tangan:
Sign Document
https://sadewa.jogjaprov.go.id/api/centralsign/sign_doc [POST]
Authorization Basic Auth (username, password)
Body JSON
{
"signer_id": "ae32f7c6-826a-4b93-85f1-xxxxxx",
"signer_passphrase": "xxxxxxxxxxxxxxxxx" // user must be registered on BSrE
}
Response
{
"status": 200,
"response": "Document signed successfully"
}