Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Visual FoxPro Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

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

 

 

 

(Visual FoxPro) Cerved API Advanced Entity Search

The "Advanced Entity Search" API allows you to find subjects in the Cerved database that meet specific search criteria, specified through the parameters provided as input to the service.

For more information, see https://apps-developer.cerved.com/

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

LOCAL loHttp
LOCAL lnSuccess
LOCAL loJson
LOCAL loResp
LOCAL loSbResponseBody
LOCAL loJResp
LOCAL lnRespStatusCode
LOCAL lcSubject_id
LOCAL lcSubject_type
LOCAL lcTax_code
LOCAL lcAddressStreetDescription
LOCAL lcAddressCityCode
LOCAL lcAddressCityIstat_code
LOCAL lcAddressCityDescription
LOCAL lcAddressProvinceCode
LOCAL lcAddressProvinceDescription
LOCAL lcAddressPostal_code
LOCAL lcAddressCountryCode
LOCAL lcAddressCountryDescription
LOCAL lcCompany_infoLegal_formCode
LOCAL lcCompany_infoLegal_formDescription
LOCAL lcCompany_infoLegal_formClass_code
LOCAL lcCompany_infoActivity_statusCode
LOCAL lcCompany_infoActivity_statusDescription
LOCAL lcCompany_infoBusiness_name
LOCAL lcCompany_infoEconomic_activityAtecoCode
LOCAL lcCompany_infoEconomic_activityAtecoDescription
LOCAL lcCompany_infoHead_office
LOCAL lcCompany_infoLei_code
LOCAL lcCompany_infoOperational_flag
LOCAL lcCompany_infoPublic_administrationPa_subject
LOCAL lcCompany_infoPublic_administrationPa_supplier
LOCAL lcCompany_infoPublic_administrationPa_owned
LOCAL lcCompany_infoRea_codeCciaa
LOCAL lnCompany_infoRea_codeRea_number
LOCAL lcCompany_infoRea_codeRegistration_date
LOCAL lcCompany_infoVat_number
LOCAL lcCompany_infoNo_rea_dataForm_code
LOCAL lcCompany_infoNo_rea_dataForm_description
LOCAL lcPerson_infoFirst_name
LOCAL lcPerson_infoLast_name
LOCAL lcPerson_infoName
LOCAL lcPerson_infoBirth_date
LOCAL lcPerson_infoBirth_placeStreetDescription
LOCAL lcPerson_infoBirth_placeCityCode
LOCAL lcPerson_infoBirth_placeCityIstat_code
LOCAL lcPerson_infoBirth_placeCityDescription
LOCAL lcPerson_infoBirth_placeProvinceCode
LOCAL lcPerson_infoBirth_placeProvinceDescription
LOCAL lcPerson_infoBirth_placePostal_code
LOCAL lcPerson_infoBirth_placeCountryCode
LOCAL lcPerson_infoBirth_placeCountryDescription
LOCAL lnSubjects_total_number
LOCAL i
LOCAL lnCount_i

* 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')
loHttp = CreateObject('Chilkat.Http')

* Implements the following CURL command:

* curl -X POST \
*   https://api.cerved.com/cervedApi/v1/entitySearch/advanced \
*   -H 'accept: application/json' \
*   -H 'apikey: ********************************' \
* -d '{
*   "search_text": "string",
*   "activity_status_codes": [
*     "A",
*     "C",
*     "D",
*     "F",
*     "I",
*     "L",
*     "N",
*     "P",
*     "R",
*     "S",
*     "T"
*   ],
*   "birth_date": "string",
*   "name": "string",
*   "subject_types": [
*     "PERSON",
*     "INDIVIDUAL_COMPANY",
*     "COMPANY",
*     "FOREIGN",
*     "OTHER"
*   ],
*   "tax_code": "string",
*   "vat_number": "string",
*   "rea": {
*     "cciaa": "string",
*     "rea_number": 0
*   },
*   "city_istat_code": "string",
*   "province_code": "string"
* }'

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

* Use this online tool to generate code from sample JSON:
* Generate Code to Create JSON

* The following JSON is sent in the request body.

* {
*   "search_text": "string",
*   "activity_status_codes": [
*     "A",
*     "C",
*     "D",
*     "F",
*     "I",
*     "L",
*     "N",
*     "P",
*     "R",
*     "S",
*     "T"
*   ],
*   "birth_date": "string",
*   "name": "string",
*   "subject_types": [
*     "PERSON",
*     "INDIVIDUAL_COMPANY",
*     "COMPANY",
*     "FOREIGN",
*     "OTHER"
*   ],
*   "tax_code": "string",
*   "vat_number": "string",
*   "rea": {
*     "cciaa": "string",
*     "rea_number": 0
*   },
*   "city_istat_code": "string",
*   "province_code": "string"
* }

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')
* IMPORTANT:  Only include the lines for the search criteria you wish to include.
loJson.UpdateString("search_text","string")
loJson.UpdateString("activity_status_codes[0]","A")
loJson.UpdateString("activity_status_codes[1]","C")
loJson.UpdateString("activity_status_codes[2]","D")
loJson.UpdateString("activity_status_codes[3]","F")
loJson.UpdateString("activity_status_codes[4]","I")
loJson.UpdateString("activity_status_codes[5]","L")
loJson.UpdateString("activity_status_codes[6]","N")
loJson.UpdateString("activity_status_codes[7]","P")
loJson.UpdateString("activity_status_codes[8]","R")
loJson.UpdateString("activity_status_codes[9]","S")
loJson.UpdateString("activity_status_codes[10]","T")
loJson.UpdateString("birth_date","string")
loJson.UpdateString("name","string")
loJson.UpdateString("subject_types[0]","PERSON")
loJson.UpdateString("subject_types[1]","INDIVIDUAL_COMPANY")
loJson.UpdateString("subject_types[2]","COMPANY")
loJson.UpdateString("subject_types[3]","FOREIGN")
loJson.UpdateString("subject_types[4]","OTHER")
loJson.UpdateString("tax_code","string")
loJson.UpdateString("vat_number","string")
loJson.UpdateString("rea.cciaa","string")
loJson.UpdateInt("rea.rea_number",0)
loJson.UpdateString("city_istat_code","string")
loJson.UpdateString("province_code","string")

loHttp.SetRequestHeader("accept","application/json")
loHttp.SetRequestHeader("apikey","********************************")

loResp = loHttp.PostJson3("https://api.cerved.com/cervedApi/v1/entitySearch/advanced","application/json",loJson)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loJson
    CANCEL
ENDIF

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder')
loSbResponseBody = CreateObject('Chilkat.StringBuilder')
loResp.GetBodySb(loSbResponseBody)
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJResp = CreateObject('Chilkat.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0

? "Response Body:"
? loJResp.Emit()

lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode >= 400) THEN
    ? "Response Header:"
    ? loResp.Header
    ? "Failed."
    RELEASE loResp
    RELEASE loHttp
    RELEASE loJson
    RELEASE loSbResponseBody
    RELEASE loJResp
    CANCEL
ENDIF

RELEASE loResp

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

* {
*   "subjects": [
*     {
*       "subject_id": "string",
*       "subject_type": "string",
*       "tax_code": "string",
*       "address": {
*         "street": {
*           "description": "string"
*         },
*         "city": {
*           "code": "string",
*           "istat_code": "string",
*           "description": "string"
*         },
*         "province": {
*           "code": "string",
*           "description": "string"
*         },
*         "postal_code": "string",
*         "country": {
*           "code": "string",
*           "description": "string"
*         }
*       },
*       "company_info": {
*         "legal_form": {
*           "code": "string",
*           "description": "string",
*           "class_code": "string"
*         },
*         "activity_status": {
*           "code": "string",
*           "description": "string"
*         },
*         "business_name": "string",
*         "economic_activity": {
*           "ateco": {
*             "code": "string",
*             "description": "string"
*           }
*         },
*         "head_office": "true",
*         "lei_code": "string",
*         "operational_flag": "true",
*         "public_administration": {
*           "pa_subject": "true",
*           "pa_supplier": "true",
*           "pa_owned": "true"
*         },
*         "rea_code": {
*           "cciaa": "string",
*           "rea_number": 0,
*           "registration_date": "string"
*         },
*         "vat_number": "string",
*         "no_rea_data": {
*           "form_code": "string",
*           "form_description": "string"
*         }
*       },
*       "person_info": {
*         "first_name": "string",
*         "last_name": "string",
*         "name": "string",
*         "birth_date": "string",
*         "birth_place": {
*           "street": {
*             "description": "string"
*           },
*           "city": {
*             "code": "string",
*             "istat_code": "string",
*             "description": "string"
*           },
*           "province": {
*             "code": "string",
*             "description": "string"
*           },
*           "postal_code": "string",
*           "country": {
*             "code": "string",
*             "description": "string"
*           }
*         }
*       }
*     }
*   ],
*   "subjects_total_number": 0
* }

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

lnSubjects_total_number = loJResp.IntOf("subjects_total_number")
i = 0
lnCount_i = loJResp.SizeOfArray("subjects")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcSubject_id = loJResp.StringOf("subjects[i].subject_id")
    lcSubject_type = loJResp.StringOf("subjects[i].subject_type")
    lcTax_code = loJResp.StringOf("subjects[i].tax_code")
    lcAddressStreetDescription = loJResp.StringOf("subjects[i].address.street.description")
    lcAddressCityCode = loJResp.StringOf("subjects[i].address.city.code")
    lcAddressCityIstat_code = loJResp.StringOf("subjects[i].address.city.istat_code")
    lcAddressCityDescription = loJResp.StringOf("subjects[i].address.city.description")
    lcAddressProvinceCode = loJResp.StringOf("subjects[i].address.province.code")
    lcAddressProvinceDescription = loJResp.StringOf("subjects[i].address.province.description")
    lcAddressPostal_code = loJResp.StringOf("subjects[i].address.postal_code")
    lcAddressCountryCode = loJResp.StringOf("subjects[i].address.country.code")
    lcAddressCountryDescription = loJResp.StringOf("subjects[i].address.country.description")
    lcCompany_infoLegal_formCode = loJResp.StringOf("subjects[i].company_info.legal_form.code")
    lcCompany_infoLegal_formDescription = loJResp.StringOf("subjects[i].company_info.legal_form.description")
    lcCompany_infoLegal_formClass_code = loJResp.StringOf("subjects[i].company_info.legal_form.class_code")
    lcCompany_infoActivity_statusCode = loJResp.StringOf("subjects[i].company_info.activity_status.code")
    lcCompany_infoActivity_statusDescription = loJResp.StringOf("subjects[i].company_info.activity_status.description")
    lcCompany_infoBusiness_name = loJResp.StringOf("subjects[i].company_info.business_name")
    lcCompany_infoEconomic_activityAtecoCode = loJResp.StringOf("subjects[i].company_info.economic_activity.ateco.code")
    lcCompany_infoEconomic_activityAtecoDescription = loJResp.StringOf("subjects[i].company_info.economic_activity.ateco.description")
    lcCompany_infoHead_office = loJResp.StringOf("subjects[i].company_info.head_office")
    lcCompany_infoLei_code = loJResp.StringOf("subjects[i].company_info.lei_code")
    lcCompany_infoOperational_flag = loJResp.StringOf("subjects[i].company_info.operational_flag")
    lcCompany_infoPublic_administrationPa_subject = loJResp.StringOf("subjects[i].company_info.public_administration.pa_subject")
    lcCompany_infoPublic_administrationPa_supplier = loJResp.StringOf("subjects[i].company_info.public_administration.pa_supplier")
    lcCompany_infoPublic_administrationPa_owned = loJResp.StringOf("subjects[i].company_info.public_administration.pa_owned")
    lcCompany_infoRea_codeCciaa = loJResp.StringOf("subjects[i].company_info.rea_code.cciaa")
    lnCompany_infoRea_codeRea_number = loJResp.IntOf("subjects[i].company_info.rea_code.rea_number")
    lcCompany_infoRea_codeRegistration_date = loJResp.StringOf("subjects[i].company_info.rea_code.registration_date")
    lcCompany_infoVat_number = loJResp.StringOf("subjects[i].company_info.vat_number")
    lcCompany_infoNo_rea_dataForm_code = loJResp.StringOf("subjects[i].company_info.no_rea_data.form_code")
    lcCompany_infoNo_rea_dataForm_description = loJResp.StringOf("subjects[i].company_info.no_rea_data.form_description")
    lcPerson_infoFirst_name = loJResp.StringOf("subjects[i].person_info.first_name")
    lcPerson_infoLast_name = loJResp.StringOf("subjects[i].person_info.last_name")
    lcPerson_infoName = loJResp.StringOf("subjects[i].person_info.name")
    lcPerson_infoBirth_date = loJResp.StringOf("subjects[i].person_info.birth_date")
    lcPerson_infoBirth_placeStreetDescription = loJResp.StringOf("subjects[i].person_info.birth_place.street.description")
    lcPerson_infoBirth_placeCityCode = loJResp.StringOf("subjects[i].person_info.birth_place.city.code")
    lcPerson_infoBirth_placeCityIstat_code = loJResp.StringOf("subjects[i].person_info.birth_place.city.istat_code")
    lcPerson_infoBirth_placeCityDescription = loJResp.StringOf("subjects[i].person_info.birth_place.city.description")
    lcPerson_infoBirth_placeProvinceCode = loJResp.StringOf("subjects[i].person_info.birth_place.province.code")
    lcPerson_infoBirth_placeProvinceDescription = loJResp.StringOf("subjects[i].person_info.birth_place.province.description")
    lcPerson_infoBirth_placePostal_code = loJResp.StringOf("subjects[i].person_info.birth_place.postal_code")
    lcPerson_infoBirth_placeCountryCode = loJResp.StringOf("subjects[i].person_info.birth_place.country.code")
    lcPerson_infoBirth_placeCountryDescription = loJResp.StringOf("subjects[i].person_info.birth_place.country.description")
    i = i + 1
ENDDO

RELEASE loHttp
RELEASE loJson
RELEASE loSbResponseBody
RELEASE loJResp


 

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