When GET to return data of document by document_template_id, recipients[ ] shows blank

  • 1
  • Problem
  • Updated 7 months ago
Hi,
I am using following body to sending request to upload a pdf file for sign:

"file":{
"name":"cont.pdf",
"source":"upload"
},
"document":{
"signer_sequencing":false,
"expires_in":12,
"name":"Sign me",
"roles":[
{
"name":"a",
"signer_name":"mike",
"signer_email":"example@gmail.com"
}
]
},
"sending_request": {}
}
And uploaded the file to upload_url and trigger the upload. Everything seems working fine. When GET by sending_request_id to check file status it returns:
{
"id":"cfa63cfe-bd2e-46c5-879d-04c86abbc092",
"status":"downloading",
"status_message":"File downloading",
"document_template_id":"0e816056-1311-4f0f-8fa2-d1c00b8108ba",
"created_at":"2018-04-03T06:52:59.723-07:00",
"updated_at":"2018-04-03T06:53:00.232-07:00"
}  
And when GET data for a document by document_template_id I am getting:

{
"document":
{
"id":"ae3f278c-724b-4666-b56e-1656a191bdc8",
"current_signer_id":null,
"name":null,
"filename":"4w2h1p-contract.pdf",
"executed_at":null,
"expired_at":null,
"sent_at":null,
"state":"draft",
"thumbnail_url":"https://rightsign-production.s3.amazonaws.com/base_files/processed//thumbnail_p1.png?AWSAccessKeyId=ASIAJHOAKPQGVXM5SOQA\u0026Expires=1522869654\u0026Signature=X95gZmtJaYOB2%2FfVX7H9s%2FWkiFQ%3D\u0026x-amz-security-token=FQoDYXdzEEsaDBnVX2%2Fu%2BanqzxJI8yK3A7RTMbODyUVmXpG4Oo5BMw1YTrDyGMHoQeDJ%2FQzgIP8d%2BrQkJcouYq0tRKkslYTRkmsMOIzDykMZ6udmxJJ%2BP6vQVC52OO7QKCP1JAfohsQIBiKl9I%2BcTgBSva9mZNIA%2BX4je%2F1c7pRIxH5%2F3UkK9V2sa614CKHAHYybSFMlM64vi4hPVSLb5icC1t9oacTe06GQoGBailc5XnSTy1C15jNdwL%2BlDbxFfYs%2F4g%2FazPF22hWzcZh7Ypx7XBoKNhjOr6b9Q%2BOX%2FlXvI%2BEYQvnPGDqLhxy7TnjJ1gwcKt9HCIBhvZjCF7CihN%2BMj5ChP2jWk8mAs6Y1yh%2FoKeRufj0Ds%2FIOLUKX0PciLlcDqebuz75Rg2INtpThAiWc1zpldcRngBVC0IsNGzhgQLFjYrQZy9KL6O6062adkJV7vy6WnqwZIKU9xSHlhqzPvZZqKidTFsmZzbzK9bJPJPJp0b0Ebl3uhweMWFIXGdH%2F2fx%2BZ432Y01fJeztU4xC%2BMXJ2g1dAGU374j6i6fZyiGAi5ipe3U0fMCF%2BPrt7Yce8KGg2gG6LQvx05A%2FmpLaUtMwefiO%2B29gUDhcq34o%2Bv6O1gU%3D",
"sender":
{
"id":"808ba19a-e161-41fe-bb76-ed8fb0bc804e",
"name":"abc",
"email":"abc@xyz.marketing",
"signer":false
},
"recipients":[],
"audits":[],
"page_image_urls":[],
"signed_pdf_url":null,
"tags":{},
"merge_field_values":[],
"embed_codes":null,
"in_person":false,
"shared_with":null,
"identity_method":"email",
"passcode_pin_enabled":false,
"original_file_url":null
}
}
Sender and file name is correct but recipients shows blank [ ]. And I am not getting any email with sign link. And file status also remains 'Processing'.

Not sure what goes wrong. It would be great if anyone look in to the issue and give me hints how it could work.

Thanks

Shahin
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like

Posted 7 months ago

  • 1
Photo of Bradford Shannon

Bradford Shannon, Employee

  • 5 Posts
  • 3 Reply Likes
Hi Shahin, 

What is the response you get from Step 4?

4. POST to /public/v1/sending_requests/:id/uploaded to trigger the processing of the uploaded base file.
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hello Bradford,

Thank you for your reply. I am getting following response in Step 4:
Response of POST to trigger upload file:

{
"id":"5cfeca07-69c0-4296-ba56-6fea2f8eebb5",
"status":"waiting_for_file",
"status_message":null,
"upload_url":"https://rightsignature-sr-production.s3.amazonaws.com/public_api/sending_requests/5cfeca07-69c0-4296-ba56-6fea2f8eebb5/4W2h1p-contract.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=ASIAJGJHQF6S5AUYAKQQ%2F20180404%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Date=20180404T123350Z\u0026X-Amz-Expires=3600\u0026X-Amz-Security-Token=FQoDYXdzEFwaDHgaRQI8us5fx7%2F2kSK3A7gOns%2BZNN8481nOQ83X4cEHhDw%2BY59fbcPu8WGJ8%2BD986RZYPgZ4AnZyqGAlu8xWGoXjvAIqqq2%2FMqe4SREbCNtwZVYnghCHnIGGcJ9Y%2F8KMeuXuRs4xwwhhhLJ97veU2qS1CC1TOqn7%2BI7rTj6LStrwD1EYmVtNulkNZRDquOEM%2BOpzPwCMhGCy9xPDLz3OwJF3e%2BTKVsypjmLklXPVuLQyW3DItsjggRw0ceWkvnZE%2FOtpqp4oGyku9D1qEf%2B2NWNlXgdROyyz20VRUyXTF4UFgKDEFmuZmlPYmLzUFXlqah2pjFpVtbQCI854SwmPbmf4Lz%2BcmTPYaqaliKMwE69G77tDhLq5PQljsiJ64hfc5q3TTeReLPVv3V1ozm5mqmmk8c5jwSanQ64CUZsZwONQ4UGcYUWPZkXSFzkLijee8Lz577%2ByQnL5eYAv6Tpn2jFhGWu78MeS1fDzQdckf7iB48HOY9Y2KI1RYDabBJLaAU%2FRmI5KhpgJCj24fd2fBgIOs1Yu%2FwACdepRzDBwNFrWiypIPtGWsFhFyp%2FD0sbsYjC9aGhFJF5jm0YxzhUZS%2BsAZ3g4Cko7NCS1gU%3D\u0026X-Amz-Signature=e4e21fb7f059ba6afde0fd8108797a7c11c8087a20c4beffd9d44917d43e9cb7\u0026X-Amz-SignedHeaders=Host\u0026x-amz-acl=private",
"document_template_id":null,
"created_at":"2018-04-04T05:33:49.803-07:00",
"updated_at":"2018-04-04T05:33:49.803-07:00"
}

File Status:

{
"id":"5cfeca07-69c0-4296-ba56-6fea2f8eebb5",
"status":"downloading",
"status_message":"File downloading",
"document_template_id":"445d7c3d-eaa5-4936-adc0-2d8aeabd216d",
"created_at":"2018-04-04T05:33:49.803-07:00",
"updated_at":"2018-04-04T05:33:50.294-07:00"
}
After refreshing I am getting:
After refreshing 

POST to trigger the uploaded file

{
"error":"Sending Request already processed.",
"error_description":null
}

File status

{
"id":"5cfeca07-69c0-4296-ba56-6fea2f8eebb5",
"status":"processing",
"status_message":"File successfully downloaded",
"document_template_id":"445d7c3d-eaa5-4936-adc0-2d8aeabd216d",
"created_at":"2018-04-04T05:33:49.803-07:00",
"updated_at":"2018-04-04T05:33:50.708-07:00"
}
Where file status shows 'File successfully downloaded' and 'Processing'. Hope it help.

Let me know if you need my code snippet to make sure i'm calling it right.

Thanks again

Shahin
Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 37 Posts
  • 6 Reply Likes
Hi Shahin,

I looked at your sending request and the base file processing is failing for reason - 'Invalid MIME TYPE'. Could you try uploading a simple pdf and process the sending request and check whether you are receiving a signing link in the email? If that works, then it has something to do with the pdf you are uploading.

Thanks
Saravanan
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hello Saravaan,

Thank you. I have a created a simple pdf and as well as a ms-word file to upload. I send a new request with a simple pdf and ms-word file.

File status for test.pdf file:
test.pdf file status:

{
"id":"aeaaf6b9-9442-4cfc-be7b-f418a4173b33",
"status":"processing",
"status_message":"File successfully downloaded",
"document_template_id":"9f7e51bb-1b2b-4979-baf2-feaff2058aa2",
"created_at":"2018-04-04T09:48:18.713-07:00",
"updated_at":"2018-04-04T09:48:19.276-07:00"
}
And file status for test.docx
test.docx file status

{
"id":"12fddfb6-324a-40d8-9a0e-8b9abba46238",
"status":"processing",
"status_message":"File successfully downloaded",
"document_template_id":"f8ab1a77-48b8-4f35-8d10-0d64a2d582c9",
"created_at":"2018-04-04T09:48:45.541-07:00",
"updated_at":"2018-04-04T09:48:46.243-07:00"
}

With finger cross I hope will get email with sign link. I'll update you whatever happen.

Thanks again.

Shahin
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hello Saravaan,

It's  almost 30mins I've uploaded the files. But didn't receive any email with sign link. I sent the request to two different email addresses but still no luck. It would be great if you could check them out to make sure sending request is good and what's causing not to get the email.

Thanks

shahin
Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 37 Posts
  • 6 Reply Likes
Shahin,

I am still seeing the same 'Invalid MIME type' for both of your files. I assume you are making PUT request to the upload url with your pdf/docs file. Also pls let us know how you are making that request?

Thanks
Saravanan
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hi Saravanan

I made another request. Could you please check it out?

To upload the file I'm using PUT. I'll send you the details how I'm sending the request and upload the file.

Thanks

Shahin
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hi Saravanan,

I resolve the issue and it's working. The pdf file was OK but problem with getting file to PUT method.

I was wondering why didn't it trigger any error when file failed to process? If I get the 'Invalid MIME type' error could've resolved it three days back without wasting your valuable time.


Thank you so much for the hints.

shahin
(Edited)
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hello Saravanan,

Sorry to bother you again. But I would like to know the pdf file has to be in 'upload' folder OR we can call it from any folder/sub-folder?

We are working on a loan application, where once client applied for a loan, a folder created with client id under a parent folder (say upload/clientid). Then we have several folder with different files for that specific client and one of the folder is 'contract' where 'contract.pdf' get saved once it is generated (ex. upload/clientid/contract/clientid-contract.pdf).

And we want to send 'contact.pdf' to client through Right Signature to sign the contract. As I mentioned you earlier you my test file was working as I was calling the file from a upload folder directly. Now when I am trying to call the 'contract.pdf' file from 'contract' folder it shows error:
{
  ["error"]=>
  string(117) "Invalid parameter 'source' value "upload/remote_file": Must be one of: upload, remote_file."
}
Does it mean all files has to be under 'upload' folder to send it to Right Signature? If it's then it's gonna be a big problem for us.

It would be great if you could clear the issue for me. The signing process was working so nice and we were so impressed with RS service. Now I am kind of stuck with 'upload' folder issue.

Looking forward to hearing from you soon.

Best Regards

Shahin
Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 37 Posts
  • 6 Reply Likes
Shahin,

In the name field, provide the name of your pdf and the source field should always be "upload" and it does not have to match the folder name.

Please refer here:
https://api.rightsignature.com/documentation/resources/v1/sending_requests/create.en.html

Thanks
Saravanan
Photo of Shahin Ahmed

Shahin Ahmed

  • 16 Posts
  • 1 Reply Like
Hi Saravanan,

Thank you so much for the reply. I tested with source:upload and during PUT i choose the file from different directory. And it's working :)

Also would like to know once signed by customer is it possible to view and download the signed pdf by API calling? Now I could view and download the file from our RS account documents dashboard. But we want our App admin could view and download the signed pdf from our App Admin Dashboard.

Thanks again and Best Regards

Shahin