JavaScript
JavaScript
Download Full Intake Form in JSON Format
See more IntakeQ Examples
The full intake form is very similar to intake summary object, except it adds an array of questions.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
var success = false;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var http = new CkHttp();
// To log the exact HTTP request/response to a session log file:
http.SessionLogFilename = "/someDir/sessionLog.txt";
http.SetRequestHeader("X-Auth-Key","xxxxxxxxxxxxxxxxxxxxxxxxx");
var sbJson = new CkStringBuilder();
success = http.QuickGetSb("https://intakeq.com/api/v1/intakes/[intake-id]",sbJson);
if (success == false) {
console.log(http.LastErrorText);
return;
}
if (http.LastStatus !== 200) {
console.log("status code: " + http.LastStatus);
console.log("response: " + sbJson.GetAsString());
return;
}
console.log("raw response: ");
console.log(sbJson.GetAsString());
var json = new CkJsonObject();
json.LoadSb(sbJson);
json.EmitCompact = true;
console.log(json.Emit());