Get document by ID from Zoho Sign
Table of Contents
Overview
The zoho.sign.getDocumentById task is used to fetch a document from Zoho Sign using its ID. This task is based on the Zoho Sign API - Get details of a particular document.
Syntax
<response> = zoho.sign.getDocumentById(<request_id>, <connection>);
where:
Params> | Data type | Description |
<response> | KEY-VALUE | The response returned by Zoho Sign that contains the specified document's creation and ownership information. |
<request_id> | NUMBER | The request ID of the document that will be downloaded. |
<connection> | TEXT | The link name of the connection. Note:
|
Example: Fetch a document using its request ID
The following script fetches the specified Zoho Sign document:
response = zoho.sign.getDocumentByID(10696000000014007,"sign_oauth_connection");
where:
response
10696000000014007
"sign_oauth_connection"
Response Format
Success Response
- The success response will be returned in the following format:{
"code": 0,
"requests": {
"request_status": "completed",
"notes": "",
"attachments": [
],
"reminder_period": 5,
"owner_id": "10696000000009003",
"description": "",
"request_name": "AddFields_take1",
"modified_time": 1573465341353,
"action_time": 1573465457604,
"is_deleted": false,
"expiration_days": 15,
"is_sequential": false,
"sign_submitted_time": 1573465341406,
"owner_first_name": "shawn",
"sign_percentage": 100,
"expire_by": 1574792940000,
"owner_email": "shawn.bp@zylker.com",
"created_time": 1573036357477,
"email_reminders": true,
"document_ids": [
{
"document_name": "sample.pdf",
"document_size": 2953,
"document_order": "0",
"total_pages": 2,
"document_id": "10696000000014001"
}
],
"self_sign": false,
"in_process": false,
"validity": -1,
"request_type_name": "Others",
"request_id": "10696000000014007",
"request_type_id": "10696000000000187",
"owner_last_name": "shawn",
"actions": [
{
"verify_recipient": false,
"action_type": "SIGN",
"recipient_email": "shawn.bp@zylker.com",
"allow_signing": false,
"recipient_phonenumber": "",
"is_bulk": false,
"action_id": "10696000000016002",
"is_revoked": false,
"is_embedded": false,
"signing_order": -1,
"fields": [
{
"field_id": "10696000000016004",
"x_coord": 3,
"field_type_id": "10696000000000047",
"abs_height": 5,
"field_category": "image",
"field_label": "Signature",
"is_mandatory": true,
"page_no": 1,
"document_id": "10696000000014001",
"field_name": "Signature",
"y_value": 0.378788,
"abs_width": 18,
"action_id": "10696000000016002",
"width": 2.941177,
"y_coord": 3,
"field_type_name": "Signature",
"description_tooltip": "",
"x_value": 0.490197,
"height": 0.631314
}
],
"recipient_name": "shawn",
"action_status": "SIGNED",
"recipient_countrycode": ""
}
],
"attachment_size": 0
},
"message": "Document has been retrieved",
"status": "success"
}