Sample code for 30+ languages & platforms
Swift

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

Swift

func chilkatTest() {
    var success: Bool = false

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

    let http = CkoHttp()!

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

    http.setRequestHeader(name: "X-Auth-Key", value: "xxxxxxxxxxxxxxxxxxxxxxxxx")

    let sbJson = CkoStringBuilder()!
    success = http.quickGetSb(url: "https://intakeq.com/api/v1/intakes/[intake-id]", sbContent: sbJson)
    if success == false {
        print("\(http.lastErrorText!)")
        return
    }

    if http.lastStatus.intValue != 200 {
        print("status code: \(http.lastStatus.intValue)")
        print("response: \(sbJson.getAsString()!)")
        return
    }

    print("raw response: ")
    print("\(sbJson.getAsString()!)")

    let json = CkoJsonObject()!

    json.loadSb(sb: sbJson)
    json.emitCompact = true

    print("\(json.emit()!)")

}