dreamspaceinteriors

Error when uploading document to package

0 votes
Hi! I'm getting error when uploading package with postman. Request: POST /api/packages/WZhzAq7Kg94hKye2vaF7X6PAW2U=/documents HTTP/1.1 Host: apps.e-signlive.ca Authorization: Basic MYAPIKEY Accept: text/html cache-control: no-cache Postman-Token: 259c64f4-5ffe-4fb0-a7ae-13448cafa44f Content-Disposition: form-data; name="payload"; filename="./upload/estimates/18/New.pdf Content-Disposition: form-data; name="name" test Content-Disposition: form-data; name="description" test Content-Disposition: form-data; name="id" test1 ------WebKitFormBoundary7MA4YWxkTrZu0gW-- Responce { "messageKey": "error.validation.invalidJson", "technical": "Unexpected character ('%' (code 37)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: (StringReader); line: 1, column: 2]", "message": "Invalid JSON.", "code": 400, "name": "Validation Error" }

Approved Answer

Reply to: Error when uploading document to package

0 votes
Hi there, For the first glance, it seems your form-data name has some mismatch, please make sure that your JSON payload is with the name of "payload" and your document file is with the name of "file"(if you want to upload multiple documents at the same time, name them all "file", and they will be uploaded in order) The minimal payload example would be like below:
{
  "name": "Example Document",
  "id": "Document1"
}
The two screenshots in attachment show you how to configure the API call in postman. Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments
3-4-1.png14.71 KB
3-4-2.png21.04 KB

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