Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

DataFlex Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Bitfinex v2 REST
Bluzone
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
Jira
Lightspeed
MYOB
Magento
Mailgun
MedTunnel

MercadoLibre
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
Trello
Twilio
Twitter
UniPin
VoiceBase
Vonage
Walmart
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yousign
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(DataFlex) IntakeQ: Query Intake Forms

Use this method to query client intake form summaries. The result set does not contain all the contents of the intake forms, but only their basic information (id, status, client info).

For more information, see https://support.intakeq.com/article/31-intakeq-api#query-forms

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJarrResp
    Integer iRespStatusCode
    Variant vJson
    Handle hoJson
    String sId
    String sClientName
    String sClientEmail
    Integer iClientId
    String sStatus
    Integer iDateCreated
    Integer iDateSubmitted
    String sQuestionnaireName
    String sQuestionnaireId
    String sPractitioner
    String sPractitionerName
    Integer i
    Integer iCount_i
    String sTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    // Implements the following CURL command:

    // curl -X GET \
    //   https://intakeq.com/api/v1/intakes/summary?client=[searchString]&startDate=[yyyy-MM-dd]&endDate=[yyyy-MM-dd]&page=[pageNumber]&all=[bool] \
    //   -H 'X-Auth-Key: xxxxxxxxxxxxxxxxxxxxxxxxx'

    // Use the following online tool to generate HTTP code from a CURL command
    // Convert a cURL Command to HTTP Source Code

    Send ComSetRequestHeader To hoHttp "X-Auth-Key" "xxxxxxxxxxxxxxxxxxxxxxxxx"

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComQuickGetSb Of hoHttp "https://intakeq.com/api/v1/intakes/summary?client=[searchString]&startDate=[yyyy-MM-dd]&endDate=[yyyy-MM-dd]&page=[pageNumber]&all=[bool]" vSbResponseBody To iSuccess
    If (iSuccess = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatJsonArray)) To hoJarrResp
    If (Not(IsComObjectCreated(hoJarrResp))) Begin
        Send CreateComObject of hoJarrResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJarrResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJarrResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJarrResp To sTemp1
    Showln sTemp1

    Get ComLastStatus Of hoHttp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComLastHeader Of hoHttp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Procedure_Return
    End

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // [
    //   {
    //     "Id": "00000000-0000-0000-0000-000000000000",
    //     "ClientName": "test",
    //     "ClientEmail": "test@email.com",
    //     "ClientId": 9999,
    //     "Status": "Completed",
    //     "DateCreated": 1458526480368,
    //     "DateSubmitted": 1458526532654,
    //     "QuestionnaireName": "test",
    //     "QuestionnaireId": "1234acbd",
    //     "Practitioner": "test@email.com",
    //     "PractitionerName": "FirstName LastName"
    //   },
    //   {
    //     "Id": "00000000-0000-0000-0000-000000000000",
    //     "ClientName": "test",
    //     "ClientEmail": "test@email.com",
    //     "ClientId": 9999,
    //     "Status": "Completed",
    //     "DateCreated": 1458526480368,
    //     "DateSubmitted": 1458526532654,
    //     "QuestionnaireName": "test",
    //     "QuestionnaireId": "1234acbd",
    //     "Practitioner": "test@email.com",
    //     "PractitionerName": "FirstName LastName"
    //   }
    // ]

    // Sample code for parsing the JSON response...
    // Use the following online tool to generate parsing code from sample JSON:
    // Generate Parsing Code from JSON

    Move 0 To i
    Get ComSize Of hoJarrResp To iCount_i
    While (i < iCount_i)
        Get ComObjectAt Of hoJarrResp i To vJson
        If (IsComObject(vJson)) Begin
            Get Create (RefClass(cComChilkatJsonObject)) To hoJson
            Set pvComObject Of hoJson To vJson
        End
        Get ComStringOf Of hoJson "Id" To sId
        Get ComStringOf Of hoJson "ClientName" To sClientName
        Get ComStringOf Of hoJson "ClientEmail" To sClientEmail
        Get ComIntOf Of hoJson "ClientId" To iClientId
        Get ComStringOf Of hoJson "Status" To sStatus
        Get ComIntOf Of hoJson "DateCreated" To iDateCreated
        Get ComIntOf Of hoJson "DateSubmitted" To iDateSubmitted
        Get ComStringOf Of hoJson "QuestionnaireName" To sQuestionnaireName
        Get ComStringOf Of hoJson "QuestionnaireId" To sQuestionnaireId
        Get ComStringOf Of hoJson "Practitioner" To sPractitioner
        Get ComStringOf Of hoJson "PractitionerName" To sPractitionerName
        Send Destroy of hoJson
        Move (i + 1) To i
    Loop



End_Procedure

 

© 2000-2022 Chilkat Software, Inc. All Rights Reserved.