Get document by ID from Zoho Sign
Table of Contents
Note:
- Each time the zoho.sign.getDocumentById integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.sign.getDocumentById integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
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
The KEY-VALUE response that represents the specified document's creation and ownership information.
10696000000014007
The NUMBER that represents the request ID of the document that will be fetched.
"sign_oauth_connection"
The TEXT that represents the link name of Zoho Sign 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"
}