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

SQL Server 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

 

 

 

(SQL Server) Activix CRM Search for Leads

Demonstrates how to full-text search for leads, returning a JSON list of leads.

For more information, see https://docs.crm.activix.ca/api/resources/lead

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example requires the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    EXEC sp_OASetProperty @http, 'AuthToken', 'ACCESS_TOKEN'

    EXEC sp_OASetProperty @http, 'Accept', 'application/json'

    DECLARE @strResp nvarchar(4000)
    EXEC sp_OAMethod @http, 'QuickGetStr', @strResp OUT, 'https://crm.activix.ca/api/v2/leads/search?query=Doe'
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 <> 1
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        RETURN
      END


    EXEC sp_OAGetProperty @http, 'LastStatus', @iTmp0 OUT
    PRINT 'Response Status Code: ' + @iTmp0

    DECLARE @jsonResponse int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jsonResponse OUT

    DECLARE @success int
    EXEC sp_OAMethod @jsonResponse, 'Load', @success OUT, @strResp
    EXEC sp_OASetProperty @jsonResponse, 'EmitCompact', 0
    EXEC sp_OAMethod @jsonResponse, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    EXEC sp_OAGetProperty @http, 'LastStatus', @iTmp0 OUT
    IF @iTmp0 <> 200
      BEGIN

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @jsonResponse
        RETURN
      END

    -- Sample output...
    -- (See the parsing code below..)
    -- 
    -- Use this online tool to generate parsing code from sample JSON: 
    -- Generate Parsing Code from JSON

    -- {
    --     "data": [
    --         {
    --             "id": 3387562,
    --             "created_at": "2018-04-09T18:05:00+00:00",
    --             "updated_at": "2018-04-09T18:07:00+00:00",
    --             "first_name": "John",
    --             "last_name": "Doe",
    --             ...
    --             "account": {
    --                 "id": 66,
    --                 ...
    --             },
    --             "advisor": {
    --                 "id": 51112,
    --                 ...
    --             },
    --             "emails": [
    --                 {
    --                     "id": 3664451,
    --                     ...
    --                 },
    --                 ...
    --             ],
    --             "phones": [
    --                 {
    --                     "id": 9465546,
    --                     ...
    --                 },
    --                 ...
    --             ],
    --             "vehicles": [
    --                 {
    --                     "id": 4542214,
    --                     ...
    --                 },
    --                 ...
    --             ]
    --         },
    --         ...
    --     ],
    --     "links": {
    --         "first": "https://crm.activix.ca/api/v2/leads/search?query=John&page=1",
    --         "last": "https://crm.activix.ca/api/v2/leads/search?query=John&page=47",
    --         "prev": null,
    --         "next": "https://crm.activix.ca/api/v2/leads/search?query=John&page=2"
    --     },
    --     "meta": {
    --         "current_page": 1,
    --         "from": 1,
    --         "last_page": 47,
    --         "path": "https://crm.activix.ca/api/v2/leads/search",
    --         "per_page": 25,
    --         "to": 25,
    --         "total": 1161
    --     }
    -- }

    DECLARE @linksFirst nvarchar(4000)

    DECLARE @linksLast nvarchar(4000)

    DECLARE @linksPrev nvarchar(4000)

    DECLARE @linksNext nvarchar(4000)

    DECLARE @metaCurrent_page int

    DECLARE @metaFrom int

    DECLARE @metaLast_page int

    DECLARE @metaPath nvarchar(4000)

    DECLARE @metaPer_page int

    DECLARE @metaTo int

    DECLARE @metaTotal int

    DECLARE @i int

    DECLARE @count_i int

    DECLARE @id int

    DECLARE @created_at nvarchar(4000)

    DECLARE @updated_at nvarchar(4000)

    DECLARE @account_id int

    DECLARE @address_line1 nvarchar(4000)

    DECLARE @address_line2 nvarchar(4000)

    DECLARE @appointment_date nvarchar(4000)

    DECLARE @appt_call int

    DECLARE @available_date nvarchar(4000)

    DECLARE @average_spending nvarchar(4000)

    DECLARE @be_back_date nvarchar(4000)

    DECLARE @birth_date nvarchar(4000)

    DECLARE @business nvarchar(4000)

    DECLARE @call_date nvarchar(4000)

    DECLARE @city nvarchar(4000)

    DECLARE @civility nvarchar(4000)

    DECLARE @code nvarchar(4000)

    DECLARE @country nvarchar(4000)

    DECLARE @csi_date nvarchar(4000)

    DECLARE @delivered_by_id nvarchar(4000)

    DECLARE @delivered_date nvarchar(4000)

    DECLARE @delivery_date nvarchar(4000)

    DECLARE @division nvarchar(4000)

    DECLARE @end_service_date nvarchar(4000)

    DECLARE @first_name nvarchar(4000)

    DECLARE @gas nvarchar(4000)

    DECLARE @gender int

    DECLARE @invoiced int

    DECLARE @last_name nvarchar(4000)

    DECLARE @last_visit_date nvarchar(4000)

    DECLARE @locale nvarchar(4000)

    DECLARE @loyalty nvarchar(4000)

    DECLARE @next_visit_date nvarchar(4000)

    DECLARE @odometer_last_visit nvarchar(4000)

    DECLARE @open_work_order_date nvarchar(4000)

    DECLARE @planned_pick_up_date nvarchar(4000)

    DECLARE @postal_code nvarchar(4000)

    DECLARE @prepaid nvarchar(4000)

    DECLARE @prepared int

    DECLARE @presented_date nvarchar(4000)

    DECLARE @promised_date nvarchar(4000)

    DECLARE @province nvarchar(4000)

    DECLARE @rating nvarchar(4000)

    DECLARE @reached_client int

    DECLARE @refinanced_date nvarchar(4000)

    DECLARE @repair_date nvarchar(4000)

    DECLARE @repair_order nvarchar(4000)

    DECLARE @result nvarchar(4000)

    DECLARE @road_test_date nvarchar(4000)

    DECLARE @sale_date nvarchar(4000)

    DECLARE @second_contact nvarchar(4000)

    DECLARE @second_contact_civility nvarchar(4000)

    DECLARE @segment nvarchar(4000)

    DECLARE @service_cleaned int

    DECLARE @service_interval_km nvarchar(4000)

    DECLARE @service_monthly_km nvarchar(4000)

    DECLARE @service_processIntention nvarchar(4000)

    DECLARE @service_processTransport nvarchar(4000)

    DECLARE @service_processWalk_around nvarchar(4000)

    DECLARE @sex nvarchar(4000)

    DECLARE @source nvarchar(4000)

    DECLARE @status nvarchar(4000)

    DECLARE @storage nvarchar(4000)

    DECLARE @take_over_date nvarchar(4000)

    DECLARE @v_type nvarchar(4000)

    DECLARE @unsubscribe_all_date nvarchar(4000)

    DECLARE @unsubscribe_call_date nvarchar(4000)

    DECLARE @unsubscribe_email_date nvarchar(4000)

    DECLARE @unsubscribe_sms_date nvarchar(4000)

    DECLARE @work_order nvarchar(4000)

    DECLARE @accountId int

    DECLARE @accountCreated_at nvarchar(4000)

    DECLARE @accountUpdated_at nvarchar(4000)

    DECLARE @accountPartner_id int

    DECLARE @accountActivity_report int

    DECLARE @accountCommercial int

    DECLARE @accountEvent int

    DECLARE @accountLeadxpress int

    DECLARE @accountLoyalty int

    DECLARE @accountPhone_up int

    DECLARE @accountRenewal int

    DECLARE @accountSale_table int

    DECLARE @accountService int

    DECLARE @accountWalk_in int

    DECLARE @accountWebboost int

    DECLARE @accountAccount_manager int

    DECLARE @accountActivation_date nvarchar(4000)

    DECLARE @accountActive int

    DECLARE @accountAssigned_lead int

    DECLARE @accountAuto_renewal int

    DECLARE @accountAuto_renewal_new int

    DECLARE @accountAuto_renewal_used int

    DECLARE @accountAutomation int

    DECLARE @accountBdc_advisor int

    DECLARE @accountCalendar_options int

    DECLARE @accountClient_card_fieldsProcessGas int

    DECLARE @accountClient_card_fieldsProcessRecorded int

    DECLARE @accountClient_card_fieldsProcessAvailable int

    DECLARE @accountClient_card_fieldsProcessDiscounted int

    DECLARE @accountClient_card_fieldsCommercialProfit int

    DECLARE @accountClient_card_fieldsCommercialExclude int

    DECLARE @accountClient_card_fieldsCommercialMeeting int

    DECLARE @accountClient_card_fieldsPerformanceDeposit int

    DECLARE @accountClient_card_fieldsPerformanceRefinanced int

    DECLARE @accountClient_card_fieldsPerformanceDealer_tour int

    DECLARE @accountClient_card_fieldsPerformanceWalk_around int

    DECLARE @accountClient_card_fieldsPerformanceQualification int

    DECLARE @accountClient_card_fieldsPerformanceTwenty_four_hour int

    DECLARE @accountClient_card_fieldsGeneral_infoBudget int

    DECLARE @accountClient_card_fieldsGeneral_infoSector int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_1 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_2 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_3 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_4 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_5 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_6 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_7 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_8 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_9 int

    DECLARE @accountClient_card_fieldsGeneral_infoCustom_10 int

    DECLARE @accountClient_card_fieldsGeneral_infoCommunication_preference int

    DECLARE @accountClient_card_fieldsWanted_vehicleVin int

    DECLARE @accountClient_card_fieldsWanted_vehicleFuel int

    DECLARE @accountClient_card_fieldsWanted_vehicleRate int

    DECLARE @accountClient_card_fieldsWanted_vehicleTerm int

    DECLARE @accountClient_card_fieldsWanted_vehicleTire int

    DECLARE @accountClient_card_fieldsWanted_vehicleYear int

    DECLARE @accountClient_card_fieldsWanted_vehicleColor int

    DECLARE @accountClient_card_fieldsWanted_vehiclePrice int

    DECLARE @accountClient_card_fieldsWanted_vehicleStock int

    DECLARE @accountClient_card_fieldsWanted_vehicleTotal int

    DECLARE @accountClient_card_fieldsWanted_vehicleBudget int

    DECLARE @accountClient_card_fieldsWanted_vehicleEngine int

    DECLARE @accountClient_card_fieldsWanted_vehicleLength int

    DECLARE @accountClient_card_fieldsWanted_vehicleProfit int

    DECLARE @accountClient_card_fieldsWanted_vehicleSuffix int

    DECLARE @accountClient_card_fieldsWanted_vehicleWeight int

    DECLARE @accountClient_card_fieldsWanted_vehicleComment int

    DECLARE @accountClient_card_fieldsWanted_vehicleMileage int

    DECLARE @accountClient_card_fieldsWanted_vehiclePayment int

    DECLARE @accountClient_card_fieldsWanted_vehicleBodyType int

    DECLARE @accountClient_card_fieldsWanted_vehicleCategory int

    DECLARE @accountClient_card_fieldsWanted_vehicleModality int

    DECLARE @accountClient_card_fieldsWanted_vehicleResidual int

    DECLARE @accountClient_card_fieldsWanted_vehicleSleeping int

    DECLARE @accountClient_card_fieldsWanted_vehicleWarranty int

    DECLARE @accountClient_card_fieldsWanted_vehicleFrequency int

    DECLARE @accountClient_card_fieldsWanted_vehicleAccessories int

    DECLARE @accountClient_card_fieldsWanted_vehicleCategory_rv int

    DECLARE @accountClient_card_fieldsWanted_vehiclePreparation int

    DECLARE @accountClient_card_fieldsWanted_vehicleInitial_cash int

    DECLARE @accountClient_card_fieldsWanted_vehicleOffer_number int

    DECLARE @accountClient_card_fieldsWanted_vehicleOrder_number int

    DECLARE @accountClient_card_fieldsWanted_vehicleTransmission int

    DECLARE @accountClient_card_fieldsWanted_vehicleDocumentation int

    DECLARE @accountClient_card_fieldsWanted_vehicleDrivingWheels int

    DECLARE @accountClient_card_fieldsWanted_vehicleColor_exterior int

    DECLARE @accountClient_card_fieldsWanted_vehicleColor_interior int

    DECLARE @accountClient_card_fieldsWanted_vehicleAllowed_mileage int

    DECLARE @accountClient_card_fieldsWanted_vehicleSecurity_deposit int

    DECLARE @accountClient_card_fieldsWanted_vehicleEnd_contract_date int

    DECLARE @accountClient_card_fieldsExchange_vehicleVin int

    DECLARE @accountClient_card_fieldsExchange_vehicleFuel int

    DECLARE @accountClient_card_fieldsExchange_vehicleLink int

    DECLARE @accountClient_card_fieldsExchange_vehicleRate int

    DECLARE @accountClient_card_fieldsExchange_vehicleTerm int

    DECLARE @accountClient_card_fieldsExchange_vehicleYear int

    DECLARE @accountClient_card_fieldsExchange_vehicleColor int

    DECLARE @accountClient_card_fieldsExchange_vehiclePrice int

    DECLARE @accountClient_card_fieldsExchange_vehicleStock int

    DECLARE @accountClient_card_fieldsExchange_vehicleValue int

    DECLARE @accountClient_card_fieldsExchange_vehicleBudget int

    DECLARE @accountClient_card_fieldsExchange_vehicleEngine int

    DECLARE @accountClient_card_fieldsExchange_vehicleLength int

    DECLARE @accountClient_card_fieldsExchange_vehicleProfit int

    DECLARE @accountClient_card_fieldsExchange_vehicleSuffix int

    DECLARE @accountClient_card_fieldsExchange_vehicleWeight int

    DECLARE @accountClient_card_fieldsExchange_vehicleBalance int

    DECLARE @accountClient_card_fieldsExchange_vehicleComment int

    DECLARE @accountClient_card_fieldsExchange_vehicleMileage int

    DECLARE @accountClient_card_fieldsExchange_vehiclePayment int

    DECLARE @accountClient_card_fieldsExchange_vehicleRenewal int

    DECLARE @accountClient_card_fieldsExchange_vehicleSold_by int

    DECLARE @accountClient_card_fieldsExchange_vehicleBodyType int

    DECLARE @accountClient_card_fieldsExchange_vehicleCategory int

    DECLARE @accountClient_card_fieldsExchange_vehicleModality int

    DECLARE @accountClient_card_fieldsExchange_vehicleResidual int

    DECLARE @accountClient_card_fieldsExchange_vehicleSleeping int

    DECLARE @accountClient_card_fieldsExchange_vehicleWarranty int

    DECLARE @accountClient_card_fieldsExchange_vehicleCondition int

    DECLARE @accountClient_card_fieldsExchange_vehicleFrequency int

    DECLARE @accountClient_card_fieldsExchange_vehicleIntention int

    DECLARE @accountClient_card_fieldsExchange_vehicleRefinance int

    DECLARE @accountClient_card_fieldsExchange_vehicleRequested int

    DECLARE @accountClient_card_fieldsExchange_vehicleSold_date int

    DECLARE @accountClient_card_fieldsExchange_vehicleCategory_rv int

    DECLARE @accountClient_card_fieldsExchange_vehicleInstitution int

    DECLARE @accountClient_card_fieldsExchange_vehicleInitial_cash int

    DECLARE @accountClient_card_fieldsExchange_vehicleOffer_number int

    DECLARE @accountClient_card_fieldsExchange_vehicleTransmission int

    DECLARE @accountClient_card_fieldsExchange_vehicleDrivingWheels int

    DECLARE @accountClient_card_fieldsExchange_vehicleColor_exterior int

    DECLARE @accountClient_card_fieldsExchange_vehicleColor_interior int

    DECLARE @accountClient_card_fieldsExchange_vehicleAllowed_mileage int

    DECLARE @accountClient_card_fieldsExchange_vehicleSecurity_deposit int

    DECLARE @accountClient_card_fieldsExchange_vehicleEnd_contract_date int

    DECLARE @accountClient_number int

    DECLARE @accountConfirmation_appt int

    DECLARE @accountCredit int

    DECLARE @accountCsi int

    DECLARE @accountCsi_used int

    DECLARE @accountDefault_deliveryman_user_id nvarchar(4000)

    DECLARE @accountDelivered_by int

    DECLARE @accountDisable_communication_audio int

    DECLARE @accountDuplicates int

    DECLARE @accountGuest_action int

    DECLARE @accountEmail_client int

    DECLARE @accountIn_turn int

    DECLARE @accountIn_turn_director_management int

    DECLARE @accountLeads_other_division int

    DECLARE @accountLeadxpress_optionPriority int

    DECLARE @accountLeadxpress_optionReminderFrequency int

    DECLARE @accountLeadxpress_optionReminderRecurrence int

    DECLARE @accountLeadxpress_optionScheduleAccount int

    DECLARE @accountLeadxpress_optionScheduleAdvisor int

    DECLARE @accountLimited_audio_access int

    DECLARE @accountLogo nvarchar(4000)

    DECLARE @accountLogo_en nvarchar(4000)

    DECLARE @accountMandatory_coordinate int

    DECLARE @accountManually_status int

    DECLARE @accountMerge_rule nvarchar(4000)

    DECLARE @accountMonth_start_day int

    DECLARE @accountName nvarchar(4000)

    DECLARE @accountNiotext int

    DECLARE @accountNiotext_phone int

    DECLARE @accountPhone nvarchar(4000)

    DECLARE @accountPower_sport int

    DECLARE @accountProcess int

    DECLARE @accountRecreative_special int

    DECLARE @accountResult_date_validation int

    DECLARE @accountSale_accessories int

    DECLARE @accountSale_by_phone int

    DECLARE @accountSale_date_month int

    DECLARE @accountSale_table_optionsAccessory_column int

    DECLARE @accountSale_table_optionsCommercial_column int

    DECLARE @accountSale_table_optionsDivision_grouped_total_column int

    DECLARE @accountSale_validation int

    DECLARE @accountScan int

    DECLARE @accountStock_required_for_sale int

    DECLARE @accountTake_over_director int

    DECLARE @accountTrade_report int

    DECLARE @accountUnrestricted_assignment int

    DECLARE @accountUnsubscribe int

    DECLARE @accountUntreated_lead int

    DECLARE @accountVehicle_model_text int

    DECLARE @accountVehicle_text int

    DECLARE @accountVerified_sale int

    DECLARE @accountVin_decoder int

    DECLARE @accountWaiting_sale_date nvarchar(4000)

    DECLARE @accountWaiting_sale_option int

    DECLARE @advisor nvarchar(4000)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @lead_id int

    DECLARE @address nvarchar(4000)

    DECLARE @valid int

    DECLARE @extension nvarchar(4000)

    DECLARE @number nvarchar(4000)

    DECLARE @validated int

    DECLARE @mobile int

    DECLARE @accessories nvarchar(4000)

    DECLARE @allowed_odometer nvarchar(4000)

    DECLARE @balance int

    DECLARE @budget_max nvarchar(4000)

    DECLARE @budget_min nvarchar(4000)

    DECLARE @cash_down nvarchar(4000)

    DECLARE @category nvarchar(4000)

    DECLARE @category_rv nvarchar(4000)

    DECLARE @client_number nvarchar(4000)

    DECLARE @color_exterior nvarchar(4000)

    DECLARE @color_interior nvarchar(4000)

    DECLARE @comment nvarchar(4000)

    DECLARE @condition nvarchar(4000)

    DECLARE @end_contract_date nvarchar(4000)

    DECLARE @end_warranty_date nvarchar(4000)

    DECLARE @engine nvarchar(4000)

    DECLARE @extended_warranty nvarchar(4000)

    DECLARE @fuel nvarchar(4000)

    DECLARE @length_max nvarchar(4000)

    DECLARE @length_min nvarchar(4000)

    DECLARE @license_plate nvarchar(4000)

    DECLARE @make nvarchar(4000)

    DECLARE @modality nvarchar(4000)

    DECLARE @model nvarchar(4000)

    DECLARE @odometer nvarchar(4000)

    DECLARE @offer_number nvarchar(4000)

    DECLARE @v_option nvarchar(4000)

    DECLARE @order_number nvarchar(4000)

    DECLARE @payment nvarchar(4000)

    DECLARE @payment_frequency nvarchar(4000)

    DECLARE @preparation nvarchar(4000)

    DECLARE @price nvarchar(4000)

    DECLARE @profit nvarchar(4000)

    DECLARE @purchase_date nvarchar(4000)

    DECLARE @rate nvarchar(4000)

    DECLARE @recall nvarchar(4000)

    DECLARE @recorded_date nvarchar(4000)

    DECLARE @residual nvarchar(4000)

    DECLARE @security_deposit nvarchar(4000)

    DECLARE @sleeping nvarchar(4000)

    DECLARE @sold int

    DECLARE @sold_by nvarchar(4000)

    DECLARE @sold_date nvarchar(4000)

    DECLARE @stock nvarchar(4000)

    DECLARE @stock_state nvarchar(4000)

    DECLARE @term nvarchar(4000)

    DECLARE @tire int

    DECLARE @transmission nvarchar(4000)

    DECLARE @trim nvarchar(4000)

    DECLARE @url nvarchar(4000)

    DECLARE @value nvarchar(4000)

    DECLARE @vin nvarchar(4000)

    DECLARE @warranty nvarchar(4000)

    DECLARE @weight nvarchar(4000)

    DECLARE @year nvarchar(4000)

    DECLARE @year_max nvarchar(4000)

    DECLARE @year_min nvarchar(4000)

    EXEC sp_OAMethod @jsonResponse, 'StringOf', @linksFirst OUT, 'links.first'
    EXEC sp_OAMethod @jsonResponse, 'StringOf', @linksLast OUT, 'links.last'
    EXEC sp_OAMethod @jsonResponse, 'StringOf', @linksPrev OUT, 'links.prev'
    EXEC sp_OAMethod @jsonResponse, 'StringOf', @linksNext OUT, 'links.next'
    EXEC sp_OAMethod @jsonResponse, 'IntOf', @metaCurrent_page OUT, 'meta.current_page'
    EXEC sp_OAMethod @jsonResponse, 'IntOf', @metaFrom OUT, 'meta.from'
    EXEC sp_OAMethod @jsonResponse, 'IntOf', @metaLast_page OUT, 'meta.last_page'
    EXEC sp_OAMethod @jsonResponse, 'StringOf', @metaPath OUT, 'meta.path'
    EXEC sp_OAMethod @jsonResponse, 'IntOf', @metaPer_page OUT, 'meta.per_page'
    EXEC sp_OAMethod @jsonResponse, 'IntOf', @metaTo OUT, 'meta.to'
    EXEC sp_OAMethod @jsonResponse, 'IntOf', @metaTotal OUT, 'meta.total'
    SELECT @i = 0
    EXEC sp_OAMethod @jsonResponse, 'SizeOfArray', @count_i OUT, 'data'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jsonResponse, 'I', @i
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @id OUT, 'data[i].id'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @created_at OUT, 'data[i].created_at'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @updated_at OUT, 'data[i].updated_at'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @account_id OUT, 'data[i].account_id'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @address_line1 OUT, 'data[i].address_line1'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @address_line2 OUT, 'data[i].address_line2'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @appointment_date OUT, 'data[i].appointment_date'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @appt_call OUT, 'data[i].appt_call'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @available_date OUT, 'data[i].available_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @average_spending OUT, 'data[i].average_spending'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @be_back_date OUT, 'data[i].be_back_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @birth_date OUT, 'data[i].birth_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @business OUT, 'data[i].business'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @call_date OUT, 'data[i].call_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @city OUT, 'data[i].city'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @civility OUT, 'data[i].civility'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @code OUT, 'data[i].code'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @country OUT, 'data[i].country'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @csi_date OUT, 'data[i].csi_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @delivered_by_id OUT, 'data[i].delivered_by_id'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @delivered_date OUT, 'data[i].delivered_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @delivery_date OUT, 'data[i].delivery_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @division OUT, 'data[i].division'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @end_service_date OUT, 'data[i].end_service_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @first_name OUT, 'data[i].first_name'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @gas OUT, 'data[i].gas'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @gender OUT, 'data[i].gender'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @invoiced OUT, 'data[i].invoiced'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @last_name OUT, 'data[i].last_name'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @last_visit_date OUT, 'data[i].last_visit_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @locale OUT, 'data[i].locale'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @loyalty OUT, 'data[i].loyalty'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @next_visit_date OUT, 'data[i].next_visit_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @odometer_last_visit OUT, 'data[i].odometer_last_visit'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @open_work_order_date OUT, 'data[i].open_work_order_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @planned_pick_up_date OUT, 'data[i].planned_pick_up_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @postal_code OUT, 'data[i].postal_code'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @prepaid OUT, 'data[i].prepaid'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @prepared OUT, 'data[i].prepared'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @presented_date OUT, 'data[i].presented_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @promised_date OUT, 'data[i].promised_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @province OUT, 'data[i].province'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @rating OUT, 'data[i].rating'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @reached_client OUT, 'data[i].reached_client'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @refinanced_date OUT, 'data[i].refinanced_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @repair_date OUT, 'data[i].repair_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @repair_order OUT, 'data[i].repair_order'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @result OUT, 'data[i].result'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @road_test_date OUT, 'data[i].road_test_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @sale_date OUT, 'data[i].sale_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @second_contact OUT, 'data[i].second_contact'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @second_contact_civility OUT, 'data[i].second_contact_civility'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @segment OUT, 'data[i].segment'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @service_cleaned OUT, 'data[i].service_cleaned'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @service_interval_km OUT, 'data[i].service_interval_km'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @service_monthly_km OUT, 'data[i].service_monthly_km'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @service_processIntention OUT, 'data[i].service_process.intention'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @service_processTransport OUT, 'data[i].service_process.transport'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @service_processWalk_around OUT, 'data[i].service_process.walk_around'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @sex OUT, 'data[i].sex'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @source OUT, 'data[i].source'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @status OUT, 'data[i].status'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @storage OUT, 'data[i].storage'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @take_over_date OUT, 'data[i].take_over_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @v_type OUT, 'data[i].type'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @unsubscribe_all_date OUT, 'data[i].unsubscribe_all_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @unsubscribe_call_date OUT, 'data[i].unsubscribe_call_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @unsubscribe_email_date OUT, 'data[i].unsubscribe_email_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @unsubscribe_sms_date OUT, 'data[i].unsubscribe_sms_date'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @work_order OUT, 'data[i].work_order'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @accountId OUT, 'data[i].account.id'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountCreated_at OUT, 'data[i].account.created_at'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountUpdated_at OUT, 'data[i].account.updated_at'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @accountPartner_id OUT, 'data[i].account.partner_id'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountActivity_report OUT, 'data[i].account.activity_report'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountCommercial OUT, 'data[i].account.commercial'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountEvent OUT, 'data[i].account.event'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountLeadxpress OUT, 'data[i].account.leadxpress'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountLoyalty OUT, 'data[i].account.loyalty'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountPhone_up OUT, 'data[i].account.phone_up'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountRenewal OUT, 'data[i].account.renewal'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_table OUT, 'data[i].account.sale_table'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountService OUT, 'data[i].account.service'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountWalk_in OUT, 'data[i].account.walk_in'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountWebboost OUT, 'data[i].account.webboost'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountAccount_manager OUT, 'data[i].account.account_manager'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountActivation_date OUT, 'data[i].account.activation_date'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountActive OUT, 'data[i].account.active'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountAssigned_lead OUT, 'data[i].account.assigned_lead'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountAuto_renewal OUT, 'data[i].account.auto_renewal'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountAuto_renewal_new OUT, 'data[i].account.auto_renewal_new'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountAuto_renewal_used OUT, 'data[i].account.auto_renewal_used'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountAutomation OUT, 'data[i].account.automation'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountBdc_advisor OUT, 'data[i].account.bdc_advisor'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountCalendar_options OUT, 'data[i].account.calendar_options'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsProcessGas OUT, 'data[i].account.client_card_fields.process.gas'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsProcessRecorded OUT, 'data[i].account.client_card_fields.process.recorded'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsProcessAvailable OUT, 'data[i].account.client_card_fields.process.available'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsProcessDiscounted OUT, 'data[i].account.client_card_fields.process.discounted'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsCommercialProfit OUT, 'data[i].account.client_card_fields.commercial.profit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsCommercialExclude OUT, 'data[i].account.client_card_fields.commercial.exclude'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsCommercialMeeting OUT, 'data[i].account.client_card_fields.commercial.meeting'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsPerformanceDeposit OUT, 'data[i].account.client_card_fields.performance.deposit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsPerformanceRefinanced OUT, 'data[i].account.client_card_fields.performance.refinanced'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsPerformanceDealer_tour OUT, 'data[i].account.client_card_fields.performance.dealer_tour'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsPerformanceWalk_around OUT, 'data[i].account.client_card_fields.performance.walk_around'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsPerformanceQualification OUT, 'data[i].account.client_card_fields.performance.qualification'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsPerformanceTwenty_four_hour OUT, 'data[i].account.client_card_fields.performance.twenty_four_hour'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoBudget OUT, 'data[i].account.client_card_fields.general_info.budget'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoSector OUT, 'data[i].account.client_card_fields.general_info.sector'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_1 OUT, 'data[i].account.client_card_fields.general_info.custom_1'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_2 OUT, 'data[i].account.client_card_fields.general_info.custom_2'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_3 OUT, 'data[i].account.client_card_fields.general_info.custom_3'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_4 OUT, 'data[i].account.client_card_fields.general_info.custom_4'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_5 OUT, 'data[i].account.client_card_fields.general_info.custom_5'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_6 OUT, 'data[i].account.client_card_fields.general_info.custom_6'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_7 OUT, 'data[i].account.client_card_fields.general_info.custom_7'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_8 OUT, 'data[i].account.client_card_fields.general_info.custom_8'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_9 OUT, 'data[i].account.client_card_fields.general_info.custom_9'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCustom_10 OUT, 'data[i].account.client_card_fields.general_info.custom_10'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsGeneral_infoCommunication_preference OUT, 'data[i].account.client_card_fields.general_info.communication_preference'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleVin OUT, 'data[i].account.client_card_fields.wanted_vehicle.vin'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleFuel OUT, 'data[i].account.client_card_fields.wanted_vehicle.fuel'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleRate OUT, 'data[i].account.client_card_fields.wanted_vehicle.rate'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleTerm OUT, 'data[i].account.client_card_fields.wanted_vehicle.term'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleTire OUT, 'data[i].account.client_card_fields.wanted_vehicle.tire'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleYear OUT, 'data[i].account.client_card_fields.wanted_vehicle.year'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleColor OUT, 'data[i].account.client_card_fields.wanted_vehicle.color'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehiclePrice OUT, 'data[i].account.client_card_fields.wanted_vehicle.price'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleStock OUT, 'data[i].account.client_card_fields.wanted_vehicle.stock'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleTotal OUT, 'data[i].account.client_card_fields.wanted_vehicle.total'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleBudget OUT, 'data[i].account.client_card_fields.wanted_vehicle.budget'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleEngine OUT, 'data[i].account.client_card_fields.wanted_vehicle.engine'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleLength OUT, 'data[i].account.client_card_fields.wanted_vehicle.length'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleProfit OUT, 'data[i].account.client_card_fields.wanted_vehicle.profit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleSuffix OUT, 'data[i].account.client_card_fields.wanted_vehicle.suffix'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleWeight OUT, 'data[i].account.client_card_fields.wanted_vehicle.weight'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleComment OUT, 'data[i].account.client_card_fields.wanted_vehicle.comment'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleMileage OUT, 'data[i].account.client_card_fields.wanted_vehicle.mileage'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehiclePayment OUT, 'data[i].account.client_card_fields.wanted_vehicle.payment'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleBodyType OUT, 'data[i].account.client_card_fields.wanted_vehicle.bodyType'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleCategory OUT, 'data[i].account.client_card_fields.wanted_vehicle.category'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleModality OUT, 'data[i].account.client_card_fields.wanted_vehicle.modality'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleResidual OUT, 'data[i].account.client_card_fields.wanted_vehicle.residual'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleSleeping OUT, 'data[i].account.client_card_fields.wanted_vehicle.sleeping'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleWarranty OUT, 'data[i].account.client_card_fields.wanted_vehicle.warranty'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleFrequency OUT, 'data[i].account.client_card_fields.wanted_vehicle.frequency'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleAccessories OUT, 'data[i].account.client_card_fields.wanted_vehicle.accessories'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleCategory_rv OUT, 'data[i].account.client_card_fields.wanted_vehicle.category_rv'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehiclePreparation OUT, 'data[i].account.client_card_fields.wanted_vehicle.preparation'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleInitial_cash OUT, 'data[i].account.client_card_fields.wanted_vehicle.initial_cash'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleOffer_number OUT, 'data[i].account.client_card_fields.wanted_vehicle.offer_number'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleOrder_number OUT, 'data[i].account.client_card_fields.wanted_vehicle.order_number'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleTransmission OUT, 'data[i].account.client_card_fields.wanted_vehicle.transmission'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleDocumentation OUT, 'data[i].account.client_card_fields.wanted_vehicle.documentation'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleDrivingWheels OUT, 'data[i].account.client_card_fields.wanted_vehicle.drivingWheels'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleColor_exterior OUT, 'data[i].account.client_card_fields.wanted_vehicle.color_exterior'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleColor_interior OUT, 'data[i].account.client_card_fields.wanted_vehicle.color_interior'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleAllowed_mileage OUT, 'data[i].account.client_card_fields.wanted_vehicle.allowed_mileage'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleSecurity_deposit OUT, 'data[i].account.client_card_fields.wanted_vehicle.security_deposit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsWanted_vehicleEnd_contract_date OUT, 'data[i].account.client_card_fields.wanted_vehicle.end_contract_date'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleVin OUT, 'data[i].account.client_card_fields.exchange_vehicle.vin'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleFuel OUT, 'data[i].account.client_card_fields.exchange_vehicle.fuel'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleLink OUT, 'data[i].account.client_card_fields.exchange_vehicle.link'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleRate OUT, 'data[i].account.client_card_fields.exchange_vehicle.rate'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleTerm OUT, 'data[i].account.client_card_fields.exchange_vehicle.term'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleYear OUT, 'data[i].account.client_card_fields.exchange_vehicle.year'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleColor OUT, 'data[i].account.client_card_fields.exchange_vehicle.color'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehiclePrice OUT, 'data[i].account.client_card_fields.exchange_vehicle.price'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleStock OUT, 'data[i].account.client_card_fields.exchange_vehicle.stock'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleValue OUT, 'data[i].account.client_card_fields.exchange_vehicle.value'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleBudget OUT, 'data[i].account.client_card_fields.exchange_vehicle.budget'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleEngine OUT, 'data[i].account.client_card_fields.exchange_vehicle.engine'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleLength OUT, 'data[i].account.client_card_fields.exchange_vehicle.length'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleProfit OUT, 'data[i].account.client_card_fields.exchange_vehicle.profit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleSuffix OUT, 'data[i].account.client_card_fields.exchange_vehicle.suffix'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleWeight OUT, 'data[i].account.client_card_fields.exchange_vehicle.weight'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleBalance OUT, 'data[i].account.client_card_fields.exchange_vehicle.balance'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleComment OUT, 'data[i].account.client_card_fields.exchange_vehicle.comment'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleMileage OUT, 'data[i].account.client_card_fields.exchange_vehicle.mileage'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehiclePayment OUT, 'data[i].account.client_card_fields.exchange_vehicle.payment'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleRenewal OUT, 'data[i].account.client_card_fields.exchange_vehicle.renewal'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleSold_by OUT, 'data[i].account.client_card_fields.exchange_vehicle.sold_by'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleBodyType OUT, 'data[i].account.client_card_fields.exchange_vehicle.bodyType'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleCategory OUT, 'data[i].account.client_card_fields.exchange_vehicle.category'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleModality OUT, 'data[i].account.client_card_fields.exchange_vehicle.modality'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleResidual OUT, 'data[i].account.client_card_fields.exchange_vehicle.residual'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleSleeping OUT, 'data[i].account.client_card_fields.exchange_vehicle.sleeping'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleWarranty OUT, 'data[i].account.client_card_fields.exchange_vehicle.warranty'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleCondition OUT, 'data[i].account.client_card_fields.exchange_vehicle.condition'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleFrequency OUT, 'data[i].account.client_card_fields.exchange_vehicle.frequency'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleIntention OUT, 'data[i].account.client_card_fields.exchange_vehicle.intention'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleRefinance OUT, 'data[i].account.client_card_fields.exchange_vehicle.refinance'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleRequested OUT, 'data[i].account.client_card_fields.exchange_vehicle.requested'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleSold_date OUT, 'data[i].account.client_card_fields.exchange_vehicle.sold_date'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleCategory_rv OUT, 'data[i].account.client_card_fields.exchange_vehicle.category_rv'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleInstitution OUT, 'data[i].account.client_card_fields.exchange_vehicle.institution'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleInitial_cash OUT, 'data[i].account.client_card_fields.exchange_vehicle.initial_cash'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleOffer_number OUT, 'data[i].account.client_card_fields.exchange_vehicle.offer_number'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleTransmission OUT, 'data[i].account.client_card_fields.exchange_vehicle.transmission'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleDrivingWheels OUT, 'data[i].account.client_card_fields.exchange_vehicle.drivingWheels'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleColor_exterior OUT, 'data[i].account.client_card_fields.exchange_vehicle.color_exterior'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleColor_interior OUT, 'data[i].account.client_card_fields.exchange_vehicle.color_interior'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleAllowed_mileage OUT, 'data[i].account.client_card_fields.exchange_vehicle.allowed_mileage'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleSecurity_deposit OUT, 'data[i].account.client_card_fields.exchange_vehicle.security_deposit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_card_fieldsExchange_vehicleEnd_contract_date OUT, 'data[i].account.client_card_fields.exchange_vehicle.end_contract_date'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountClient_number OUT, 'data[i].account.client_number'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountConfirmation_appt OUT, 'data[i].account.confirmation_appt'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountCredit OUT, 'data[i].account.credit'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountCsi OUT, 'data[i].account.csi'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountCsi_used OUT, 'data[i].account.csi_used'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountDefault_deliveryman_user_id OUT, 'data[i].account.default_deliveryman_user_id'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountDelivered_by OUT, 'data[i].account.delivered_by'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountDisable_communication_audio OUT, 'data[i].account.disable_communication_audio'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountDuplicates OUT, 'data[i].account.duplicates'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountGuest_action OUT, 'data[i].account.guest_action'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountEmail_client OUT, 'data[i].account.email_client'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountIn_turn OUT, 'data[i].account.in_turn'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountIn_turn_director_management OUT, 'data[i].account.in_turn_director_management'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountLeads_other_division OUT, 'data[i].account.leads_other_division'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @accountLeadxpress_optionPriority OUT, 'data[i].account.leadxpress_option.priority'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @accountLeadxpress_optionReminderFrequency OUT, 'data[i].account.leadxpress_option.reminder.frequency'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @accountLeadxpress_optionReminderRecurrence OUT, 'data[i].account.leadxpress_option.reminder.recurrence'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountLeadxpress_optionScheduleAccount OUT, 'data[i].account.leadxpress_option.schedule.account'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountLeadxpress_optionScheduleAdvisor OUT, 'data[i].account.leadxpress_option.schedule.advisor'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountLimited_audio_access OUT, 'data[i].account.limited_audio_access'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountLogo OUT, 'data[i].account.logo'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountLogo_en OUT, 'data[i].account.logo_en'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountMandatory_coordinate OUT, 'data[i].account.mandatory_coordinate'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountManually_status OUT, 'data[i].account.manually_status'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountMerge_rule OUT, 'data[i].account.merge_rule'
        EXEC sp_OAMethod @jsonResponse, 'IntOf', @accountMonth_start_day OUT, 'data[i].account.month_start_day'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountName OUT, 'data[i].account.name'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountNiotext OUT, 'data[i].account.niotext'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountNiotext_phone OUT, 'data[i].account.niotext_phone'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountPhone OUT, 'data[i].account.phone'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountPower_sport OUT, 'data[i].account.power_sport'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountProcess OUT, 'data[i].account.process'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountRecreative_special OUT, 'data[i].account.recreative_special'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountResult_date_validation OUT, 'data[i].account.result_date_validation'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_accessories OUT, 'data[i].account.sale_accessories'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_by_phone OUT, 'data[i].account.sale_by_phone'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_date_month OUT, 'data[i].account.sale_date_month'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_table_optionsAccessory_column OUT, 'data[i].account.sale_table_options.accessory_column'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_table_optionsCommercial_column OUT, 'data[i].account.sale_table_options.commercial_column'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_table_optionsDivision_grouped_total_column OUT, 'data[i].account.sale_table_options.division_grouped_total_column'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountSale_validation OUT, 'data[i].account.sale_validation'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountScan OUT, 'data[i].account.scan'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountStock_required_for_sale OUT, 'data[i].account.stock_required_for_sale'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountTake_over_director OUT, 'data[i].account.take_over_director'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountTrade_report OUT, 'data[i].account.trade_report'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountUnrestricted_assignment OUT, 'data[i].account.unrestricted_assignment'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountUnsubscribe OUT, 'data[i].account.unsubscribe'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountUntreated_lead OUT, 'data[i].account.untreated_lead'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountVehicle_model_text OUT, 'data[i].account.vehicle_model_text'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountVehicle_text OUT, 'data[i].account.vehicle_text'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountVerified_sale OUT, 'data[i].account.verified_sale'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountVin_decoder OUT, 'data[i].account.vin_decoder'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @accountWaiting_sale_date OUT, 'data[i].account.waiting_sale_date'
        EXEC sp_OAMethod @jsonResponse, 'BoolOf', @accountWaiting_sale_option OUT, 'data[i].account.waiting_sale_option'
        EXEC sp_OAMethod @jsonResponse, 'StringOf', @advisor OUT, 'data[i].advisor'
        SELECT @j = 0
        EXEC sp_OAMethod @jsonResponse, 'SizeOfArray', @count_j OUT, 'data[i].emails'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jsonResponse, 'J', @j
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @id OUT, 'data[i].emails[j].id'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @created_at OUT, 'data[i].emails[j].created_at'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @updated_at OUT, 'data[i].emails[j].updated_at'
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @lead_id OUT, 'data[i].emails[j].lead_id'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @address OUT, 'data[i].emails[j].address'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @v_type OUT, 'data[i].emails[j].type'
            EXEC sp_OAMethod @jsonResponse, 'BoolOf', @valid OUT, 'data[i].emails[j].valid'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jsonResponse, 'SizeOfArray', @count_j OUT, 'data[i].phones'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jsonResponse, 'J', @j
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @id OUT, 'data[i].phones[j].id'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @created_at OUT, 'data[i].phones[j].created_at'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @updated_at OUT, 'data[i].phones[j].updated_at'
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @lead_id OUT, 'data[i].phones[j].lead_id'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @extension OUT, 'data[i].phones[j].extension'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @number OUT, 'data[i].phones[j].number'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @v_type OUT, 'data[i].phones[j].type'
            EXEC sp_OAMethod @jsonResponse, 'BoolOf', @valid OUT, 'data[i].phones[j].valid'
            EXEC sp_OAMethod @jsonResponse, 'BoolOf', @validated OUT, 'data[i].phones[j].validated'
            EXEC sp_OAMethod @jsonResponse, 'BoolOf', @mobile OUT, 'data[i].phones[j].mobile'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jsonResponse, 'SizeOfArray', @count_j OUT, 'data[i].vehicles'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jsonResponse, 'J', @j
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @id OUT, 'data[i].vehicles[j].id'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @created_at OUT, 'data[i].vehicles[j].created_at'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @updated_at OUT, 'data[i].vehicles[j].updated_at'
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @lead_id OUT, 'data[i].vehicles[j].lead_id'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @accessories OUT, 'data[i].vehicles[j].accessories'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @allowed_odometer OUT, 'data[i].vehicles[j].allowed_odometer'
            EXEC sp_OAMethod @jsonResponse, 'IntOf', @balance OUT, 'data[i].vehicles[j].balance'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @budget_max OUT, 'data[i].vehicles[j].budget_max'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @budget_min OUT, 'data[i].vehicles[j].budget_min'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @cash_down OUT, 'data[i].vehicles[j].cash_down'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @category OUT, 'data[i].vehicles[j].category'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @category_rv OUT, 'data[i].vehicles[j].category_rv'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @client_number OUT, 'data[i].vehicles[j].client_number'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @color_exterior OUT, 'data[i].vehicles[j].color_exterior'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @color_interior OUT, 'data[i].vehicles[j].color_interior'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @comment OUT, 'data[i].vehicles[j].comment'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @condition OUT, 'data[i].vehicles[j].condition'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @end_contract_date OUT, 'data[i].vehicles[j].end_contract_date'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @end_warranty_date OUT, 'data[i].vehicles[j].end_warranty_date'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @engine OUT, 'data[i].vehicles[j].engine'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @extended_warranty OUT, 'data[i].vehicles[j].extended_warranty'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @fuel OUT, 'data[i].vehicles[j].fuel'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @length_max OUT, 'data[i].vehicles[j].length_max'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @length_min OUT, 'data[i].vehicles[j].length_min'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @license_plate OUT, 'data[i].vehicles[j].license_plate'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @make OUT, 'data[i].vehicles[j].make'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @modality OUT, 'data[i].vehicles[j].modality'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @model OUT, 'data[i].vehicles[j].model'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @odometer OUT, 'data[i].vehicles[j].odometer'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @offer_number OUT, 'data[i].vehicles[j].offer_number'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @v_option OUT, 'data[i].vehicles[j].option'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @order_number OUT, 'data[i].vehicles[j].order_number'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @payment OUT, 'data[i].vehicles[j].payment'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @payment_frequency OUT, 'data[i].vehicles[j].payment_frequency'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @preparation OUT, 'data[i].vehicles[j].preparation'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @price OUT, 'data[i].vehicles[j].price'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @profit OUT, 'data[i].vehicles[j].profit'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @purchase_date OUT, 'data[i].vehicles[j].purchase_date'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @rate OUT, 'data[i].vehicles[j].rate'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @recall OUT, 'data[i].vehicles[j].recall'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @recorded_date OUT, 'data[i].vehicles[j].recorded_date'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @residual OUT, 'data[i].vehicles[j].residual'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @security_deposit OUT, 'data[i].vehicles[j].security_deposit'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @sleeping OUT, 'data[i].vehicles[j].sleeping'
            EXEC sp_OAMethod @jsonResponse, 'BoolOf', @sold OUT, 'data[i].vehicles[j].sold'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @sold_by OUT, 'data[i].vehicles[j].sold_by'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @sold_date OUT, 'data[i].vehicles[j].sold_date'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @stock OUT, 'data[i].vehicles[j].stock'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @stock_state OUT, 'data[i].vehicles[j].stock_state'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @term OUT, 'data[i].vehicles[j].term'
            EXEC sp_OAMethod @jsonResponse, 'BoolOf', @tire OUT, 'data[i].vehicles[j].tire'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @transmission OUT, 'data[i].vehicles[j].transmission'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @trim OUT, 'data[i].vehicles[j].trim'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @v_type OUT, 'data[i].vehicles[j].type'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @url OUT, 'data[i].vehicles[j].url'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @value OUT, 'data[i].vehicles[j].value'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @vin OUT, 'data[i].vehicles[j].vin'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @warranty OUT, 'data[i].vehicles[j].warranty'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @weight OUT, 'data[i].vehicles[j].weight'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @year OUT, 'data[i].vehicles[j].year'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @year_max OUT, 'data[i].vehicles[j].year_max'
            EXEC sp_OAMethod @jsonResponse, 'StringOf', @year_min OUT, 'data[i].vehicles[j].year_min'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jsonResponse, 'SizeOfArray', @count_j OUT, 'data[i].products'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jsonResponse, 'J', @j
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @jsonResponse


END
GO

 

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