Sample code for 30+ languages & platforms
PureBasic

IntakeQ: Download Intake Form PDF

See more IntakeQ Examples

Use this method to download a client’s complete intake package as a PDF file.

Chilkat PureBasic Downloads

PureBasic
IncludeFile "CkHttp.pb"

Procedure ChilkatExample()

    success.i = 0

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

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttp::ckSetRequestHeader(http,"X-Auth-Key","xxxxxxxxxxxxxxxxxxxxxxxxx")

    success = CkHttp::ckDownload(http,"https://intakeq.com/api/v1/intakes/[intake-id]/pdf","my_local_dir/intake_form_xxxx.pdf")
    If success = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        ProcedureReturn
    EndIf

    Debug "Success."


    CkHttp::ckDispose(http)


    ProcedureReturn
EndProcedure