Sample code for 30+ languages & platforms
Dart

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 Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  // This example assumes the Chilkat API to have been previously unlocked.
  // See Global Unlock Sample for sample code.

  final http = CkHttp();

  // To log the exact HTTP request/response to a session log file:
  http.sessionLogFilename = '/someDir/sessionLog.txt';

  http.setRequestHeader('X-Auth-Key', 'xxxxxxxxxxxxxxxxxxxxxxxxx');

  final sbJson = CkStringBuilder();
  try {
    http.quickGetSb('https://intakeq.com/api/v1/intakes/[intake-id]', sbJson);
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
    return;
  }

  if (http.lastStatus != 200) {
    print('status code: ${http.lastStatus}');
    print('response: ${sbJson.getAsString()}');
    return;
  }

  print('raw response: ');
  print(sbJson.getAsString());

  final json = CkJsonObject();

  json.loadSb(sbJson);
  json.emitCompact = true;

  print(json.emit());
}