TC Widget Callbacks
Usage
You should call the .on method on TCWidget, passing an event name and a callback handler as arguments. This method can be called either before or after .init. You can add as many callbacks as needed.
Sample of adding a callback handler
<script>
var widget
TCWidget.init({
apikey: '[your apikey]',
container: 'content',
}).then(function(widget) {
widget.on('onEcommerceOrder', function(event) {
log('onEcommerceOrder', event);
event.resolve()
});
});
function log(eventId, event) {
console.log(eventId, event);
}
</script>
Demo pages
POS Widget Demo (PIN: 416905)
Tire & Wheel Widget
onLocationChanged
Description
Triggered when the location is changed. Works for all widget types.
Example
widget.on('onLocationChanged', function(event) {
log('onLocationChanged', event);
event.resolve()
});Data example
{
"location": {
"location_id": 13260,
"external_id": null,
"name": "Demo Location #1",
"address_line_1": "30 Via Renzo Drive",
"address_line_2": "",
"city": "Richmond Hill",
"latitude": 43.891,
"longitude": -79.3917,
"province": "Ontario",
"province_code": "ON",
"postal_code": "L4S0B8",
"phone": "1 888 792-7072",
"contact_name": "John Doe",
"email": "john@doe.com"
}
}onTireSearchResults
Description
Triggered when the user performs a tire search. Works for all widget types.
Example
widget.on('onTireSearchResults', function(event) {
log('onTireSearchResults', event);
event.resolve()
});Data example (vary according to search method)
// Search by size
{
"search_by": "size",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"size": {
"front": {
"size_part_1": "205",
"size_part_2": "55",
"size_part_3": "16",
"load_index": 91,
"speed_rating": "W"
}
}
},
"total_tire_results": 265
}
// Search by Size Double
{
"search_by": "size",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"size": {
"front": {
"size_part_1": "205",
"size_part_2": "55",
"size_part_3": "16",
"load_index": null,
"speed_rating": null
},
"rear": {
"size_part_1": "215",
"size_part_2": "45",
"size_part_3": "17",
"load_index": null,
"speed_rating": null
}
}
},
"total_tire_results": 81
}
// Search by vehicle
{
"search_by": "vehicle",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"fitment_id": "151284",
"vehicle_id": 324787,
"vehicle": {
"year": 2022,
"make": "Acura",
"model": "ILX",
"submodel": "Base"
},
"size": {
"front": {
"size_part_1": "215",
"size_part_2": "45",
"size_part_3": "17"
}
}
},
"total_tire_results": 150
}
// Search by Raw Size
{
"search_by": "raw_size",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"size": {
"front": {
"raw": "2055516"
}
}
},
"total_tire_results": 265
}
// Search by Part Number
{
"search_by": "part_number",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"part_numbers": [
"000240"
]
},
"total_tire_results": 2
}
// Search by VIN
{
"search_by": "vin",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"fitment_id": "51494",
"vehicle_id": 201423,
"vehicle": {
"year": 2012,
"make": "Kia",
"model": "Rondo",
"submodel": "EX Luxury"
},
"size": {
"front": {
"size_part_1": "225",
"size_part_2": "50",
"size_part_3": "17"
}
},
"vin": "KNAH*********318"
},
"total_tire_results": 145
}
// Search by State & License Plate
{
"search_by": "license_plate",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"fitment_id": "186552",
"vehicle_id": 352727,
"vehicle": {
"year": 2005,
"make": "Hummer",
"model": "H2",
"submodel": "Base"
},
"size": {
"front": {
"size_part_1": "315",
"size_part_2": "70",
"size_part_3": "17"
}
},
"state": "**",
"license": "*****"
},
"total_tire_results": 83
}
onWheelSearchResults
Description
Triggered when the user performs a wheel search. Works for all widget types.
Example
widget.on('onWheelSearchResults', function(event) {
log('onWheelSearchResults', event);
event.resolve()
});Data example (vary according to search method)
// Search by vehicle
{
"search_by": "vehicle",
"search_params": {
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vehicle": {
"year": 2024,
"make": "Cadillac",
"model": "LYRIQ",
"submodel": "Luxury"
},
"fitment_id": "186552",
"vehicle_id": 355616,
"include_extreme": false,
"size": {
"front": {
"diameter": "20"
}
}
},
"total_wheel_results": 12
}
// Search by VIN
{
"search_by": "vin",
"search_params": {
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vehicle": {
"year": 2012,
"make": "Kia",
"model": "Rondo",
"submodel": "EX Luxury"
},
"fitment_id": "51497",
"vehicle_id": 201423,
"include_extreme": false,
"size": {
"front": {
"diameter": "16"
}
},
"vin": "KNAH*********318"
},
"total_wheel_results": 5
}
// Search by State & License Plate
{
"search_by": "license_plate",
"search_params": {
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vehicle": {
"year": 2024,
"make": "Cadillac",
"model": "LYRIQ",
"submodel": "Luxury"
},
"fitment_id": "186558",
"vehicle_id": 352727,
"include_extreme": false,
"size": {
"front": {
"diameter": "20"
}
},
"state": "**",
"license": "*****"
},
"total_wheel_results": 7
}onTireSelect
Description
This event is triggered when the user selects a tire: on the results page, when adding it to a package, or on the compare screen. It works for all widget types.
Example
widget.on('onTireSelect', function(event) {
log('onTireSelect', event);
event.resolve();
});Data example
{
"tires": [
{
"brand_name": "Toyo",
"part_number": "129450",
"model_name": "Celsius",
"size": "215/45R17 91V XL",
"quantity": 1,
"supplier_info": {
"supplier_connection_name": "Demo Supplier",
"supplier_connection_id": "demosupplier",
"branches": [
{
"branch_id": "12345",
"type": "primary",
"quantity": 1,
"name": "Demo Branch",
"delivery_date_time": {
"date": "2026-01-19",
"time": "17:00:00",
"timezone": "-05:00"
},
"cutoff": {
"date": "2026-01-16",
"time": "11:00:00",
"timezone": "-05:00"
}
}
],
"delivery_date_time": null
},
"price": 64.81,
"cost": 58.33,
"fet": 0,
"fet_source": "tireconnect"
}
],
"vehicle": {
"year": 2022,
"make": "Acura",
"model": "ILX",
"submodel": "Base"
}
}
onWheelSelect
Description
This event is triggered when the user selects a wheel: on the results page, when adding it to a package, or on the compare screen. It works for all widget types.
Example
widget.on('onWheelSelect', function(event) {
log('onWheelSelect', event);
event.resolve();
});Data example
{
"wheels": [
{
"brand_name": "Maxxim",
"part_number": "11B-KN77T04405",
"model_name": "11B Knight",
"size": "17x7 5x100/5x114.3 ET40",
"quantity": 4,
"price": 269,
"cost": 137.08
}
],
"vehicle": {
"year": 2024,
"make": "Acura",
"model": "Integra",
"submodel": "A-Spec"
}
}
onResultsReviseClicked
Description
This event is triggered when the user revises their search and returns to the search page. It works for all widget types.
Example
widget.on('onResultsReviseClicked', function(event) {
log('onResultsReviseClicked', event);
event.resolve();
});Data example (vary according to search method)
Tires
// Search by size
{
"search_by": "size",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"size": {
"front": {
"size_part_1": "205",
"size_part_2": "55",
"size_part_3": "16",
"load_index": 91,
"speed_rating": "W"
}
}
}
}
// Search by Size Double
{
"search_by": "size",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"size": {
"front": {
"size_part_1": "205",
"size_part_2": "55",
"size_part_3": "16",
"load_index": null,
"speed_rating": null
},
"rear": {
"size_part_1": "215",
"size_part_2": "45",
"size_part_3": "17",
"load_index": null,
"speed_rating": null
}
}
}
}
// Search by vehicle
{
"search_by": "vehicle",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"fitment_id": "151284",
"vehicle_id": 324787,
"size": {
"front": {
"size_part_1": "215",
"size_part_2": "45",
"size_part_3": "17"
}
},
"vehicle": {
"year": 2022,
"make": "Acura",
"model": "ILX",
"submodel": "Base"
}
}
}
// Search by Raw Size
{
"search_by": "raw_size",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"size": {
"front": {
"raw": "2055516"
}
}
}
}
// Search by Part Number
{
"search_by": "part_number",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"part_numbers": [
"000240"
]
}
}
// Search by VIN
{
"search_by": "vin",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"fitment_id": "51494",
"vehicle_id": 201423,
"vehicle": {
"year": 2012,
"make": "Kia",
"model": "Rondo",
"submodel": "EX Luxury"
},
"size": {
"front": {
"size_part_1": "225",
"size_part_2": "50",
"size_part_3": "17"
}
},
"vin": "KNAH*********318"
}
}
// Search by State & License Plate
{
"search_by": "license_plate",
"search_params": {
"sort_by": "best_match",
"filters": {},
"display": "full",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"min_quantity": 1,
"suppliers": [],
"fitment_id": "186552",
"vehicle_id": 352727,
"vehicle": {
"year": 2005,
"make": "Hummer",
"model": "H2",
"submodel": "Base"
},
"size": {
"front": {
"size_part_1": "315",
"size_part_2": "70",
"size_part_3": "17"
}
},
"state": "**",
"license": "*****"
}
}
Wheels
// Search by vehicle
{
"search_by": "vehicle",
"search_params": {
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vehicle": {
"year": 2024,
"make": "Cadillac",
"model": "LYRIQ",
"submodel": "Luxury"
},
"fitment_id": "186552",
"vehicle_id": 355616,
"include_extreme": false,
"size": {
"front": {
"diameter": "20"
}
}
}
}
// Search by VIN
{
"search_by": "vin",
"search_params": {
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vehicle": {
"year": 2012,
"make": "Kia",
"model": "Rondo",
"submodel": "EX Luxury"
},
"fitment_id": "51497",
"vehicle_id": 201423,
"include_extreme": false,
"size": {
"front": {
"diameter": "16"
}
},
"vin": "KNAH*********318"
}
}
// Search by State & License Plate
{
"search_by": "license_plate",
"search_params": {
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vehicle": {
"year": 2024,
"make": "Cadillac",
"model": "LYRIQ",
"submodel": "Luxury"
},
"fitment_id": "186558",
"vehicle_id": 352727,
"include_extreme": false,
"size": {
"front": {
"diameter": "20"
}
},
"state": "**",
"license": "*****"
}
}
onPriceMatchRequested
Description
This event is triggered when the user requests a price match.
Example
widget.on('onPriceMatchRequested', function(event) {
log('onPriceMatchRequested', event);
event.resolve()
});Data example
{
"tire": {
"brand_name": "Michelin",
"part_number": "05287",
"model_name": "Pilot Sport A/S 3+",
"size": "215/45R17 87V",
"quantity": 4,
"supplier_info": {
"supplier_connection_name": "Demo Supplier",
"supplier_connection_id": "demosupplier",
"branches": [
{
"branch_id": "12345",
"type": "primary",
"quantity": 1,
"name": "Demo Branch",
"delivery_date_time": {
"date": "2026-01-19",
"time": "17:00:00",
"timezone": "-05:00"
},
"cutoff": {
"date": "2026-01-16",
"time": "11:00:00",
"timezone": "-05:00"
}
}
],
"delivery_date_time": null
},
"price": 52.69,
"cost": null
},
"vehicle": {
"year": 2022,
"make": "Acura",
"model": "ILX",
"submodel": "Base"
},
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"price_match_data": {
"link": "https://link.com",
"lower_price": "100",
"postal_code": "L4S0B8"
}
}
onLead
Description
This event is triggered when the user submits a lead request. In comparison mode, up to three quotes may be requested.
Available types:
Display
Print
Email
SMS
Call
Appointment
Example
widget.on('onLead', function(event) {
log('onLead', event);
event.resolve()
});Data example
{
"leads": [
{
"type": "appointment",
"lead_uuid": "9a9a241d-3773-4833-ab2d-1f1858bcff61",
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"follow_up": true,
"way_to_contact": "email",
"preferred_date_time": "2025-07-30 00:00:00",
"quotes": [
{
"quote_uuid": "de98341a-f73e-4d7f-995c-1d6ccab26551",
"total_price": 1668.34,
"subtotal": 1396.76,
"total_tax": 181.5788,
"discounts": [],
"rebates": [
{
"total_amount": 50,
"name": "Demo rebate",
"description": "Exclusive Tire Rebate Offer! ",
"coupon_line": "",
"coupon_link": "",
"legal_line": "",
"legal_link": ""
}
],
"tires": [
{
"brand_name": "Toyo",
"part_number": "128430",
"model_name": "Celsius",
"size": "215/50R17 91H",
"quantity": 4,
"supplier_info": {
"supplier_connection_name": "Demo Supplier",
"supplier_connection_id": "demosupplier",
"branches": [
{
"branch_id": "12345",
"type": "primary",
"quantity": 1,
"name": "Demo Branch",
"delivery_date_time": {
"date": "2026-01-19",
"time": "17:00:00",
"timezone": "-05:00"
},
"cutoff": {
"date": "2026-01-16",
"time": "11:00:00",
"timezone": "-05:00"
}
}
],
"delivery_date_time": null
},
"price": 62.49,
"cost": null,
"fet": 0,
"fet_source": "tireconnect"
}
],
"wheels": [
{
"brand_name": "Motiv",
"part_number": "435G-7751840",
"model_name": "435G Foil",
"size": "17x7.5 5x100/5x114.3 ET40",
"quantity": 4,
"supplier_name": "Demo W Supplier",
"price": 244,
"cost": null
}
],
"services": [
{
"key": "wheel_alignment",
"name": "Wheel Alignment",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": 60,
"tax": 7.8
},
{
"key": "valve_stem_tpms",
"name": "Valve Stem or TPMS Part Kit",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": null,
"tax": null
}
],
"vehicle": {
"year": 2022,
"make": "Acura",
"model": "ILX",
"submodel": "Base"
}
}
],
"customer": {
"first_name": "John",
"last_name": "Doe",
"phone_number": "1 888 792-7072",
"email": "john@doe.com",
"notes": "",
"address": null
}
}
]
}
onAppointmentClick
Description
This event is triggered when the user clicks the Appointment button on the summary page.
Example
widget.on('onAppointmentClick', function(event) {
log('onAppointmentClick', event);
event.resolve()
});Data example
{
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"quote": {
"total_price": 1712.63,
"subtotal": 1435.96,
"total_tax": 186.6748,
"discounts": [],
"rebates": [
{
"total_amount": 50,
"name": "Demo rebate",
"description": "Exclusive Tire Rebate Offer! ",
"coupon_line": "",
"coupon_link": "",
"legal_line": "",
"legal_link": ""
}
],
"tires": [
{
"brand_name": "Toyo",
"part_number": "128430",
"model_name": "Celsius",
"size": "215/50R17 91H",
"quantity": 4,
"supplier_info": {
"supplier_connection_name": "Demo Supplier",
"supplier_connection_id": "demosupplier",
"branches": [
{
"branch_id": "12345",
"type": "primary",
"quantity": 1,
"name": "Demo Branch",
"delivery_date_time": {
"date": "2026-01-19",
"time": "17:00:00",
"timezone": "-05:00"
},
"cutoff": {
"date": "2026-01-16",
"time": "11:00:00",
"timezone": "-05:00"
}
}
],
"delivery_date_time": null
},
"price": 62.49,
"cost": null,
"fet": 0,
"fet_source": "tireconnect"
}
],
"wheels": [
{
"brand_name": "Motiv",
"part_number": "435G-7751840",
"model_name": "435G Foil",
"size": "17x7.5 5x100/5x114.3 ET40",
"quantity": 4,
"supplier_name": "Demo W Supplier",
"price": 244,
"cost": null
}
],
"services": [
{
"key": "wheel_alignment",
"name": "Wheel Alignment",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": 60,
"tax": 7.8
},
{
"key": "valve_stem_tpms",
"name": "Valve Stem or TPMS Part Kit",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": null,
"tax": null
}
],
"vehicle": {
"year": 2023,
"make": "Acura",
"model": "Integra",
"submodel": "A-Spec"
}
},
"customer": null
}onEcommerceOrderClick
Description
This event is triggered when the user clicks the Order button on the summary page.
Example
widget.on('onEcommerceOrderClick', function(event) {
log('onEcommerceOrderClick', event);
event.resolve()
});Data example
{
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"quote": {
"total_price": 1889.82,
"subtotal": 1592.76,
"total_tax": 207.0588,
"discounts": [],
"rebates": [
{
"total_amount": 50,
"name": "Demo rebate",
"description": "Exclusive Tire Rebate Offer! ",
"coupon_line": "",
"coupon_link": "",
"legal_line": "",
"legal_link": ""
}
],
"tires": [
{
"brand_name": "Toyo",
"part_number": "128430",
"model_name": "Celsius",
"size": "215/50R17 91H",
"quantity": 4,
"supplier_info": {
"supplier_connection_name": "Demo Supplier",
"supplier_connection_id": "demosupplier",
"branches": [
{
"branch_id": "12345",
"type": "primary",
"quantity": 1,
"name": "Demo Branch",
"delivery_date_time": {
"date": "2026-01-19",
"time": "17:00:00",
"timezone": "-05:00"
},
"cutoff": {
"date": "2026-01-16",
"time": "11:00:00",
"timezone": "-05:00"
}
}
],
"delivery_date_time": null
},
"price": 62.49,
"cost": null,
"fet": 0,
"fet_source": "tireconnect"
}
],
"wheels": [
{
"brand_name": "Pacer",
"part_number": "793B-7751842",
"model_name": "793B Sequence",
"size": "17x7.5 5x100/5x114.3 ET42",
"quantity": 4,
"supplier_name": "Demo W Supplier",
"price": 293,
"cost": null
}
],
"services": [
{
"key": "wheel_alignment",
"name": "Wheel Alignment",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": 60,
"tax": 7.8
},
{
"key": "valve_stem_tpms",
"name": "Valve Stem or TPMS Part Kit",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": null,
"tax": null
}
],
"vehicle": {
"year": 2022,
"make": "Acura",
"model": "ILX",
"submodel": "Base"
}
},
"customer": null
}onEcommerceOrder
Description
This event is triggered during the e-commerce order flow.
Possible statuses:
initiated
incomplete
submitted
Example
widget.on('onEcommerceOrder', function(event) {
log('onEcommerceOrder', event);
event.resolve()
});Data example
{
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"total_price": 1712.63,
"subtotal": 1435.96,
"total_tax": 186.6748,
"discounts": [],
"rebates": [
{
"total_amount": 50,
"name": "Demo rebate",
"description": "Exclusive Tire Rebate Offer! ",
"coupon_line": "",
"coupon_link": "",
"legal_line": "",
"legal_link": ""
}
],
"tires": [
{
"brand_name": "Toyo",
"part_number": "128430",
"model_name": "Celsius",
"size": "215/50R17 91H",
"quantity": 4,
"supplier_info": {
"supplier_connection_name": "Demo Supplier",
"supplier_connection_id": "demosupplier",
"branches": [
{
"branch_id": "12345",
"type": "primary",
"quantity": 1,
"name": "Demo Branch",
"delivery_date_time": {
"date": "2026-01-19",
"time": "17:00:00",
"timezone": "-05:00"
},
"cutoff": {
"date": "2026-01-16",
"time": "11:00:00",
"timezone": "-05:00"
}
}
],
"delivery_date_time": null
},
"price": 62.49,
"cost": null,
"fet": 0,
"fet_source": "tireconnect"
}
],
"wheels": [
{
"brand_name": "Motiv",
"part_number": "435G-7751840",
"model_name": "435G Foil",
"size": "17x7.5 5x100/5x114.3 ET40",
"quantity": 4,
"supplier_name": "Demo W Supplier",
"price": 244,
"cost": null
}
],
"services": [
{
"key": "wheel_alignment",
"name": "Wheel Alignment",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": 60,
"tax": 7.8
},
{
"key": "valve_stem_tpms",
"name": "Valve Stem or TPMS Part Kit",
"description": "",
"link": "",
"image": null,
"type": "service",
"tax_group": "labor",
"price": null,
"tax": null
}
],
"vehicle": {
"year": 2025,
"make": "Acura",
"model": "Integra",
"submodel": "A-Spec"
},
"order_number": "P380",
"deposit_payment": 1712.63,
"outstanding_balance": 0,
"customer": {
"first_name": "John",
"last_name": "Doe",
"phone_number": "1 888 792-7072",
"email": "john@doe.com",
"notes": "",
"address": {
"address_line_1": "30 Via Renzo Drive",
"address_line_2": "",
"country": "CA",
"city": "Richmond Hill",
"province": "ON",
"postal_code": "L4S0B8"
}
},
"preferred_date_time": "2025-07-29 00:00:00",
"way_to_contact": "email",
"status": "submitted"
}
POS Widget
onTireSupplierOrderSubmitted
Description
This event is triggered when a tire supplier order is submitted. It works for both successful and failed submissions.
Example
widget.on('onTireSupplierOrderSubmitted', function(event) {
log('onTireSupplierOrderSubmitted', event);
event.resolve()
});Data example
{
"orders": [
{
"status": "success",
"supplier_order_id": 37524,
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vendor_refference_number": "29324938",
"po_number": "DEMO PO",
"supplier_connection_id": "demosupplier",
"supplier_connection_name": "Demo Supplier",
"message": "The order successfully submitted.",
"total_shipping_cost": 0,
"total_order": 127.98,
"vendor_total_order": 127.98,
"tires": [
{
"brand_name": "Starfire",
"part_number": "162019001",
"model_name": "Solarus AS",
"size": "215/50R17 95V XL",
"cost": 63.99,
"vendor_cost": 63.99,
"estimated_delivery": {
"date": "2025-07-28",
"time": "11:30:00",
"timezone": "-04:00"
},
"status": "success",
"quantity": 2,
"vendor_part_number": "162019001",
"fet": 0,
"fet_source": "vendor",
"shipping_cost": null,
"branch_id": "100",
"message": "Submitted",
"retail_price": 71.1
}
]
}
]
}
onWheelSupplierOrderSubmitted
Description
This event is triggered when a wheel supplier order is submitted. It applies to both successful and failed orders.
Example
widget.on('onWheelSupplierOrderSubmitted', function(event) {
log('onWheelSupplierOrderSubmitted', event);
event.resolve()
});Data example
{
"orders": [
{
"status": "success",
"supplier_order_id": 186,
"location": {
"location_id": 13259,
"external_id": "E123456",
"ga_label": "GA-123456"
},
"vendor_refference_number": "STS-1753435593732-7YG",
"po_number": "DEMO PO",
"supplier_connection_id": "9999999999",
"supplier_connection_name": "Demo W Supplier",
"message": null,
"total_shipping_cost": 0,
"total_order": 170.92,
"wheels": [
{
"model_name": "429B Align",
"brand_name": "Motiv",
"part_number": "429B-7751840",
"size": "17x7.5 5x100/5x114.3 ET40",
"quantity": 1,
"cost": 130.77,
"retail_price": 400,
"shipping_cost": 0,
"status": "success",
"branch_id": null,
"message": null
}
]
}
]
}
Service Appointment Widget
Full usage example might look like this:
<script>
var widget
TCWidget.initServices({
apikey: '[your apikey]',
container: 'content',
}).then(function(widget) {
widget.on('onLocationChanged', function(event) {
log('onLocationChanged', event);
event.resolve()
});
widget.on('onVehicleSelected', function(event) {
log('onVehicleSelected', event);
event.resolve()
});
widget.on('onAppointmentServicesUpdated', function(event) {
log('onAppointmentServicesUpdated', event);
event.resolve()
});
widget.on('onAppointmentLightsUpdated', function(event) {
log('onAppointmentLightsUpdated', event);
event.resolve()
});
widget.on('onAppointmentSymptomsUpdated', function(event) {
log('onAppointmentSymptomsUpdated', event);
event.resolve()
});
widget.on('onAppointmentDateSelected', function(event) {
log('onAppointmentDateSelected', event);
event.resolve()
});
widget.on('onAppointmentContinue', function(event) {
log('onAppointmentContinue', event);
event.resolve()
});
widget.on('onAppointmentSubmitted', function(event) {
log('onAppointmentSubmitted', event);
event.resolve()
});
});
function log(eventId, event) {
console.log(eventId, event);
}
</script>
onLocationChanged
Description
This event is triggered when the user selects or changes their location.
Its response format differs from other events. Please refer to the example below.
Data example
{
"location": {
"id": 22592,
"external_id": "111111",
"is_active": true,
"name": "Demo Location #1",
"address_line_1": "725 5th Ave",
"address_line_2": "",
"city": "New York",
"latitude": 40.7625,
"longitude": -73.9739,
"province": "New York",
"province_code": "NY",
"postal_code": "10022",
"phone": "1111111111",
"contact_name": "John Doe",
"email": "t@t.com"
}
}
Main events
This event has a different response structure than the onLocationChanged event. An example is provided below.
Most service events share the same data structure, also shown below.
{
location {
external_id : 111111
},
service_appointment: {
vehicle: {
year: 2016,
make: "Bentley",
model: "Continental",
trim: "GT"
},
services: [
{
id: 1,
category_id: 1,
category_name: "Brake Services",
name: "Brake and Rotor Services",
description: "Brake check is really important for your safety",
link: "https://learnmore.com",
link_label: "Learn More",
price: {
is_free: false,
free_service_label: "Free",
labor_price_type: "fixed",
labor_price: 99.99,
labor_price_range_from: 1,
labor_price_range_to: 100
}
}
],
symptoms: [
{
name: "shaking",
title: "Shaking"
}
],
lights: [
{
name: "airbag",
title: "Airbag"
}
],
additional_information: "I need my car on Monday"
}
customer: {
name: "John Doe",
preffered_way_of_contact: "phone",
email: "email@email.com",
phone: "1234567890",
address: "30 Via Renzo Drive",
city: "Richmond Hill",
state: "Ontario",
zip: "L4S0B8",
notes: "Call me",
preffered_time: 1586447435, //timestamp
time_selection: "mid-day",
drop_off: "drop",
towing: true
},
"tire_quote": {
"sub_total": 529.02,
"tax": 21.18,
"tire_total": 610.2,
"services": [
{
"name": "Tire Protection Plan",
"price": 10
},
{
"name": "Wheel Alignment",
"price": 26.58
},
{
"name": "Nitrogen Fill",
"price": 100
},
{
"name": "Tire Recycling Fee",
"price": 10
},
{
"name": "Shop Supply Fee",
"price": 50
},
{
"name": "Seasonal Tire Storage",
"price": 26.6
},
{
"name": "Valve Stem or TPMS Part Kit",
"price": 100
}
],
"tires": [
{
"name": "Westlake SA07",
"category": "Performance Summer",
"size": "205/50R17 89W",
"part_number": "24385008",
"utqg": "460 A A",
"quantity": 4
}
]
}
}onVehicleSelected
Description
This event is triggered when the user selects or changes a vehicle’s Year, Make, and Model
onAppointmentServicesUpdated
Description
This event is triggered when the user updates selected services.
onAppointmentLightsUpdated
Description
This event is triggered when the user selects or updates My Lights are On in the symptoms widget within the Tell us the symptoms section.
onAppointmentSymptomsUpdated
Description
This event is triggered when the user selects or updates My Car Symptoms in the symptoms widget within the Tell us the symptoms section.
onAppointmentDateSelected
Description
This event is triggered when the user selects a date in the preferred date/time field.
onAppointmentContinue
Description
This event is triggered when the user clicks Continue on the services page.
onAppointmentSubmitted
Description
This event is triggered when the user clicks Request Appointment on the summary page.