You must be logged in to use this method. Basic Authentication is supported.
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
Example Request
POST /customer_update HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: localhost:2293 Accept: application/json Content-Type: application/json Content-Length: length { "customer" : { "localcustomerid" : "value ", "customerid" : "value ", "customertype" : "value ", "lookupcode" : "value ", "email" : "value ", "company" : "value ", "firstname" : "value ", "lastname" : "value ", "homephone" : "value ", "workphone" : "value ", "cellphone" : "value ", "faxphone" : "value ", "taxvat" : "value ", "taxgroupid" : value } }
Example Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length { "createcustomer_response" : { "result" : { "status" : "value ", "localcustomerid" : "value ", "customerid" : value } } }
Example Code - JavaScript
function customer_update_jsonpost(host,jsondata,username,password,result){ fetch(host + "/customer_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"
Example Code - CURL
CURL --user Username :Password --header "Content-Type: application/json" --header "Accept: application/json" --data-binary @jsonDataFile.json https://localhost:2293 /customer_update
Example Code - Clarion with NetTalk
net NetWebClient net.Authorization = net.CreateAuthorizationString (Username , Password , Net:WebBasicAuthentication,Net:NoWrap) net.ContentType = 'application/json' net.SetAccept('application/json') net.Post('https://localhost:2293 /customer_update',jsonData)
Try It - Live
jsondata
Try it : POST result
The following is a sample JSON GET request and response. The
placeholders shown need to be replaced with actual values.
Example Request
GET /customer_update?customer-localcustomerid=value &customer-customerid=value &customer-customertype=value &customer-lookupcode=value &customer-email=value &customer-company=value &customer-firstname=value &customer-lastname=value &customer-homephone=value &customer-workphone=value &customer-cellphone=value &customer-faxphone=value &customer-taxvat=value &customer-taxgroupid=value HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: localhost:2293 Accept: application/json
Example Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length { "createcustomer_response" : { "result" : { "status" : "value ", "localcustomerid" : "value ", "customerid" : value } } }
Example Code - JavaScript
function customer_update_getjson(host,urldata,username,password,result){ fetch(host + "/customer_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"
Example Code - CURL
CURL --user Username :Password --header "Accept: application/json" --get --data "customer-localcustomerid=value &customer-customerid=value &customer-customertype=value &customer-lookupcode=value &customer-email=value &customer-company=value &customer-firstname=value &customer-lastname=value &customer-homephone=value &customer-workphone=value &customer-cellphone=value &customer-faxphone=value &customer-taxvat=value &customer-taxgroupid=value " https://localhost:2293 /customer_update
Example Code - Clarion with NetTalk
net NetWebClient net.Authorization = net.CreateAuthorizationString (Username , Password , Net:WebBasicAuthentication,Net:NoWrap) net.SetAccept('application/json') net.Get('https://localhost:2293 /customer_update?customer-localcustomerid=value &customer-customerid=value &customer-customertype=value &customer-lookupcode=value &customer-email=value &customer-company=value &customer-firstname=value &customer-lastname=value &customer-homephone=value &customer-workphone=value &customer-cellphone=value &customer-faxphone=value &customer-taxvat=value &customer-taxgroupid=value ')
Try It - Live
The following is a sample REST request and response. The
placeholders shown need to be replaced with actual values.
Example Request
GET /api/customer_update? HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: localhost:2293 Accept: application/json
Example Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length { "createcustomer_response" : { "result" : { "status" : "value ", "localcustomerid" : "value ", "customerid" : value } } }
Example Code - JavaScript
function customer_update_restjson(host,id,username,password,result){ fetch(host + "/api/customer_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"
Example Code - CURL
CURL --user Username :Password --header "Accept: application/json" https://localhost:2293 /api/customer_update/5
Example Code - Clarion with NetTalk
net NetWebClient net.Authorization = net.CreateAuthorizationString (Username , Password , Net:WebBasicAuthentication,Net:NoWrap) net.SetAccept('application/json') net.Get('https://localhost:2293 /api/customer_update/5 ')
Try It - Live