Tcl
Tcl
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 Tcl Downloads
load ./chilkat.dll
set success 0
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
# To log the exact HTTP request/response to a session log file:
CkHttp_put_SessionLogFilename $http "/someDir/sessionLog.txt"
CkHttp_SetRequestHeader $http "X-Auth-Key" "xxxxxxxxxxxxxxxxxxxxxxxxx"
set sbJson [new_CkStringBuilder]
set success [CkHttp_QuickGetSb $http "https://intakeq.com/api/v1/intakes/[intake-id]" $sbJson]
if {$success == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
delete_CkStringBuilder $sbJson
exit
}
if {[CkHttp_get_LastStatus $http] != 200} then {
puts "status code: [CkHttp_get_LastStatus $http]"
puts "response: [CkStringBuilder_getAsString $sbJson]"
delete_CkHttp $http
delete_CkStringBuilder $sbJson
exit
}
puts "raw response: "
puts [CkStringBuilder_getAsString $sbJson]
set json [new_CkJsonObject]
CkJsonObject_LoadSb $json $sbJson
CkJsonObject_put_EmitCompact $json 1
puts [CkJsonObject_emit $json]
delete_CkHttp $http
delete_CkStringBuilder $sbJson
delete_CkJsonObject $json