(VBScript) 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
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")
http.SetRequestHeader "X-Auth-Key","xxxxxxxxxxxxxxxxxxxxxxxxx"
success = http.Download("https://intakeq.com/api/v1/intakes/[intake-id]/pdf","my_local_dir/intake_form_xxxx.pdf")
If (success = 0) Then
outFile.WriteLine(http.LastErrorText)
WScript.Quit
End If
outFile.WriteLine("Success.")
outFile.Close
|