PHP
PHP
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 PHP Downloads
<?php
use Chilkat2\Http;
use Chilkat2\JsonObject;
use Chilkat2\StringBuilder;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$http = new Http();
// To log the exact HTTP request/response to a session log file:
$http->SessionLogFilename = '/someDir/sessionLog.txt';
$http->SetRequestHeader('X-Auth-Key', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
$sbJson = new StringBuilder();
try {
$http->QuickGetSb('https://intakeq.com/api/v1/intakes/[intake-id]', $sbJson);
} catch (\Chilkat2\Exception $e) {
echo $e->getMessage(), "\n";
exit;
}
if ($http->LastStatus != 200) {
echo 'status code: ', $http->LastStatus, "\n";
echo 'response: ', $sbJson->GetAsString(), "\n";
exit;
}
echo "raw response: \n";
echo $sbJson->GetAsString(), "\n";
$json = new JsonObject();
$json->LoadSb($sbJson);
$json->EmitCompact = true;
echo $json->Emit(), "\n";