Hi @venky929 Welcome back to our community!
To retrieve a signed document using the Box Sign API, you can make a GET request to the specific endpoint that corresponds to the signed document. Make sure to include any necessary authentication credentials and parameters required by the API.
You may refer to the guide below:
- When you create a signing request, you will receive a response that includes the
document_id
of the signed document which you need to obtain. - Please ensure that the signing process is complete. You can check the status of the signing workflow using the API endpoint:
GET /sign_requests/{sign_request_id}
This will return the current status of the signing request, including whether it has been completed. - Once the document is signed, you can retrieve it using the following API endpoint:
GET /documents/{document_id}
Replace {document_id}
with the actual ID of the signed document. This request will return the signed document.
-
Check the response to ensure the document is returned in the correct format.
Here’s an example of how to retrieve a signed document:
GET https://api.box.com/2.0/documents/{document_id}
Authorization: Bearer YOUR_ACCESS_TOKEN
Let me know how it goes!
Hi @JeyBueno Box,
Thanks for the detailed response. Appreciate it.
when you say document id, i believe you are talking about the id under sign_files ->files node from the sign request response.
Attaching the response for reference. Can you please confirm if I am using the right id for fetching.
{
"is_document_preparation_needed": false,
"redirect_url": null,
"declined_redirect_url": null,
"are_text_signatures_enabled": true,
"signature_color": null,
"is_phone_verification_required_to_view": false,
"email_subject": "Sign Request for MSA",
"email_message": "Hello! Please sign the document below",
"are_reminders_enabled": false,
"signers":
{
"email": "demo@microsoft.com",
"role": "final_copy_reader",
"is_in_person": false,
"order": 0,
"verification_phone_number": null,
"embed_url_external_user_id": null,
"redirect_url": null,
"declined_redirect_url": null,
"login_required": false,
"has_viewed_document": false,
"signer_decision": null,
"signer_group_id": null,
"inputs": n],
"embed_url": null,
"iframeable_embed_url": null,
"suppress_notifications": false
},
{
"email": "demo@outlook.com",
"role": "signer",
"is_in_person": false,
"order": 1,
"verification_phone_number": null,
"embed_url_external_user_id": null,
"redirect_url": null,
"declined_redirect_url": null,
"login_required": false,
"has_viewed_document": false,
"signer_decision": null,
"signer_group_id": null,
"inputs": l],
"embed_url": null,
"iframeable_embed_url": null,
"suppress_notifications": false
},
{
"email": "demo@gmail.com",
"role": "signer",
"is_in_person": false,
"order": 2,
"verification_phone_number": null,
"embed_url_external_user_id": null,
"redirect_url": null,
"declined_redirect_url": null,
"login_required": false,
"has_viewed_document": false,
"signer_decision": null,
"signer_group_id": null,
"inputs": ],
"embed_url": null,
"iframeable_embed_url": null,
"suppress_notifications": false
}
],
"id": "97270a79-07ad-4b1e-b7cc-a0c81d7ab22a",
"prefill_tags": ],
"days_valid": 0,
"prepare_url": null,
"source_files": ],
"parent_folder": {
"id": "284989499339",
"etag": "0",
"type": "folder",
"sequence_id": "0",
"name": "My Sign Requests"
},
"name": "MSA",
"external_id": null,
"type": "sign-request",
"signing_log": null,
"status": "created",
"sign_files": {
"files": /
{
"id": "1651282432483",
"etag": "0",
"type": "file",
"sequence_id": "0",
"name": "MSA_Automation 2024-09-19 11:20:38.168772.pdf",
"sha1": "19ed84fd3dc94eabb35a44237c7d022a8d743194",
"file_version": {
"id": "1816342475683",
"type": "file_version",
"sha1": "19ed84fd3dc94eabb35a44237c7d022a8d743194"
}
}
],
"is_ready_for_download": true
},
"auto_expire_at": null,
"template_id": "72dcee4b-b13e-4e0e-beac-dcwt102ab6f60",
"external_system_name": null
}
I tried that in /document/{documentid} but it errored out with 404 Not found.
However, when i tried the /files/{file_id}/content, I am able to see the document but it is not signed.
Regards
Venky