Introduction
Welcome to eSigns API!
eSigns API use for create PDF or PDF/A-3 file with/without XML file attached and digital sign with your certificate from certificate authority or your self-sign certificate that you installed in eSigns.cloud account
eSigns API create from foundation of REST API by receive request bodies and send responses back with JSON data format and use HTTP response codes for the response.
Authentication
API Authorization please use below code:
# With shell, you can just pass the correct header with each request
curl "<api endpoint here>" \
-H "API-Key: <your api key>"
Please change
<your api key>
to your API Key
eSigns API use API Key for API authentication. API Key can request via email support@esigns.cloud
API Key is very importance (API Key = Username + Password) please keep it save and not keep it on where the other can access such as GitHub or client side code.
Request to eSigns API need to put API-Key at the header in every request. Please see below example:
API-Key: <your api key>
Every API request need to request via HTTPS. If request API via HTTP, the request will be rejected.
Digital Sign PDF/A-3 with XML attached
Create a PDF/A-3 with the XML file atttached and digital sign.
POST /documents/pdfa-xml/digitalsign
curl -X POST "https://api.esigns.cloud/documents/pdfa-xml/digitalsign" \
-H "Content-Type: multipart/form-data" \
-H "API-Key: <your api key>" \
-F "file=@<pdf file name>" \
-F "file=@<xml file name>"
Above command will response JSON data as a processing job detail.
This job id can use for asking processing status at Endpoint Jobs.
{
"id": "f718ec36-05be-4321-a037-3611dd978643",
"createdTime": "2021-03-23T14:47:03.3419559Z",
"status": "processing"
}
This endpoint is use for create PDF/A-3 with the XML file attached and
digital sign by certificate that user installed in eSigns.cloud account.
HTTP Request
POST https://api.esigns.cloud/documents/pdfa-xml/digitalsign
Request Body
Parameter | Type | Description | Required |
---|---|---|---|
file | Binary | PDF file | Yes |
file | Binary | XML file | Yes |
Jobs
Retreive a job
GET /jobs/{jobId}
curl "https://api.esigns.cloud/jobs/{jobId}" \
-H "Content-Type: application/json" \
-H "API-Key: <your api key>"
If file is not created complete,
Above command will response JSON data as a processing job detail.
{
"id": "e6d93be0-5fc7-4474-b64c-10bcd58a5bf4",
"createdTime": "2021-03-20T15:39:59.8281753Z",
"status": "processing"
}
If file is created complete,
Above command will response JSON data as a completed job detail.
This fileId can use for download file at Endpoint Files.
{
"id": "e6d93be0-5fc7-4474-b64c-10bcd58a5bf4",
"createdTime": "2021-03-20T15:39:59.8281753Z",
"lastUpdatedTime": "2021-03-20T15:41:59.8281753Z",
"fileId": "c2508592-90aa-45fc-af1d-ea3acd7e072b",
"fileSize": 208825,
"status": "complete"
}
This endpoint is use for asking processing file status.
If file is created complete, status value will be complete.
This fileId can use for download file at Endpoint Files.
HTTP Request
GET https://api.esigns.cloud/jobs/{jobId}
Files
Download a file
GET /files/{fileId}
curl "https://api.esigns.cloud/files/{fileId}" \
-H "Content-Type: application/json" \
-H "API-Key: <your api key>"
Above command will response file back
If request PDF file, the response will be show as below
{
"$content-type": "application/pdf",
"$content": "JVBERi0xLjQKJdPr6eEK..........."
}
If request XML file, the response will be show as below
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>...
This endpoint is use for download a file
by specific fileId that received after created file complete.
HTTP Request
GET https://api.esigns.cloud/files/{fileId}