Reputation: 31
In the DocuSign Postman Collection, I am unable to use the method to update a resource XML file:
{{baseUrl}}/v2.1/accounts/{{accountId}}/brands/{{brandId}}/resources/{{resourceContentType}}
When initially trying to use the endpoint, I get the following error:
{"errorCode":"INVALID_REQUEST_PARAMETER","message":"The request contained at least one invalid parameter. A filename was not found in the Content-Disposition header ('filename=\"filename.ext\""}
The docs do mention the need to include a Content-Disposition header, though upon adding:
Content-Disposition: form-data; name="file"; filename="DocuSign_SigningResource.xml"
, I get the error:
{"errorCode":"BRAND_RESOURCES_XML_LOAD_OR_PARSE_ERROR","message":"XML syntax error. Data at the root level is invalid. Line 1, position 1."}
I have confirmed my XML is valid. I get this same error if I try to include a file that does not exist, so I am not confident the contents of the XML file have anything to do with the error I am receiving.
Any thoughts are appreciated!
Upvotes: 0
Views: 200
Reputation: 31
Update: I was able to get this working by updating the request body format. The DocuSign Postman Collection indicates form-data with a file reference is expected. It was only when I updated the request body to be raw xml and pasting the xml file contents directly into the request body that I was able to make a successful request.
Upvotes: 3