Node.js
Node.js
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.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var http = new chilkat.Http();
// 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 chilkat.StringBuilder();
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 chilkat.JsonObject();
json.LoadSb(sbJson);
json.EmitCompact = true;
console.log(json.Emit());
}
chilkatExample();