Sample code for 30+ languages & platforms
Lua Requires Chilkat v11.0.0+

Activix CRM Update a Lead

See more Activix CRM Examples

Demonstrates how to update a lead and returns the updated lead.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

-- This example has more top-level variables than Lua allows locals in one function (200),
-- so they are global variables.

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

http = chilkat.Http.new()

http.auth_token = "ACCESS_TOKEN"

http.accept = "application/json"

-- The following JSON is sent in the request body:

-- {
--   "first_name": "John",
--   "last_name": "Doe",
--   "advisor": {
--     "first_name": "Johan",
--     "last_name": "Strauss"
--   }
-- }

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

jsonRequestBody = chilkat.JsonObject.new()
jsonRequestBody:update_string("first_name", "John")
jsonRequestBody:update_string("last_name", "Doe")
jsonRequestBody:update_string("advisor.first_name", "Johan")
jsonRequestBody:update_string("advisor.last_name", "Strauss")

url = "https://crm.activix.ca/api/v2/leads/LEAD_ID"

resp = chilkat.HttpResponse.new()
success = http:http_json("PUT", url, jsonRequestBody, "application/json", resp)
if not success then
    print(http.last_error_text)
    return
end

print("Response Status Code: " .. resp.status_code)

jsonResponse = chilkat.JsonObject.new()
jsonResponse:load(resp.body_str)
jsonResponse.emit_compact = false
print(jsonResponse:emit())

if resp.status_code >= 300 then
    print("Failed.")
    return
end

-- Sample output...
-- (See the parsing code below..)
--
-- Use the 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,
--                 ...
--             },
--             ...
--         ]
--     }
-- }

id = 0
created_at = ""
updated_at = ""
lead_id = 0
address = ""
v_type = ""
valid = false
extension = ""
number = ""
validated = false
mobile = false
accessories = ""
allowed_odometer = ""
balance = 0
budget_max = ""
budget_min = ""
cash_down = ""
category = ""
category_rv = ""
client_number = ""
color_exterior = ""
color_interior = ""
comment = ""
condition = ""
end_contract_date = ""
end_warranty_date = ""
engine = ""
extended_warranty = ""
fuel = ""
length_max = ""
length_min = ""
license_plate = ""
make = ""
modality = ""
model = ""
odometer = ""
offer_number = ""
v_option = ""
order_number = ""
payment = ""
payment_frequency = ""
preparation = ""
price = ""
profit = ""
purchase_date = ""
rate = ""
recall = ""
recorded_date = ""
residual = ""
security_deposit = ""
sleeping = ""
sold = false
sold_by = ""
sold_date = ""
stock = ""
stock_state = ""
term = ""
tire = false
transmission = ""
trim = ""

value = ""
vin = ""
warranty = ""
weight = ""
year = ""
year_max = ""
year_min = ""

dataId = jsonResponse:int_of("data.id")
dataCreated_at = jsonResponse:string_of("data.created_at")
dataUpdated_at = jsonResponse:string_of("data.updated_at")
dataAccount_id = jsonResponse:int_of("data.account_id")
dataAddress_line1 = jsonResponse:string_of("data.address_line1")
dataAddress_line2 = jsonResponse:string_of("data.address_line2")
dataAppointment_date = jsonResponse:string_of("data.appointment_date")
dataAppt_call = jsonResponse:bool_of("data.appt_call")
dataAvailable_date = jsonResponse:string_of("data.available_date")
dataAverage_spending = jsonResponse:string_of("data.average_spending")
dataBe_back_date = jsonResponse:string_of("data.be_back_date")
dataBirth_date = jsonResponse:string_of("data.birth_date")
dataBusiness = jsonResponse:string_of("data.business")
dataCall_date = jsonResponse:string_of("data.call_date")
dataCity = jsonResponse:string_of("data.city")
dataCivility = jsonResponse:string_of("data.civility")
dataCode = jsonResponse:string_of("data.code")
dataCountry = jsonResponse:string_of("data.country")
dataCsi_date = jsonResponse:string_of("data.csi_date")
dataDelivered_by_id = jsonResponse:string_of("data.delivered_by_id")
dataDelivered_date = jsonResponse:string_of("data.delivered_date")
dataDelivery_date = jsonResponse:string_of("data.delivery_date")
dataDivision = jsonResponse:string_of("data.division")
dataEnd_service_date = jsonResponse:string_of("data.end_service_date")
dataFirst_name = jsonResponse:string_of("data.first_name")
dataGas = jsonResponse:string_of("data.gas")
dataGender = jsonResponse:int_of("data.gender")
dataInvoiced = jsonResponse:bool_of("data.invoiced")
dataLast_name = jsonResponse:string_of("data.last_name")
dataLast_visit_date = jsonResponse:string_of("data.last_visit_date")
dataLocale = jsonResponse:string_of("data.locale")
dataLoyalty = jsonResponse:string_of("data.loyalty")
dataNext_visit_date = jsonResponse:string_of("data.next_visit_date")
dataOdometer_last_visit = jsonResponse:string_of("data.odometer_last_visit")
dataOpen_work_order_date = jsonResponse:string_of("data.open_work_order_date")
dataPlanned_pick_up_date = jsonResponse:string_of("data.planned_pick_up_date")
dataPostal_code = jsonResponse:string_of("data.postal_code")
dataPrepaid = jsonResponse:string_of("data.prepaid")
dataPrepared = jsonResponse:bool_of("data.prepared")
dataPresented_date = jsonResponse:string_of("data.presented_date")
dataPromised_date = jsonResponse:string_of("data.promised_date")
dataProvince = jsonResponse:string_of("data.province")
dataRating = jsonResponse:string_of("data.rating")
dataReached_client = jsonResponse:bool_of("data.reached_client")
dataRefinanced_date = jsonResponse:string_of("data.refinanced_date")
dataRepair_date = jsonResponse:string_of("data.repair_date")
dataRepair_order = jsonResponse:string_of("data.repair_order")
dataResult = jsonResponse:string_of("data.result")
dataRoad_test_date = jsonResponse:string_of("data.road_test_date")
dataSale_date = jsonResponse:string_of("data.sale_date")
dataSecond_contact = jsonResponse:string_of("data.second_contact")
dataSecond_contact_civility = jsonResponse:string_of("data.second_contact_civility")
dataSegment = jsonResponse:string_of("data.segment")
dataService_cleaned = jsonResponse:bool_of("data.service_cleaned")
dataService_interval_km = jsonResponse:string_of("data.service_interval_km")
dataService_monthly_km = jsonResponse:string_of("data.service_monthly_km")
dataService_processIntention = jsonResponse:string_of("data.service_process.intention")
dataService_processTransport = jsonResponse:string_of("data.service_process.transport")
dataService_processWalk_around = jsonResponse:string_of("data.service_process.walk_around")
dataSex = jsonResponse:string_of("data.sex")
dataSource = jsonResponse:string_of("data.source")
dataStatus = jsonResponse:string_of("data.status")
dataStorage = jsonResponse:string_of("data.storage")
dataTake_over_date = jsonResponse:string_of("data.take_over_date")
dataType = jsonResponse:string_of("data.type")
dataUnsubscribe_all_date = jsonResponse:string_of("data.unsubscribe_all_date")
dataUnsubscribe_call_date = jsonResponse:string_of("data.unsubscribe_call_date")
dataUnsubscribe_email_date = jsonResponse:string_of("data.unsubscribe_email_date")
dataUnsubscribe_sms_date = jsonResponse:string_of("data.unsubscribe_sms_date")
dataWork_order = jsonResponse:string_of("data.work_order")
dataAccountId = jsonResponse:int_of("data.account.id")
dataAccountCreated_at = jsonResponse:string_of("data.account.created_at")
dataAccountUpdated_at = jsonResponse:string_of("data.account.updated_at")
dataAccountPartner_id = jsonResponse:int_of("data.account.partner_id")
dataAccountActivity_report = jsonResponse:bool_of("data.account.activity_report")
dataAccountCommercial = jsonResponse:bool_of("data.account.commercial")
dataAccountEvent = jsonResponse:bool_of("data.account.event")
dataAccountLeadxpress = jsonResponse:bool_of("data.account.leadxpress")
dataAccountLoyalty = jsonResponse:bool_of("data.account.loyalty")
dataAccountPhone_up = jsonResponse:bool_of("data.account.phone_up")
dataAccountRenewal = jsonResponse:bool_of("data.account.renewal")
dataAccountSale_table = jsonResponse:bool_of("data.account.sale_table")
dataAccountService = jsonResponse:bool_of("data.account.service")
dataAccountWalk_in = jsonResponse:bool_of("data.account.walk_in")
dataAccountWebboost = jsonResponse:bool_of("data.account.webboost")
dataAccountAccount_manager = jsonResponse:bool_of("data.account.account_manager")
dataAccountActivation_date = jsonResponse:string_of("data.account.activation_date")
dataAccountActive = jsonResponse:bool_of("data.account.active")
dataAccountAssigned_lead = jsonResponse:bool_of("data.account.assigned_lead")
dataAccountAuto_renewal = jsonResponse:bool_of("data.account.auto_renewal")
dataAccountAuto_renewal_new = jsonResponse:bool_of("data.account.auto_renewal_new")
dataAccountAuto_renewal_used = jsonResponse:bool_of("data.account.auto_renewal_used")
dataAccountAutomation = jsonResponse:bool_of("data.account.automation")
dataAccountBdc_advisor = jsonResponse:bool_of("data.account.bdc_advisor")
dataAccountCalendar_options = jsonResponse:bool_of("data.account.calendar_options")
dataAccountClient_card_fieldsProcessGas = jsonResponse:bool_of("data.account.client_card_fields.process.gas")
dataAccountClient_card_fieldsProcessRecorded = jsonResponse:bool_of("data.account.client_card_fields.process.recorded")
dataAccountClient_card_fieldsProcessAvailable = jsonResponse:bool_of("data.account.client_card_fields.process.available")
dataAccountClient_card_fieldsProcessDiscounted = jsonResponse:bool_of("data.account.client_card_fields.process.discounted")
dataAccountClient_card_fieldsCommercialProfit = jsonResponse:bool_of("data.account.client_card_fields.commercial.profit")
dataAccountClient_card_fieldsCommercialExclude = jsonResponse:bool_of("data.account.client_card_fields.commercial.exclude")
dataAccountClient_card_fieldsCommercialMeeting = jsonResponse:bool_of("data.account.client_card_fields.commercial.meeting")
dataAccountClient_card_fieldsPerformanceDeposit = jsonResponse:bool_of("data.account.client_card_fields.performance.deposit")
dataAccountClient_card_fieldsPerformanceRefinanced = jsonResponse:bool_of("data.account.client_card_fields.performance.refinanced")
dataAccountClient_card_fieldsPerformanceDealer_tour = jsonResponse:bool_of("data.account.client_card_fields.performance.dealer_tour")
dataAccountClient_card_fieldsPerformanceWalk_around = jsonResponse:bool_of("data.account.client_card_fields.performance.walk_around")
dataAccountClient_card_fieldsPerformanceQualification = jsonResponse:bool_of("data.account.client_card_fields.performance.qualification")
dataAccountClient_card_fieldsPerformanceTwenty_four_hour = jsonResponse:bool_of("data.account.client_card_fields.performance.twenty_four_hour")
dataAccountClient_card_fieldsGeneral_infoBudget = jsonResponse:bool_of("data.account.client_card_fields.general_info.budget")
dataAccountClient_card_fieldsGeneral_infoSector = jsonResponse:bool_of("data.account.client_card_fields.general_info.sector")
dataAccountClient_card_fieldsGeneral_infoCustom_1 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_1")
dataAccountClient_card_fieldsGeneral_infoCustom_2 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_2")
dataAccountClient_card_fieldsGeneral_infoCustom_3 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_3")
dataAccountClient_card_fieldsGeneral_infoCustom_4 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_4")
dataAccountClient_card_fieldsGeneral_infoCustom_5 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_5")
dataAccountClient_card_fieldsGeneral_infoCustom_6 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_6")
dataAccountClient_card_fieldsGeneral_infoCustom_7 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_7")
dataAccountClient_card_fieldsGeneral_infoCustom_8 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_8")
dataAccountClient_card_fieldsGeneral_infoCustom_9 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_9")
dataAccountClient_card_fieldsGeneral_infoCustom_10 = jsonResponse:bool_of("data.account.client_card_fields.general_info.custom_10")
dataAccountClient_card_fieldsGeneral_infoCommunication_preference = jsonResponse:bool_of("data.account.client_card_fields.general_info.communication_preference")
dataAccountClient_card_fieldsWanted_vehicleVin = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.vin")
dataAccountClient_card_fieldsWanted_vehicleFuel = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.fuel")
dataAccountClient_card_fieldsWanted_vehicleRate = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.rate")
dataAccountClient_card_fieldsWanted_vehicleTerm = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.term")
dataAccountClient_card_fieldsWanted_vehicleTire = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.tire")
dataAccountClient_card_fieldsWanted_vehicleYear = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.year")
dataAccountClient_card_fieldsWanted_vehicleColor = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.color")
dataAccountClient_card_fieldsWanted_vehiclePrice = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.price")
dataAccountClient_card_fieldsWanted_vehicleStock = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.stock")
dataAccountClient_card_fieldsWanted_vehicleTotal = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.total")
dataAccountClient_card_fieldsWanted_vehicleBudget = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.budget")
dataAccountClient_card_fieldsWanted_vehicleEngine = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.engine")
dataAccountClient_card_fieldsWanted_vehicleLength = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.length")
dataAccountClient_card_fieldsWanted_vehicleProfit = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.profit")
dataAccountClient_card_fieldsWanted_vehicleSuffix = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.suffix")
dataAccountClient_card_fieldsWanted_vehicleWeight = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.weight")
dataAccountClient_card_fieldsWanted_vehicleComment = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.comment")
dataAccountClient_card_fieldsWanted_vehicleMileage = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.mileage")
dataAccountClient_card_fieldsWanted_vehiclePayment = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.payment")
dataAccountClient_card_fieldsWanted_vehicleBodyType = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.bodyType")
dataAccountClient_card_fieldsWanted_vehicleCategory = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.category")
dataAccountClient_card_fieldsWanted_vehicleModality = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.modality")
dataAccountClient_card_fieldsWanted_vehicleResidual = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.residual")
dataAccountClient_card_fieldsWanted_vehicleSleeping = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.sleeping")
dataAccountClient_card_fieldsWanted_vehicleWarranty = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.warranty")
dataAccountClient_card_fieldsWanted_vehicleFrequency = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.frequency")
dataAccountClient_card_fieldsWanted_vehicleAccessories = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.accessories")
dataAccountClient_card_fieldsWanted_vehicleCategory_rv = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.category_rv")
dataAccountClient_card_fieldsWanted_vehiclePreparation = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.preparation")
dataAccountClient_card_fieldsWanted_vehicleInitial_cash = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.initial_cash")
dataAccountClient_card_fieldsWanted_vehicleOffer_number = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.offer_number")
dataAccountClient_card_fieldsWanted_vehicleOrder_number = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.order_number")
dataAccountClient_card_fieldsWanted_vehicleTransmission = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.transmission")
dataAccountClient_card_fieldsWanted_vehicleDocumentation = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.documentation")
dataAccountClient_card_fieldsWanted_vehicleDrivingWheels = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.drivingWheels")
dataAccountClient_card_fieldsWanted_vehicleColor_exterior = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.color_exterior")
dataAccountClient_card_fieldsWanted_vehicleColor_interior = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.color_interior")
dataAccountClient_card_fieldsWanted_vehicleAllowed_mileage = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.allowed_mileage")
dataAccountClient_card_fieldsWanted_vehicleSecurity_deposit = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.security_deposit")
dataAccountClient_card_fieldsWanted_vehicleEnd_contract_date = jsonResponse:bool_of("data.account.client_card_fields.wanted_vehicle.end_contract_date")
dataAccountClient_card_fieldsExchange_vehicleVin = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.vin")
dataAccountClient_card_fieldsExchange_vehicleFuel = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.fuel")
dataAccountClient_card_fieldsExchange_vehicleLink = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.link")
dataAccountClient_card_fieldsExchange_vehicleRate = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.rate")
dataAccountClient_card_fieldsExchange_vehicleTerm = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.term")
dataAccountClient_card_fieldsExchange_vehicleYear = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.year")
dataAccountClient_card_fieldsExchange_vehicleColor = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.color")
dataAccountClient_card_fieldsExchange_vehiclePrice = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.price")
dataAccountClient_card_fieldsExchange_vehicleStock = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.stock")
dataAccountClient_card_fieldsExchange_vehicleValue = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.value")
dataAccountClient_card_fieldsExchange_vehicleBudget = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.budget")
dataAccountClient_card_fieldsExchange_vehicleEngine = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.engine")
dataAccountClient_card_fieldsExchange_vehicleLength = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.length")
dataAccountClient_card_fieldsExchange_vehicleProfit = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.profit")
dataAccountClient_card_fieldsExchange_vehicleSuffix = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.suffix")
dataAccountClient_card_fieldsExchange_vehicleWeight = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.weight")
dataAccountClient_card_fieldsExchange_vehicleBalance = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.balance")
dataAccountClient_card_fieldsExchange_vehicleComment = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.comment")
dataAccountClient_card_fieldsExchange_vehicleMileage = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.mileage")
dataAccountClient_card_fieldsExchange_vehiclePayment = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.payment")
dataAccountClient_card_fieldsExchange_vehicleRenewal = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.renewal")
dataAccountClient_card_fieldsExchange_vehicleSold_by = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.sold_by")
dataAccountClient_card_fieldsExchange_vehicleBodyType = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.bodyType")
dataAccountClient_card_fieldsExchange_vehicleCategory = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.category")
dataAccountClient_card_fieldsExchange_vehicleModality = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.modality")
dataAccountClient_card_fieldsExchange_vehicleResidual = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.residual")
dataAccountClient_card_fieldsExchange_vehicleSleeping = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.sleeping")
dataAccountClient_card_fieldsExchange_vehicleWarranty = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.warranty")
dataAccountClient_card_fieldsExchange_vehicleCondition = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.condition")
dataAccountClient_card_fieldsExchange_vehicleFrequency = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.frequency")
dataAccountClient_card_fieldsExchange_vehicleIntention = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.intention")
dataAccountClient_card_fieldsExchange_vehicleRefinance = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.refinance")
dataAccountClient_card_fieldsExchange_vehicleRequested = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.requested")
dataAccountClient_card_fieldsExchange_vehicleSold_date = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.sold_date")
dataAccountClient_card_fieldsExchange_vehicleCategory_rv = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.category_rv")
dataAccountClient_card_fieldsExchange_vehicleInstitution = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.institution")
dataAccountClient_card_fieldsExchange_vehicleInitial_cash = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.initial_cash")
dataAccountClient_card_fieldsExchange_vehicleOffer_number = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.offer_number")
dataAccountClient_card_fieldsExchange_vehicleTransmission = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.transmission")
dataAccountClient_card_fieldsExchange_vehicleDrivingWheels = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.drivingWheels")
dataAccountClient_card_fieldsExchange_vehicleColor_exterior = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.color_exterior")
dataAccountClient_card_fieldsExchange_vehicleColor_interior = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.color_interior")
dataAccountClient_card_fieldsExchange_vehicleAllowed_mileage = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.allowed_mileage")
dataAccountClient_card_fieldsExchange_vehicleSecurity_deposit = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.security_deposit")
dataAccountClient_card_fieldsExchange_vehicleEnd_contract_date = jsonResponse:bool_of("data.account.client_card_fields.exchange_vehicle.end_contract_date")
dataAccountClient_number = jsonResponse:bool_of("data.account.client_number")
dataAccountConfirmation_appt = jsonResponse:bool_of("data.account.confirmation_appt")
dataAccountCredit = jsonResponse:bool_of("data.account.credit")
dataAccountCsi = jsonResponse:bool_of("data.account.csi")
dataAccountCsi_used = jsonResponse:bool_of("data.account.csi_used")
dataAccountDefault_deliveryman_user_id = jsonResponse:string_of("data.account.default_deliveryman_user_id")
dataAccountDelivered_by = jsonResponse:bool_of("data.account.delivered_by")
dataAccountDisable_communication_audio = jsonResponse:bool_of("data.account.disable_communication_audio")
dataAccountDuplicates = jsonResponse:bool_of("data.account.duplicates")
dataAccountGuest_action = jsonResponse:bool_of("data.account.guest_action")
dataAccountEmail_client = jsonResponse:bool_of("data.account.email_client")
dataAccountIn_turn = jsonResponse:bool_of("data.account.in_turn")
dataAccountIn_turn_director_management = jsonResponse:bool_of("data.account.in_turn_director_management")
dataAccountLeads_other_division = jsonResponse:bool_of("data.account.leads_other_division")
dataAccountLeadxpress_optionPriority = jsonResponse:int_of("data.account.leadxpress_option.priority")
dataAccountLeadxpress_optionReminderFrequency = jsonResponse:int_of("data.account.leadxpress_option.reminder.frequency")
dataAccountLeadxpress_optionReminderRecurrence = jsonResponse:int_of("data.account.leadxpress_option.reminder.recurrence")
dataAccountLeadxpress_optionScheduleAccount = jsonResponse:bool_of("data.account.leadxpress_option.schedule.account")
dataAccountLeadxpress_optionScheduleAdvisor = jsonResponse:bool_of("data.account.leadxpress_option.schedule.advisor")
dataAccountLimited_audio_access = jsonResponse:bool_of("data.account.limited_audio_access")
dataAccountLogo = jsonResponse:string_of("data.account.logo")
dataAccountLogo_en = jsonResponse:string_of("data.account.logo_en")
dataAccountMandatory_coordinate = jsonResponse:bool_of("data.account.mandatory_coordinate")
dataAccountManually_status = jsonResponse:bool_of("data.account.manually_status")
dataAccountMerge_rule = jsonResponse:string_of("data.account.merge_rule")
dataAccountMonth_start_day = jsonResponse:int_of("data.account.month_start_day")
dataAccountName = jsonResponse:string_of("data.account.name")
dataAccountNiotext = jsonResponse:bool_of("data.account.niotext")
dataAccountNiotext_phone = jsonResponse:bool_of("data.account.niotext_phone")
dataAccountPhone = jsonResponse:string_of("data.account.phone")
dataAccountPower_sport = jsonResponse:bool_of("data.account.power_sport")
dataAccountProcess = jsonResponse:bool_of("data.account.process")
dataAccountRecreative_special = jsonResponse:bool_of("data.account.recreative_special")
dataAccountResult_date_validation = jsonResponse:bool_of("data.account.result_date_validation")
dataAccountSale_accessories = jsonResponse:bool_of("data.account.sale_accessories")
dataAccountSale_by_phone = jsonResponse:bool_of("data.account.sale_by_phone")
dataAccountSale_date_month = jsonResponse:bool_of("data.account.sale_date_month")
dataAccountSale_table_optionsAccessory_column = jsonResponse:bool_of("data.account.sale_table_options.accessory_column")
dataAccountSale_table_optionsCommercial_column = jsonResponse:bool_of("data.account.sale_table_options.commercial_column")
dataAccountSale_table_optionsDivision_grouped_total_column = jsonResponse:bool_of("data.account.sale_table_options.division_grouped_total_column")
dataAccountSale_validation = jsonResponse:bool_of("data.account.sale_validation")
dataAccountScan = jsonResponse:bool_of("data.account.scan")
dataAccountStock_required_for_sale = jsonResponse:bool_of("data.account.stock_required_for_sale")
dataAccountTake_over_director = jsonResponse:bool_of("data.account.take_over_director")
dataAccountTrade_report = jsonResponse:bool_of("data.account.trade_report")
dataAccountUnrestricted_assignment = jsonResponse:bool_of("data.account.unrestricted_assignment")
dataAccountUnsubscribe = jsonResponse:bool_of("data.account.unsubscribe")
dataAccountUntreated_lead = jsonResponse:bool_of("data.account.untreated_lead")
dataAccountVehicle_model_text = jsonResponse:bool_of("data.account.vehicle_model_text")
dataAccountVehicle_text = jsonResponse:bool_of("data.account.vehicle_text")
dataAccountVerified_sale = jsonResponse:bool_of("data.account.verified_sale")
dataAccountVin_decoder = jsonResponse:bool_of("data.account.vin_decoder")
dataAccountWaiting_sale_date = jsonResponse:string_of("data.account.waiting_sale_date")
dataAccountWaiting_sale_option = jsonResponse:bool_of("data.account.waiting_sale_option")
dataAdvisor = jsonResponse:string_of("data.advisor")
dataBdc = jsonResponse:string_of("data.bdc")
dataCommercial = jsonResponse:string_of("data.commercial")
dataService_advisor = jsonResponse:string_of("data.service_advisor")
dataService_agent = jsonResponse:string_of("data.service_agent")
i = 0
count_i = jsonResponse:size_of_array("data.emails")
while i < count_i do
    jsonResponse.i = i
    id = jsonResponse:int_of("data.emails[i].id")
    created_at = jsonResponse:string_of("data.emails[i].created_at")
    updated_at = jsonResponse:string_of("data.emails[i].updated_at")
    lead_id = jsonResponse:int_of("data.emails[i].lead_id")
    address = jsonResponse:string_of("data.emails[i].address")
    v_type = jsonResponse:string_of("data.emails[i].type")
    valid = jsonResponse:bool_of("data.emails[i].valid")
    i = i + 1
end

i = 0
count_i = jsonResponse:size_of_array("data.phones")
while i < count_i do
    jsonResponse.i = i
    id = jsonResponse:int_of("data.phones[i].id")
    created_at = jsonResponse:string_of("data.phones[i].created_at")
    updated_at = jsonResponse:string_of("data.phones[i].updated_at")
    lead_id = jsonResponse:int_of("data.phones[i].lead_id")
    extension = jsonResponse:string_of("data.phones[i].extension")
    number = jsonResponse:string_of("data.phones[i].number")
    v_type = jsonResponse:string_of("data.phones[i].type")
    valid = jsonResponse:bool_of("data.phones[i].valid")
    validated = jsonResponse:bool_of("data.phones[i].validated")
    mobile = jsonResponse:bool_of("data.phones[i].mobile")
    i = i + 1
end

i = 0
count_i = jsonResponse:size_of_array("data.vehicles")
while i < count_i do
    jsonResponse.i = i
    id = jsonResponse:int_of("data.vehicles[i].id")
    created_at = jsonResponse:string_of("data.vehicles[i].created_at")
    updated_at = jsonResponse:string_of("data.vehicles[i].updated_at")
    lead_id = jsonResponse:int_of("data.vehicles[i].lead_id")
    accessories = jsonResponse:string_of("data.vehicles[i].accessories")
    allowed_odometer = jsonResponse:string_of("data.vehicles[i].allowed_odometer")
    balance = jsonResponse:int_of("data.vehicles[i].balance")
    budget_max = jsonResponse:string_of("data.vehicles[i].budget_max")
    budget_min = jsonResponse:string_of("data.vehicles[i].budget_min")
    cash_down = jsonResponse:string_of("data.vehicles[i].cash_down")
    category = jsonResponse:string_of("data.vehicles[i].category")
    category_rv = jsonResponse:string_of("data.vehicles[i].category_rv")
    client_number = jsonResponse:string_of("data.vehicles[i].client_number")
    color_exterior = jsonResponse:string_of("data.vehicles[i].color_exterior")
    color_interior = jsonResponse:string_of("data.vehicles[i].color_interior")
    comment = jsonResponse:string_of("data.vehicles[i].comment")
    condition = jsonResponse:string_of("data.vehicles[i].condition")
    end_contract_date = jsonResponse:string_of("data.vehicles[i].end_contract_date")
    end_warranty_date = jsonResponse:string_of("data.vehicles[i].end_warranty_date")
    engine = jsonResponse:string_of("data.vehicles[i].engine")
    extended_warranty = jsonResponse:string_of("data.vehicles[i].extended_warranty")
    fuel = jsonResponse:string_of("data.vehicles[i].fuel")
    length_max = jsonResponse:string_of("data.vehicles[i].length_max")
    length_min = jsonResponse:string_of("data.vehicles[i].length_min")
    license_plate = jsonResponse:string_of("data.vehicles[i].license_plate")
    make = jsonResponse:string_of("data.vehicles[i].make")
    modality = jsonResponse:string_of("data.vehicles[i].modality")
    model = jsonResponse:string_of("data.vehicles[i].model")
    odometer = jsonResponse:string_of("data.vehicles[i].odometer")
    offer_number = jsonResponse:string_of("data.vehicles[i].offer_number")
    v_option = jsonResponse:string_of("data.vehicles[i].option")
    order_number = jsonResponse:string_of("data.vehicles[i].order_number")
    payment = jsonResponse:string_of("data.vehicles[i].payment")
    payment_frequency = jsonResponse:string_of("data.vehicles[i].payment_frequency")
    preparation = jsonResponse:string_of("data.vehicles[i].preparation")
    price = jsonResponse:string_of("data.vehicles[i].price")
    profit = jsonResponse:string_of("data.vehicles[i].profit")
    purchase_date = jsonResponse:string_of("data.vehicles[i].purchase_date")
    rate = jsonResponse:string_of("data.vehicles[i].rate")
    recall = jsonResponse:string_of("data.vehicles[i].recall")
    recorded_date = jsonResponse:string_of("data.vehicles[i].recorded_date")
    residual = jsonResponse:string_of("data.vehicles[i].residual")
    security_deposit = jsonResponse:string_of("data.vehicles[i].security_deposit")
    sleeping = jsonResponse:string_of("data.vehicles[i].sleeping")
    sold = jsonResponse:bool_of("data.vehicles[i].sold")
    sold_by = jsonResponse:string_of("data.vehicles[i].sold_by")
    sold_date = jsonResponse:string_of("data.vehicles[i].sold_date")
    stock = jsonResponse:string_of("data.vehicles[i].stock")
    stock_state = jsonResponse:string_of("data.vehicles[i].stock_state")
    term = jsonResponse:string_of("data.vehicles[i].term")
    tire = jsonResponse:bool_of("data.vehicles[i].tire")
    transmission = jsonResponse:string_of("data.vehicles[i].transmission")
    trim = jsonResponse:string_of("data.vehicles[i].trim")
    v_type = jsonResponse:string_of("data.vehicles[i].type")
    url = jsonResponse:string_of("data.vehicles[i].url")
    value = jsonResponse:string_of("data.vehicles[i].value")
    vin = jsonResponse:string_of("data.vehicles[i].vin")
    warranty = jsonResponse:string_of("data.vehicles[i].warranty")
    weight = jsonResponse:string_of("data.vehicles[i].weight")
    year = jsonResponse:string_of("data.vehicles[i].year")
    year_max = jsonResponse:string_of("data.vehicles[i].year_max")
    year_min = jsonResponse:string_of("data.vehicles[i].year_min")
    i = i + 1
end

i = 0
count_i = jsonResponse:size_of_array("data.related_ids")
while i < count_i do
    jsonResponse.i = i
    i = i + 1
end