How to esign a document with customer's signature using cURL

Hello,

I’m struggling to figure out how to do the following via API based on the documentation provided:

  1. Uploading a file: I created an internal storage in my GroupDocs dashboard to temporarily store my files but I can’t figure out how to get the path to that storage. I’m also assuming that’s the ‘storageName’ parameter I’m supposed to provide?

  2. Create signatures: I’m looking to have the end user sign a document using either a handwritten signature or an electronic signature that spells out their name. Which of the signature types should I use? It’s a bit confusing whether to use image signature, text signature, or something else based on the examples provided.

  3. Create tags in document before signing: How do tags work in GroupDocs and how do I indicate where I want a given signature to be in the document? I haven’t seen anything talking about that and it just makes me wonder where the signatures will show up / how to specify where they are captured? Also, how would you do this for a Word or a PDF document via API? Is it the same approach or are they different?

  4. Webhook: Is there a webhook that can be used to check the status of a given document that’s been sent out for signature?

@ezdev

I am looking into your requirements and will update you shortly.

ok. Thank you.

@ezdev

You need to use UploadFile API method to upload the file to Cloud storage. If you do not pass the storage name value via the storageName parameter then API will upload the file to the default cloud storage, otherwise to the respective storage that you passed in the storageName parameter. Please check the following sample code. It uploads file to the root of default Cloud storage.

curl -X PUT "https://api.groupdocs.cloud/v2.0/signature/storage/file/test.pdf" 
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]" 
-H "Content-Type: multipart/form-data" 
-H "x-aspose-client: Containerize.Swagger" 
-F "File"="@C:/Temp/test.pdf"

If the signature image does not need any certificates then image signature is fine. Otherwise, you can use digital signature for the requirement.

Please note you can use the Left and Top parameters to insert your signature on the document. The left top position of the document is Left = 0, Top = 0. Hopefully, it will help you accomplish the task.

...
"Left": 100,
"Top": 100,
"Width": 200,
"Height": 100
...

I am afraid there is no webhook available for the purpose but the status code parameter in the API response. However, please also check the following documentation, if Search Signature or Verify Signature features to suit your requirement.

https://docs.groupdocs.cloud/signature/search-for-signatures-in-document/

https://docs.groupdocs.cloud/signature/verify-signatures-in-document/

thank you, tilal.

1 Like

@tilal.ahmad, I have a follow-up request. For my app’s use case, my end users will be the ones uploading the documents they want to send to their clients so I wouldn’t have the ability to know which location to place the signature. So Left, Right, etc. will not be applicable.

Are there text tags that can be used to identify the location of the signatures, names of signers, date of signature?

@ezdev

I am afraid currently there is no such option available. However, please share your sample input document with these tags. We will look into it and will log a new feature request accordingly.