Dealer Status Details
The Motovizion AI API allows you to retrieve the dealer details along with their subscription status.
Endpoint
Section titled “Endpoint”https://api.example.com/dealer/status/Request Format
Section titled “Request Format”HTTP Method:
POSTContent-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 | Yes | The unique identifier for the dealer. |
Making an Authorized API Request
Section titled “Making an Authorized API Request”curl -X POST https://api.example.com/dealer/status/-H "X-API-KEY: {API_KEY}"-H "Content-Type: application/json"-d '{"dealer_uuid": "{DEALER UUID}"}'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"}Invalid API Key
Section titled “Invalid API Key”{ "status": "error", "response": "Unauthorized"}Code Examples
Section titled “Code Examples”import requestsimport json
# API endpointurl = 'https://api.example.com/dealer/status/'
# Data to send in the POST requestdata = { 'dealer_uuid': ''}
# Set the API keyapi_key = ''
# Set the headersheaders = { 'Content-Type': 'application/json', # Specify JSON content type 'X-API-Key': api_key, # Pass the API key in the header 'Accept': 'application/json'}
# Send the POST requesttry: response = requests.post(url, headers=headers, data=json.dumps(data))
# Check for HTTP errors response.raise_for_status()
# Decode and display the API response decoded_response = response.json() print(json.dumps(decoded_response, indent=4))except requests.exceptions.RequestException as e: print(f"HTTP Request failed: {e}")<?php
// API endpoint$url = 'https://api.example.com/dealer/status/';
// Data to send in the POST request$data = [ 'dealer_uuid' => ''];
// Set the API key$api_key = '';
// Initialize cURL session$ch = curl_init($url);
// Set cURL optionscurl_setopt($ch, CURLOPT_POST, true); // Use POST methodcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); // Send data as JSONcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a stringcurl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', // Specify JSON content type 'X-API-Key: ' . $api_key, // Pass the API key in the header 'Accept: application/json']);
// Execute cURL request$response = curl_exec($ch);
// Check for cURL errorsif (curl_errno($ch)) { echo 'cURL Error: ' . curl_error($ch);} else { // Decode and display the API response $decoded_response = json_decode($response, true);
echo '<pre>'; print_r($decoded_response); echo '</pre>';}
// Close the cURL sessioncurl_close($ch);?>// If using axiosconst axios = require('axios');
// API endpointconst url = 'https://api.example.com/dealer/status/';
// Data to send in the POST requestconst data = { dealer_uuid: ''};
// Set the API keyconst apiKey = '';
// Set the headersconst headers = { 'Content-Type': 'application/json', // Specify JSON content type 'X-API-Key': apiKey, // Pass the API key in the header 'Accept': 'application/json'};
// Send the POST requestaxios.post(url, data, { headers }) .then(response => { // Log the response data console.log('Response from API:', response.data); }) .catch(error => { if (error.response) { // API returned an error response console.error('API Error:', error.response.data); } else if (error.request) { // No response from the server console.error('No response from API:', error.request); } else { // Other errors console.error('Error:', error.message); } });curl -X POST https://api.example.com/dealer/status/ \-H "Content-Type: application/json" \-H "X-API-Key: YOUR_API_KEY" \-d '{ "dealer_uuid": ""}'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", "response": true, "dealer_uuid": "dFxdvajxqap4aFbpBkacHv4RJdp0Irg34QXjzBczecw", "dealer_name": "Acme Auto", "dealer_status": "active", "dept_uuid": "CdFxdvajxqap4aFbpBkacHv4RJdp0Irg34QXjzBczecw", "user_uuid": "sad68sdvajxqap4aFbpBkacHv4RJdp0Irg34QXjzBsad678", "dealer_logo": "https://mysite.com/logo.jpg", "start_date": "2025-05-14", "exclusion_list": "TOYOTACARE, 10K, 15K, 20K, Recall"}Response Fields
Section titled “Response Fields”Top-Level Fields:
| Field Name | Type | Description |
|---|---|---|
| status | String | Indicates the success ("success") or failure ("error") of the request. |
| response | Boolean | true if the request has a dealer, false if no dealer found. |
Dealer Details
Section titled “Dealer Details”| Field Name | Type | Description |
|---|---|---|
| dealer_uuid | String | ID of requested dealer |
| dealer_name | String | Simple Name |
| dept_uuid | String | ID of department |
| dealer_status | String | active / inactive |
| user_uuid | String | ID of SMS user |
| dealer_logo | String | URL to dealer logo |
| start_date | String | Date dealer switched to active |
| exclusion_list | String | Comma Separated String of Opcodes to exclude |
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. |