Rust Requires Chilkat v11.0.0+
Rust
Activix CRM Create a Lead
See more Activix CRM Examples
Demonstrates how to create a lead and returns the created lead.Chilkat Rust Downloads
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = chilkat::Http::new();
http.set_auth_token("ACCESS_TOKEN");
http.set_accept("application/json");
// The following JSON is sent in the request body:
// {
// "account_id": "MY_ACCOUNT_ID",
// "first_name": "John",
// "last_name": "Doe",
// "type": "email",
// "advisor": {
// "first_name": "John",
// "last_name": "Doe"
// },
// "emails": [
// {
// "address": "hello@example.com",
// "type": "home"
// }
// ],
// "phones": [
// {
// "number": "+15144321214",
// "extension": 12345,
// "type": "home"
// }
// ],
// "vehicles": [
// {
// "make": "Aston Martin",
// "model": "DB11",
// "year": 2018,
// "type": "wanted"
// }
// ]
// }
// Use this online tool to generate the code from sample JSON:
// Generate Code to Create JSON
let json_request_body = chilkat::JsonObject::new();
let _ = json_request_body.update_string("account_id", "MY_ACCOUNT_ID");
let _ = json_request_body.update_string("first_name", "John");
let _ = json_request_body.update_string("last_name", "Doe");
let _ = json_request_body.update_string("type", "email");
let _ = json_request_body.update_string("advisor.first_name", "John");
let _ = json_request_body.update_string("advisor.last_name", "Doe");
let _ = json_request_body.update_string("emails[0].address", "hello@example.com");
let _ = json_request_body.update_string("emails[0].type", "home");
let _ = json_request_body.update_string("phones[0].number", "+15144321214");
let _ = json_request_body.update_int("phones[0].extension", 12345);
let _ = json_request_body.update_string("phones[0].type", "home");
let _ = json_request_body.update_string("vehicles[0].make", "Aston Martin");
let _ = json_request_body.update_string("vehicles[0].model", "DB11");
let _ = json_request_body.update_int("vehicles[0].year", 2018);
let _ = json_request_body.update_string("vehicles[0].type", "wanted");
let url = "https://crm.activix.ca/api/v2/leads".to_string();
let resp = chilkat::HttpResponse::new();
if http.http_json("POST", &url, &json_request_body, "application/json", &resp).is_err() {
println!("{}", http.last_error_text());
return;
}
println!("Response Status Code: {}", resp.status_code());
let json_response = chilkat::JsonObject::new();
let _ = json_response.load(&resp.body_str());
json_response.set_emit_compact(false);
println!("{}", json_response.emit().unwrap_or_default());
if resp.status_code() >= 300 {
println!("Failed.");
return;
}
// 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,
// ...
// },
// ...
// ]
// }
// }
let data_account_id: i32 = 0;
let mut data_account_id: i32 = 0;
let mut i: i32 = 0;
let mut count_i: i32 = 0;
let mut url = String::new();
let data_id = json_response.int_of("data.id");
let data_created_at = json_response.string_of("data.created_at").unwrap_or_default();
let data_updated_at = json_response.string_of("data.updated_at").unwrap_or_default();
data_account_id = json_response.int_of("data.account_id");
let data_address_line1 = json_response.string_of("data.address_line1").unwrap_or_default();
let data_address_line2 = json_response.string_of("data.address_line2").unwrap_or_default();
let data_appointment_date = json_response.string_of("data.appointment_date").unwrap_or_default();
let data_appt_call = json_response.string_of("data.appt_call").unwrap_or_default();
let data_available_date = json_response.string_of("data.available_date").unwrap_or_default();
let data_average_spending = json_response.string_of("data.average_spending").unwrap_or_default();
let data_be_back_date = json_response.string_of("data.be_back_date").unwrap_or_default();
let data_birth_date = json_response.string_of("data.birth_date").unwrap_or_default();
let data_business = json_response.string_of("data.business").unwrap_or_default();
let data_call_date = json_response.string_of("data.call_date").unwrap_or_default();
let data_city = json_response.string_of("data.city").unwrap_or_default();
let data_civility = json_response.string_of("data.civility").unwrap_or_default();
let data_code = json_response.string_of("data.code").unwrap_or_default();
let data_country = json_response.string_of("data.country").unwrap_or_default();
let data_csi_date = json_response.string_of("data.csi_date").unwrap_or_default();
let data_delivered_by_id = json_response.string_of("data.delivered_by_id").unwrap_or_default();
let data_delivered_date = json_response.string_of("data.delivered_date").unwrap_or_default();
let data_delivery_date = json_response.string_of("data.delivery_date").unwrap_or_default();
let data_division = json_response.string_of("data.division").unwrap_or_default();
let data_end_service_date = json_response.string_of("data.end_service_date").unwrap_or_default();
let data_first_name = json_response.string_of("data.first_name").unwrap_or_default();
let data_gas = json_response.string_of("data.gas").unwrap_or_default();
let data_gender = json_response.int_of("data.gender");
let data_invoiced = json_response.string_of("data.invoiced").unwrap_or_default();
let data_last_name = json_response.string_of("data.last_name").unwrap_or_default();
let data_last_visit_date = json_response.string_of("data.last_visit_date").unwrap_or_default();
let data_locale = json_response.string_of("data.locale").unwrap_or_default();
let data_loyalty = json_response.string_of("data.loyalty").unwrap_or_default();
let data_next_visit_date = json_response.string_of("data.next_visit_date").unwrap_or_default();
let data_odometer_last_visit = json_response.string_of("data.odometer_last_visit").unwrap_or_default();
let data_open_work_order_date = json_response.string_of("data.open_work_order_date").unwrap_or_default();
let data_planned_pick_up_date = json_response.string_of("data.planned_pick_up_date").unwrap_or_default();
let data_postal_code = json_response.string_of("data.postal_code").unwrap_or_default();
let data_prepaid = json_response.string_of("data.prepaid").unwrap_or_default();
let data_prepared = json_response.string_of("data.prepared").unwrap_or_default();
let data_presented_date = json_response.string_of("data.presented_date").unwrap_or_default();
let data_promised_date = json_response.string_of("data.promised_date").unwrap_or_default();
let data_province = json_response.string_of("data.province").unwrap_or_default();
let data_rating = json_response.string_of("data.rating").unwrap_or_default();
let data_reached_client = json_response.string_of("data.reached_client").unwrap_or_default();
let data_refinanced_date = json_response.string_of("data.refinanced_date").unwrap_or_default();
let data_repair_date = json_response.string_of("data.repair_date").unwrap_or_default();
let data_repair_order = json_response.string_of("data.repair_order").unwrap_or_default();
let data_result = json_response.string_of("data.result").unwrap_or_default();
let data_road_test_date = json_response.string_of("data.road_test_date").unwrap_or_default();
let data_sale_date = json_response.string_of("data.sale_date").unwrap_or_default();
let data_second_contact = json_response.string_of("data.second_contact").unwrap_or_default();
let data_second_contact_civility = json_response.string_of("data.second_contact_civility").unwrap_or_default();
let data_segment = json_response.string_of("data.segment").unwrap_or_default();
let data_service_cleaned = json_response.string_of("data.service_cleaned").unwrap_or_default();
let data_service_interval_km = json_response.string_of("data.service_interval_km").unwrap_or_default();
let data_service_monthly_km = json_response.string_of("data.service_monthly_km").unwrap_or_default();
let data_sex = json_response.string_of("data.sex").unwrap_or_default();
let data_source = json_response.string_of("data.source").unwrap_or_default();
let data_status = json_response.string_of("data.status").unwrap_or_default();
let data_storage = json_response.string_of("data.storage").unwrap_or_default();
let data_take_over_date = json_response.string_of("data.take_over_date").unwrap_or_default();
let data_type = json_response.string_of("data.type").unwrap_or_default();
let data_unsubscribe_all_date = json_response.string_of("data.unsubscribe_all_date").unwrap_or_default();
let data_unsubscribe_call_date = json_response.string_of("data.unsubscribe_call_date").unwrap_or_default();
let data_unsubscribe_email_date = json_response.string_of("data.unsubscribe_email_date").unwrap_or_default();
let data_unsubscribe_sms_date = json_response.string_of("data.unsubscribe_sms_date").unwrap_or_default();
let data_work_order = json_response.string_of("data.work_order").unwrap_or_default();
data_account_id = json_response.int_of("data.account.id");
let data_account_created_at = json_response.string_of("data.account.created_at").unwrap_or_default();
let data_account_updated_at = json_response.string_of("data.account.updated_at").unwrap_or_default();
let data_account_partner_id = json_response.int_of("data.account.partner_id");
let data_account_activity_report = json_response.bool_of("data.account.activity_report");
let data_account_commercial = json_response.bool_of("data.account.commercial");
let data_account_event = json_response.bool_of("data.account.event");
let data_account_leadxpress = json_response.bool_of("data.account.leadxpress");
let data_account_loyalty = json_response.bool_of("data.account.loyalty");
let data_account_phone_up = json_response.bool_of("data.account.phone_up");
let data_account_renewal = json_response.bool_of("data.account.renewal");
let data_account_sale_table = json_response.bool_of("data.account.sale_table");
let data_account_service = json_response.bool_of("data.account.service");
let data_account_walk_in = json_response.bool_of("data.account.walk_in");
let data_account_webboost = json_response.bool_of("data.account.webboost");
let data_account_account_manager = json_response.bool_of("data.account.account_manager");
let data_account_activation_date = json_response.string_of("data.account.activation_date").unwrap_or_default();
let data_account_active = json_response.bool_of("data.account.active");
let data_account_assigned_lead = json_response.bool_of("data.account.assigned_lead");
let data_account_auto_renewal = json_response.bool_of("data.account.auto_renewal");
let data_account_auto_renewal_new = json_response.bool_of("data.account.auto_renewal_new");
let data_account_auto_renewal_used = json_response.bool_of("data.account.auto_renewal_used");
let data_account_automation = json_response.bool_of("data.account.automation");
let data_account_bdc_advisor = json_response.bool_of("data.account.bdc_advisor");
let data_account_calendar_options = json_response.bool_of("data.account.calendar_options");
let data_account_client_card_fields_process_gas = json_response.bool_of("data.account.client_card_fields.process.gas");
let data_account_client_card_fields_process_recorded = json_response.bool_of("data.account.client_card_fields.process.recorded");
let data_account_client_card_fields_process_available = json_response.bool_of("data.account.client_card_fields.process.available");
let data_account_client_card_fields_process_discounted = json_response.bool_of("data.account.client_card_fields.process.discounted");
let data_account_client_card_fields_commercial_profit = json_response.bool_of("data.account.client_card_fields.commercial.profit");
let data_account_client_card_fields_commercial_exclude = json_response.bool_of("data.account.client_card_fields.commercial.exclude");
let data_account_client_card_fields_commercial_meeting = json_response.bool_of("data.account.client_card_fields.commercial.meeting");
let data_account_client_card_fields_performance_deposit = json_response.bool_of("data.account.client_card_fields.performance.deposit");
let data_account_client_card_fields_performance_refinanced = json_response.bool_of("data.account.client_card_fields.performance.refinanced");
let data_account_client_card_fields_performance_dealer_tour = json_response.bool_of("data.account.client_card_fields.performance.dealer_tour");
let data_account_client_card_fields_performance_walk_around = json_response.bool_of("data.account.client_card_fields.performance.walk_around");
let data_account_client_card_fields_performance_qualification = json_response.bool_of("data.account.client_card_fields.performance.qualification");
let data_account_client_card_fields_performance_twenty_four_hour = json_response.bool_of("data.account.client_card_fields.performance.twenty_four_hour");
let data_account_client_card_fields_general_info_budget = json_response.bool_of("data.account.client_card_fields.general_info.budget");
let data_account_client_card_fields_general_info_sector = json_response.bool_of("data.account.client_card_fields.general_info.sector");
let data_account_client_card_fields_general_info_custom_1 = json_response.bool_of("data.account.client_card_fields.general_info.custom_1");
let data_account_client_card_fields_general_info_custom_2 = json_response.bool_of("data.account.client_card_fields.general_info.custom_2");
let data_account_client_card_fields_general_info_custom_3 = json_response.bool_of("data.account.client_card_fields.general_info.custom_3");
let data_account_client_card_fields_general_info_custom_4 = json_response.bool_of("data.account.client_card_fields.general_info.custom_4");
let data_account_client_card_fields_general_info_custom_5 = json_response.bool_of("data.account.client_card_fields.general_info.custom_5");
let data_account_client_card_fields_general_info_custom_6 = json_response.bool_of("data.account.client_card_fields.general_info.custom_6");
let data_account_client_card_fields_general_info_custom_7 = json_response.bool_of("data.account.client_card_fields.general_info.custom_7");
let data_account_client_card_fields_general_info_custom_8 = json_response.bool_of("data.account.client_card_fields.general_info.custom_8");
let data_account_client_card_fields_general_info_custom_9 = json_response.bool_of("data.account.client_card_fields.general_info.custom_9");
let data_account_client_card_fields_general_info_custom_10 = json_response.bool_of("data.account.client_card_fields.general_info.custom_10");
let data_account_client_card_fields_general_info_communication_preference = json_response.bool_of("data.account.client_card_fields.general_info.communication_preference");
let data_account_client_card_fields_wanted_vehicle_vin = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.vin");
let data_account_client_card_fields_wanted_vehicle_fuel = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.fuel");
let data_account_client_card_fields_wanted_vehicle_rate = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.rate");
let data_account_client_card_fields_wanted_vehicle_term = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.term");
let data_account_client_card_fields_wanted_vehicle_tire = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.tire");
let data_account_client_card_fields_wanted_vehicle_year = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.year");
let data_account_client_card_fields_wanted_vehicle_color = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.color");
let data_account_client_card_fields_wanted_vehicle_price = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.price");
let data_account_client_card_fields_wanted_vehicle_stock = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.stock");
let data_account_client_card_fields_wanted_vehicle_total = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.total");
let data_account_client_card_fields_wanted_vehicle_budget = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.budget");
let data_account_client_card_fields_wanted_vehicle_engine = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.engine");
let data_account_client_card_fields_wanted_vehicle_length = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.length");
let data_account_client_card_fields_wanted_vehicle_profit = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.profit");
let data_account_client_card_fields_wanted_vehicle_suffix = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.suffix");
let data_account_client_card_fields_wanted_vehicle_weight = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.weight");
let data_account_client_card_fields_wanted_vehicle_comment = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.comment");
let data_account_client_card_fields_wanted_vehicle_mileage = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.mileage");
let data_account_client_card_fields_wanted_vehicle_payment = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.payment");
let data_account_client_card_fields_wanted_vehicle_body_type = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.bodyType");
let data_account_client_card_fields_wanted_vehicle_category = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.category");
let data_account_client_card_fields_wanted_vehicle_modality = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.modality");
let data_account_client_card_fields_wanted_vehicle_residual = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.residual");
let data_account_client_card_fields_wanted_vehicle_sleeping = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.sleeping");
let data_account_client_card_fields_wanted_vehicle_warranty = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.warranty");
let data_account_client_card_fields_wanted_vehicle_frequency = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.frequency");
let data_account_client_card_fields_wanted_vehicle_accessories = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.accessories");
let data_account_client_card_fields_wanted_vehicle_category_rv = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.category_rv");
let data_account_client_card_fields_wanted_vehicle_preparation = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.preparation");
let data_account_client_card_fields_wanted_vehicle_initial_cash = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.initial_cash");
let data_account_client_card_fields_wanted_vehicle_offer_number = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.offer_number");
let data_account_client_card_fields_wanted_vehicle_order_number = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.order_number");
let data_account_client_card_fields_wanted_vehicle_transmission = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.transmission");
let data_account_client_card_fields_wanted_vehicle_documentation = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.documentation");
let data_account_client_card_fields_wanted_vehicle_driving_wheels = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.drivingWheels");
let data_account_client_card_fields_wanted_vehicle_color_exterior = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.color_exterior");
let data_account_client_card_fields_wanted_vehicle_color_interior = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.color_interior");
let data_account_client_card_fields_wanted_vehicle_allowed_mileage = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.allowed_mileage");
let data_account_client_card_fields_wanted_vehicle_security_deposit = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.security_deposit");
let data_account_client_card_fields_wanted_vehicle_end_contract_date = json_response.bool_of("data.account.client_card_fields.wanted_vehicle.end_contract_date");
let data_account_client_card_fields_exchange_vehicle_vin = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.vin");
let data_account_client_card_fields_exchange_vehicle_fuel = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.fuel");
let data_account_client_card_fields_exchange_vehicle_link = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.link");
let data_account_client_card_fields_exchange_vehicle_rate = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.rate");
let data_account_client_card_fields_exchange_vehicle_term = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.term");
let data_account_client_card_fields_exchange_vehicle_year = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.year");
let data_account_client_card_fields_exchange_vehicle_color = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.color");
let data_account_client_card_fields_exchange_vehicle_price = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.price");
let data_account_client_card_fields_exchange_vehicle_stock = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.stock");
let data_account_client_card_fields_exchange_vehicle_value = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.value");
let data_account_client_card_fields_exchange_vehicle_budget = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.budget");
let data_account_client_card_fields_exchange_vehicle_engine = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.engine");
let data_account_client_card_fields_exchange_vehicle_length = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.length");
let data_account_client_card_fields_exchange_vehicle_profit = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.profit");
let data_account_client_card_fields_exchange_vehicle_suffix = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.suffix");
let data_account_client_card_fields_exchange_vehicle_weight = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.weight");
let data_account_client_card_fields_exchange_vehicle_balance = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.balance");
let data_account_client_card_fields_exchange_vehicle_comment = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.comment");
let data_account_client_card_fields_exchange_vehicle_mileage = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.mileage");
let data_account_client_card_fields_exchange_vehicle_payment = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.payment");
let data_account_client_card_fields_exchange_vehicle_renewal = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.renewal");
let data_account_client_card_fields_exchange_vehicle_sold_by = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.sold_by");
let data_account_client_card_fields_exchange_vehicle_body_type = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.bodyType");
let data_account_client_card_fields_exchange_vehicle_category = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.category");
let data_account_client_card_fields_exchange_vehicle_modality = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.modality");
let data_account_client_card_fields_exchange_vehicle_residual = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.residual");
let data_account_client_card_fields_exchange_vehicle_sleeping = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.sleeping");
let data_account_client_card_fields_exchange_vehicle_warranty = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.warranty");
let data_account_client_card_fields_exchange_vehicle_condition = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.condition");
let data_account_client_card_fields_exchange_vehicle_frequency = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.frequency");
let data_account_client_card_fields_exchange_vehicle_intention = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.intention");
let data_account_client_card_fields_exchange_vehicle_refinance = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.refinance");
let data_account_client_card_fields_exchange_vehicle_requested = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.requested");
let data_account_client_card_fields_exchange_vehicle_sold_date = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.sold_date");
let data_account_client_card_fields_exchange_vehicle_category_rv = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.category_rv");
let data_account_client_card_fields_exchange_vehicle_institution = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.institution");
let data_account_client_card_fields_exchange_vehicle_initial_cash = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.initial_cash");
let data_account_client_card_fields_exchange_vehicle_offer_number = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.offer_number");
let data_account_client_card_fields_exchange_vehicle_transmission = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.transmission");
let data_account_client_card_fields_exchange_vehicle_driving_wheels = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.drivingWheels");
let data_account_client_card_fields_exchange_vehicle_color_exterior = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.color_exterior");
let data_account_client_card_fields_exchange_vehicle_color_interior = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.color_interior");
let data_account_client_card_fields_exchange_vehicle_allowed_mileage = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.allowed_mileage");
let data_account_client_card_fields_exchange_vehicle_security_deposit = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.security_deposit");
let data_account_client_card_fields_exchange_vehicle_end_contract_date = json_response.bool_of("data.account.client_card_fields.exchange_vehicle.end_contract_date");
let data_account_client_number = json_response.bool_of("data.account.client_number");
let data_account_confirmation_appt = json_response.bool_of("data.account.confirmation_appt");
let data_account_credit = json_response.bool_of("data.account.credit");
let data_account_csi = json_response.bool_of("data.account.csi");
let data_account_csi_used = json_response.bool_of("data.account.csi_used");
let data_account_default_deliveryman_user_id = json_response.string_of("data.account.default_deliveryman_user_id").unwrap_or_default();
let data_account_delivered_by = json_response.bool_of("data.account.delivered_by");
let data_account_disable_communication_audio = json_response.bool_of("data.account.disable_communication_audio");
let data_account_duplicates = json_response.bool_of("data.account.duplicates");
let data_account_guest_action = json_response.bool_of("data.account.guest_action");
let data_account_email_client = json_response.bool_of("data.account.email_client");
let data_account_in_turn = json_response.bool_of("data.account.in_turn");
let data_account_in_turn_director_management = json_response.bool_of("data.account.in_turn_director_management");
let data_account_leads_other_division = json_response.bool_of("data.account.leads_other_division");
let data_account_leadxpress_option_priority = json_response.int_of("data.account.leadxpress_option.priority");
let data_account_leadxpress_option_reminder_frequency = json_response.int_of("data.account.leadxpress_option.reminder.frequency");
let data_account_leadxpress_option_reminder_recurrence = json_response.int_of("data.account.leadxpress_option.reminder.recurrence");
let data_account_leadxpress_option_schedule_account = json_response.bool_of("data.account.leadxpress_option.schedule.account");
let data_account_leadxpress_option_schedule_advisor = json_response.bool_of("data.account.leadxpress_option.schedule.advisor");
let data_account_limited_audio_access = json_response.bool_of("data.account.limited_audio_access");
let data_account_logo = json_response.string_of("data.account.logo").unwrap_or_default();
let data_account_logo_en = json_response.string_of("data.account.logo_en").unwrap_or_default();
let data_account_mandatory_coordinate = json_response.bool_of("data.account.mandatory_coordinate");
let data_account_manually_status = json_response.bool_of("data.account.manually_status");
let data_account_merge_rule = json_response.string_of("data.account.merge_rule").unwrap_or_default();
let data_account_month_start_day = json_response.int_of("data.account.month_start_day");
let data_account_name = json_response.string_of("data.account.name").unwrap_or_default();
let data_account_niotext = json_response.bool_of("data.account.niotext");
let data_account_niotext_phone = json_response.bool_of("data.account.niotext_phone");
let data_account_phone = json_response.string_of("data.account.phone").unwrap_or_default();
let data_account_power_sport = json_response.bool_of("data.account.power_sport");
let data_account_process = json_response.bool_of("data.account.process");
let data_account_recreative_special = json_response.bool_of("data.account.recreative_special");
let data_account_result_date_validation = json_response.bool_of("data.account.result_date_validation");
let data_account_sale_accessories = json_response.bool_of("data.account.sale_accessories");
let data_account_sale_by_phone = json_response.bool_of("data.account.sale_by_phone");
let data_account_sale_date_month = json_response.bool_of("data.account.sale_date_month");
let data_account_sale_table_options_accessory_column = json_response.bool_of("data.account.sale_table_options.accessory_column");
let data_account_sale_table_options_commercial_column = json_response.bool_of("data.account.sale_table_options.commercial_column");
let data_account_sale_table_options_division_grouped_total_column = json_response.bool_of("data.account.sale_table_options.division_grouped_total_column");
let data_account_sale_validation = json_response.bool_of("data.account.sale_validation");
let data_account_scan = json_response.bool_of("data.account.scan");
let data_account_stock_required_for_sale = json_response.bool_of("data.account.stock_required_for_sale");
let data_account_take_over_director = json_response.bool_of("data.account.take_over_director");
let data_account_trade_report = json_response.bool_of("data.account.trade_report");
let data_account_unrestricted_assignment = json_response.bool_of("data.account.unrestricted_assignment");
let data_account_unsubscribe = json_response.bool_of("data.account.unsubscribe");
let data_account_untreated_lead = json_response.bool_of("data.account.untreated_lead");
let data_account_vehicle_model_text = json_response.bool_of("data.account.vehicle_model_text");
let data_account_vehicle_text = json_response.bool_of("data.account.vehicle_text");
let data_account_verified_sale = json_response.bool_of("data.account.verified_sale");
let data_account_vin_decoder = json_response.bool_of("data.account.vin_decoder");
let data_account_waiting_sale_date = json_response.string_of("data.account.waiting_sale_date").unwrap_or_default();
let data_account_waiting_sale_option = json_response.bool_of("data.account.waiting_sale_option");
let data_advisor = json_response.string_of("data.advisor").unwrap_or_default();
let data_bdc = json_response.string_of("data.bdc").unwrap_or_default();
let data_commercial = json_response.string_of("data.commercial").unwrap_or_default();
let data_service_advisor = json_response.string_of("data.service_advisor").unwrap_or_default();
let data_service_agent = json_response.string_of("data.service_agent").unwrap_or_default();
i = 0;
count_i = json_response.size_of_array("data.service_process");
while i < count_i {
json_response.set_i(i);
i = i + 1;
}
i = 0;
count_i = json_response.size_of_array("data.emails");
while i < count_i {
json_response.set_i(i);
let _ = json_response.int_of("data.emails[i].id");
let _ = json_response.string_of("data.emails[i].created_at").unwrap_or_default();
let _ = json_response.string_of("data.emails[i].updated_at").unwrap_or_default();
let _ = json_response.int_of("data.emails[i].lead_id");
let _ = json_response.string_of("data.emails[i].address").unwrap_or_default();
let _ = json_response.string_of("data.emails[i].type").unwrap_or_default();
let _ = json_response.bool_of("data.emails[i].valid");
i = i + 1;
}
i = 0;
count_i = json_response.size_of_array("data.phones");
while i < count_i {
json_response.set_i(i);
let _ = json_response.int_of("data.phones[i].id");
let _ = json_response.string_of("data.phones[i].created_at").unwrap_or_default();
let _ = json_response.string_of("data.phones[i].updated_at").unwrap_or_default();
let _ = json_response.int_of("data.phones[i].lead_id");
let _ = json_response.string_of("data.phones[i].extension").unwrap_or_default();
let _ = json_response.string_of("data.phones[i].number").unwrap_or_default();
let _ = json_response.string_of("data.phones[i].type").unwrap_or_default();
let _ = json_response.bool_of("data.phones[i].valid");
let _ = json_response.bool_of("data.phones[i].validated");
let _ = json_response.bool_of("data.phones[i].mobile");
i = i + 1;
}
i = 0;
count_i = json_response.size_of_array("data.vehicles");
while i < count_i {
json_response.set_i(i);
let _ = json_response.int_of("data.vehicles[i].id");
let _ = json_response.string_of("data.vehicles[i].created_at").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].updated_at").unwrap_or_default();
let _ = json_response.int_of("data.vehicles[i].lead_id");
let _ = json_response.string_of("data.vehicles[i].accessories").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].allowed_odometer").unwrap_or_default();
let _ = json_response.int_of("data.vehicles[i].balance");
let _ = json_response.string_of("data.vehicles[i].budget_max").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].budget_min").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].cash_down").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].category").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].category_rv").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].client_number").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].color_exterior").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].color_interior").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].comment").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].condition").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].end_contract_date").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].end_warranty_date").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].engine").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].extended_warranty").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].fuel").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].length_max").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].length_min").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].license_plate").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].make").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].modality").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].model").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].odometer").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].offer_number").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].option").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].order_number").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].payment").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].payment_frequency").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].preparation").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].price").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].profit").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].purchase_date").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].rate").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].recall").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].recorded_date").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].residual").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].security_deposit").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].sleeping").unwrap_or_default();
let _ = json_response.bool_of("data.vehicles[i].sold");
let _ = json_response.string_of("data.vehicles[i].sold_by").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].sold_date").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].stock").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].stock_state").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].term").unwrap_or_default();
let _ = json_response.bool_of("data.vehicles[i].tire");
let _ = json_response.string_of("data.vehicles[i].transmission").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].trim").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].type").unwrap_or_default();
url = json_response.string_of("data.vehicles[i].url").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].value").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].vin").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].warranty").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].weight").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].year").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].year_max").unwrap_or_default();
let _ = json_response.string_of("data.vehicles[i].year_min").unwrap_or_default();
i = i + 1;
}
i = 0;
count_i = json_response.size_of_array("data.related_ids");
while i < count_i {
json_response.set_i(i);
i = i + 1;
}