Sample code for 30+ languages & platforms
C++

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 C++ Downloads

C++
#include <CkHttp.h>
#include <CkStringBuilder.h>
#include <CkJsonObject.h>

void ChilkatSample(void)
    {
    bool success = false;

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

    CkHttp http;

    //  To log the exact HTTP request/response to a session log file:
    http.put_SessionLogFilename("/someDir/sessionLog.txt");

    http.SetRequestHeader("X-Auth-Key","xxxxxxxxxxxxxxxxxxxxxxxxx");

    CkStringBuilder sbJson;
    success = http.QuickGetSb("https://intakeq.com/api/v1/intakes/[intake-id]",sbJson);
    if (success == false) {
        std::cout << http.lastErrorText() << "\r\n";
        return;
    }

    if (http.get_LastStatus() != 200) {
        std::cout << "status code: " << http.get_LastStatus() << "\r\n";
        std::cout << "response: " << sbJson.getAsString() << "\r\n";
        return;
    }

    std::cout << "raw response: " << "\r\n";
    std::cout << sbJson.getAsString() << "\r\n";

    CkJsonObject json;

    json.LoadSb(sbJson);
    json.put_EmitCompact(true);

    std::cout << json.emit() << "\r\n";
    }