Hi, I've read through the API for uploading to filemanager using Python, I'm now trying to use the API to upload a PDF to the filemanager via netsuite using their Javascript API.
I the netsuite API sends a post request but only uses 3 parameters : API Url, headers and Body
I have the API url and set to the endpoint with the hAPIkey generated :
'api.hubapi.com/filemanager/api/v2/files?hapikey=xxxxxxxxxxxxxxxxxx'
For the body i set it to the multipart/form-data and the multi-part form encoded PDF.
However we dont have a data parameter so im not sure where to set the data and the folder paths :
data={
"folder_paths": "folder-in-the-cos-file-manager/subfolder"
}
when I try to send out the post request it just returns an response code 406 with no message
{
type: "http.ClientResponse",
code: 406,
headers: {
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
Server: "cloudflare",
"CF-RAY": "49aff0f6b937a6dd-DUB",
"Access-Control-Allow-Credentials": "false",
"Set-Cookie": "__cfduid=d6c3edc2ea00fe02ce37cc28a07eaac071547802760; expires=Sat, 18-Jan-20 09:12:40 GMT; path=/; domain=.hubapi.com; HttpOnly",
"Content-Length": "0",
Date: "Fri, 18 Jan 2019 09:12:40 GMT",
"Expect-CT": "max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"",
Via: "1.1 mono001.prod.dub.netledger.com"
},
body: ""
}
any assistance is appreciated on how to proceed with a successful upload
Thanks!