(PureBasic) IntakeQ: Download Intake Form PDF
Use this method to download a client’s complete intake package as a PDF file. For more information, see https://support.intakeq.com/article/31-intakeq-api#download-intake
IncludeFile "CkHttp.pb"
Procedure ChilkatExample()
; 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.i = 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
|