matheusdelecrode | Posts: 12

Send new document in existing package

1 votes

I'm trying to send a new document in a package that has the status: Draft

But I get the error response

b'{"messageKey":"error.validation.invalidParameters","technical":"Unexpected Content-Disposition value for parameter \'name\'","message":"Invalid parameters.","code":400,"name":"Validation Error"}'

 

payload= {'description': 'Envio de documento para assinatura', 'id': 17, 'name': 'document1.pdf'}

url='https://sandbox.esignlive.com/api/packages/n4zLJaZblg1wd33HDVpVgsDIBlM=/documents'

file_request = [('file', <File: C:\Users\Test\document1_ZiJNpZN.pdf>)]

Request:

response = requests.post(url, headers=headers, data=payload,
files=file_request)

Can you help me?

 


Duo_Liang | Posts: 3776

Reply to: Send new document in existing package

0 votes

Hi Matheus,

 

Thanks for your post! Can you try the attached code and let me know if this works for you to upload document to an existing package?

 

Duo

 


Attachments

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off