Receive a document to be added to the Customer's stored documents. Documents with the same name as an existing document will be updated.
You must be logged in to use this method. Basic Authentication is supported.
Parameters
Group: request
localcustomerid
(string[60])
customerid
(long integer)
description
(string[500])
fileextension
(string[60])
filename
(string[60])
This parameter is Optional
Field: document
document
(long integer)
Document, base 64 encoded
This field usually contains a File. If part of an XML or JSON data request, then the file should be Base64 encoded. If part of a simple POST then the form should be in a Content-Type: multipart/form-data; form with the file as a Binary part to the form.
This parameter is Optional
Possible Return Data
List: ErrorQueue
ErrorNumber
(long integer)
ErrorPosition
(string[255])
ErrorRecordId
(string[255])
ErrorDescription
(string[255])
ErrorRecommendation
(string[255])
Group: result
status
(string[5000])
localcustomerid
(string[60])
customerid
(long integer)
documentid
(string[60])
JSON POST (JSON Response)
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
function customer_document_update_jsonpost(host,jsondata,username,password,result){ fetch(host + "/customer_document_update", { method: "POST", credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Content-Type": "application/json", "Accept": "application/json;", }, body: jsondata }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply textToTextarea(text,result) }) } var host = "https://localhost:2293"
function customer_document_update_getjson(host,urldata,username,password,result){ fetch(host + "/customer_document_update" +"?" + urldata, { credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Accept": "application/json;", } }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply }) } var host = "https://localhost:2293"
function customer_document_update_restjson(host,id,username,password,result){ fetch(host + "/api/customer_document_update/" + id, { credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Accept": "application/json;", } }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply }) } var host = "https://localhost:2293"