Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

send_with_template endpoint should add file[] or file_url[] as supported params #43

Closed

Description

@alexmac05

re:
@api.hellosign.com/v3/signature_request/send_with_template endpoint
https://app.hellosign.com/api/reference#send_with_template
Needs to be expanded to include the ability to also send a this parameter:

file[] or file_url[] optional Append additional files to the signature request. HelloSign will parse the files for text tags. Text tags for signers not on the template will be ignored.

Use file[] to pass the uploaded file(s). Use file_url[] to have HelloSign download the file(s). We currently only support use of either the file[] parameter or file_url[] parameter, not both.

NOTE: internal issue AS-97

Activity

  1. alexmac05 commented on Apr 13, 2018

    @alexmac05
    ContributorAuthor

    Workaround:

    import requests

    buildTheRequest = 'https://' + apikey + ':@api.hellosign.com/v3/signature_request/send_with_template'
    ndafile = {'file[0]': open('NDA.pdf', 'rb')}
    data = {
    'template_id': 'XXXXXXXXXX',
    'subject': 'workaround',
    'allow_decline': '1',
    'message': 'workaround',
    'signers[Client][name]': 'George',
    'signers[Client][email_address]': 'example@example.com',
    'custom_fields': '[{"name":"newline", "value":"$20,000", "editor":"Client", "required":true}]',
    'test_mode': '1'
    #'file_url': 'https://i.ytimg.com/vi/JPA_rzHDy6o/maxresdefault.jpg'
    }
    print(buildTheRequest)
    r = requests.post(buildTheRequest, data, files=ndafile)
    print(r.text)
    stringData = r.text
    result = json.loads(stringData)
    print(result)

  2. alexmac05 commented on Apr 13, 2018

    @alexmac05
    ContributorAuthor

    To add multiple files:
    ndafile = {'file[0]': open('NDA.pdf', 'rb'), 'file[1]': open('NDA2.pdf', 'rb') }

  3. alexmac05 commented on Apr 16, 2018

    @alexmac05
    ContributorAuthor

    buildTheRequest = 'https://' + apikey + ':@api.hellosign.com/v3/signature_request/send_with_template'

    ndafile = {'file[0]': open('NDA.pdf', 'rb'), 'file[1]': open('NDA2.pdf', 'rb') }

        data = {
            'template_id': 'dd1532dc8e14925eeb536bd933edd9e957ae5336',
            'subject': 'ticket214090',
            'allow_decline': '1',
            'message': 'ticket214090',
            'signers[Client][name]': 'George',
            'signers[Client][email_address]': 'example@example.com',
            'custom_fields': '[{"name":"newline", "value":"$20,000", "editor":"Client", "required":true}]',
            'test_mode': '1'
        }
        print(buildTheRequest)
    
        r = requests.post(buildTheRequest, data, files=ndafile)
        print(r.text)
        stringData = r.text
    
    
        result = json.loads(stringData)
        print(result)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions