Dealer Analytics
The endpoint allows you to pull pre-diagnostic analytics for a given timeframe.
Endpoint
Section titled “Endpoint”https://api.example.com/dealer/analytics/Request Format
Section titled “Request Format”HTTP Method
Section titled “HTTP Method”POSTContent Type
Section titled “Content Type”application/jsonRequest Body
Section titled “Request Body”The request body should be a JSON object with the following fields:
| Parameter | Type | Required | Description |
|---|---|---|---|
| dealer_uuid | String | True | Dealer unique identifier |
| start_date | String | True | When the metrics will start |
| end_date | String | False | (Optional) Used if restricting timeframe, otherwise will run to current date. |
Making an Authorized Request
Section titled “Making an Authorized Request”curl -X POST https://api.example.com/dealer/analytics/ \ -H "Content-Type: application/json" \ -H "X-API-KEY: API_KEY" \ -d '{ "dealer_uuid": "1234", "start_date": "2025-05-01", "end_date": "2025-06-30"}'Error Responses
Section titled “Error Responses”If your API key is missing or invalid, the server will respond with an error.
Missing API Key
Section titled “Missing API Key”{ "status": "error", "response": "Invalid API Key"}Response Data
Section titled “Response Data”When you send a valid request to the Motovizion AI API, the response contains structured JSON data. Below is a detailed explanation of the fields included in the response.
{ "status":"success", "dealer_name":"ABC Toyota", "total_appointments":312, "total_responses":81, "avg_time_on_site":2.52, // minutes "total_time_on_site":3.41, // Hours "response_rate":25.96, // Percentage "total_comebacks":25}Response Fields
Section titled “Response Fields”| Field Name | Type | Description |
|---|---|---|
| status | String | Request status |
| dealer_name | String | Dealer Name in Request |
| total_appointments | Integer | Total number of appointment’s logged for timeframe. |
| total_responses | Integer | Total number of responses supplied by customer. |
| avg_time_on_site | Integer | Average time the customer spent engaged in conversation, in minutes. |
| total_time_on_site | Integer | The total time spent engaged in conversation for the given time frame, in hours. |
| response_rate | Integer | The percentage of response to total appointments. |
| total_comebacks | Integer | Total amount of logged comebacks for the time period. |
Error Codes
Section titled “Error Codes”| HTTP Status Code | Description |
|---|---|
| 400 | Missing required fields (e.g., appointment_uuid). |
| 401 | Invalid or missing API key. |
| 404 | Appointment not found for the provided appointment_uuid. |