MENU navbar-image

Introduction

QuickMechs Automotive API for repair cost predictions and diagnostic services.

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Authentication

APIs for handling user login, registration and logout.

Authenticate User

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"architecto\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

password   string     

Example: architecto

Register User

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: zbailey@example.net

password   string     

Must be at least 8 characters. Example: -0pBNvYgxw

Verify Email

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/auth/verify-email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"otp\": \"miyvdl\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/auth/verify-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "otp": "miyvdl"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/verify-email

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

otp   string     

Must be 6 characters. Example: miyvdl

Resend Verification Code

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/auth/resend-verification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/auth/resend-verification"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/resend-verification

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

Register Admin

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/auth/admin/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\",
    \"passcode\": \"architecto\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/auth/admin/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw",
    "passcode": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/admin/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: zbailey@example.net

password   string     

Must be at least 8 characters. Example: -0pBNvYgxw

passcode   string     

Example: architecto

Logout

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/auth/user/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/auth/user/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/auth/user/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Endpoints

Repair Lifecycle Prediction

requires authentication

Returns how long until a specific repair is needed again, based on historical repeat-repair data. Uses a fallback chain: exact make+model+year → make only → national average.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/repair-lifecycle" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vin\": \"1FMCU0MN9PU09186\",
    \"make\": \"Ford\",
    \"model\": \"Escape\",
    \"year\": 2023,
    \"problem_id\": 38,
    \"repair_date\": \"2026-04-02\",
    \"current_mileage\": 45000
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/repair-lifecycle"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vin": "1FMCU0MN9PU09186",
    "make": "Ford",
    "model": "Escape",
    "year": 2023,
    "problem_id": 38,
    "repair_date": "2026-04-02",
    "current_mileage": 45000
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/predict/repair-lifecycle

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vin   string  optional    

optional VIN to identify the vehicle. Example: 1FMCU0MN9PU09186

make   string  optional    

optional Vehicle make (used if VIN not provided). Example: Ford

model   string  optional    

optional Vehicle model. Example: Escape

year   integer  optional    

optional Vehicle year. Example: 2023

problem_id   integer     

The problem category ID of the repair just done. Example: 38

repair_date   string  optional    

optional Date the repair was done (defaults to today). Example: 2026-04-02

current_mileage   integer  optional    

optional Current vehicle mileage. Example: 45000

Repair Sequence Prediction

requires authentication

Returns what repairs typically come next after a given repair, based on historical sequence mining data. Grouped by make.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/repair-sequence" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vin\": \"1FMCU0MN9PU09186\",
    \"make\": \"Ford\",
    \"model\": \"d\",
    \"year\": 5,
    \"problem_id\": 38,
    \"limit\": 5
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/repair-sequence"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vin": "1FMCU0MN9PU09186",
    "make": "Ford",
    "model": "d",
    "year": 5,
    "problem_id": 38,
    "limit": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/predict/repair-sequence

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vin   string  optional    

optional VIN to identify the vehicle. Example: 1FMCU0MN9PU09186

make   string  optional    

optional Vehicle make (used if VIN not provided). Example: Ford

model   string  optional    

Must not be greater than 100 characters. Example: d

year   integer  optional    

Must be at least 1900. Must not be greater than 2100. Example: 5

problem_id   integer     

The problem category ID of the repair just done. Example: 38

limit   integer  optional    

optional Max results to return (default 5). Example: 5

Get Lifecycle Prediction History

Returns lifecycle prediction history. Admin sees all, regular users see only their own.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/lifecycle-history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/lifecycle-history"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthorized"
}
 

Request      

GET api/v1/predict/lifecycle-history

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Integration

APIs for S2S (Server-to-Server) integration with trusted sister apps. All requests must be signed with HMAC-SHA256 using the SISTER_APP_SECRET shared secret.

Provision Admin User

Create a new administrative account directly. The account is automatically marked as verified.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/integration/users" \
    --header "X-Signature: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Sister Admin\",
    \"email\": \"admin@sisterapp.com\",
    \"password\": \"password123\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/integration/users"
);

const headers = {
    "X-Signature": "string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Sister Admin",
    "email": "admin@sisterapp.com",
    "password": "password123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Admin user provisioned successfully",
    "data": {
        "user_id": 15,
        "email": "admin@sisterapp.com",
        "verified": true
    }
}
 

Request      

POST api/v1/integration/users

Headers

X-Signature        

Example: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The full name of the admin. Example: Sister Admin

email   string     

The unique email address. Example: admin@sisterapp.com

password   string     

The password for the new account (min 8 chars). Example: password123

S2S Auto-Login

Authenticate an existing user via S2S and receive a valid session token.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/integration/login" \
    --header "X-Signature: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"user@example.com\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/integration/login"
);

const headers = {
    "X-Signature": "string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "user@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Login successful",
    "data": {
        "user": {
            "id": 1,
            "name": "John",
            "user_type": "admin"
        },
        "session_token": "1|..."
    }
}
 

Request      

POST api/v1/integration/login

Headers

X-Signature        

Example: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The email of the user to log in. Example: user@example.com

List Admin Users

Fetch all administrative accounts for auditing purposes.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/integration/admins" \
    --header "X-Signature: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/integration/admins"
);

const headers = {
    "X-Signature": "string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Admin",
            "email": "a@a.com",
            "is_blocked": false
        }
    ]
}
 

Request      

GET api/v1/integration/admins

Headers

X-Signature        

Example: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...

Content-Type        

Example: application/json

Accept        

Example: application/json

Toggle User Block Status

Remotely block or unblock a user's access to the platform.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/integration/users/block" \
    --header "X-Signature: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"user@example.com\",
    \"is_blocked\": true
}"
const url = new URL(
    "http://localhost:62000/api/v1/integration/users/block"
);

const headers = {
    "X-Signature": "string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "user@example.com",
    "is_blocked": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/integration/users/block

Headers

X-Signature        

Example: string required The HMAC-SHA256 signature of the raw request body. Example: 2f8a...

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The email of the user. Example: user@example.com

is_blocked   boolean     

Set to true to block, false to unblock. Example: true

Predictions

Endpoints for AI-powered repair cost predictions, VIN extraction, and prediction feedback. All endpoints require a valid API key in the Authorization header.

Get Problem Identifiers

requires authentication

Fetches available problem categories for a vehicle's group based on its VIN. Returns hierarchical category names (Parent > Child) that can be used as the problem_identifier parameter in the predict endpoint.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/problems" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vin\": \"1HGBH41JXMN109186\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/problems"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vin": "1HGBH41JXMN109186"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": [
        {
            "id": 42,
            "display_name": "Brakes > Brake Pad Replacement"
        },
        {
            "id": 15,
            "display_name": "Engine > Oil Change"
        },
        {
            "id": 78,
            "display_name": "Suspension > Shock Absorber"
        }
    ]
}
 

Example response (404):


{
    "success": false,
    "message": "Vehicle not found based on the provided VIN.",
    "error_code": "VEHICLE_NOT_FOUND"
}
 

Example response (500):


{
    "success": false,
    "message": "An error occurred while fetching problems.",
    "error_details": "Error message here"
}
 

Request      

POST api/v1/predict/problems

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vin   string     

The vehicle VIN (11 or 17 characters). Example: 1HGBH41JXMN109186

List Problem Categories (Main)

requires authentication

Returns all top-level (parent) problem identifier categories.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/categories" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Brakes",
            "description": "Brake system issues"
        },
        {
            "id": 2,
            "name": "Engine",
            "description": "Engine related problems"
        }
    ]
}
 

Request      

GET api/v1/predict/categories

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

requires authentication

Search across all visible sub-categories by name. Returns matches with their parent category.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/categories/search?q=brake+pad&limit=10" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/categories/search"
);

const params = {
    "q": "brake pad",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Describe Sub-category

requires authentication

Returns a brief AI-generated description of what a repair sub-category involves. Descriptions are cached — first call generates via AI, subsequent calls return from DB.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/categories/38/describe" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/categories/38/describe"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/predict/categories/{id}/describe

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The sub-category ID. Example: 38

List Sub-Categories

requires authentication

Returns all child problem identifier categories under a given main category.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/categories/1/sub" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/categories/1/sub"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": [
        {
            "id": 10,
            "name": "Brake Pad Replacement",
            "description": null
        },
        {
            "id": 11,
            "name": "Brake Rotor Replacement",
            "description": null
        }
    ]
}
 

Example response (404):


{
    "success": false,
    "message": "Main category not found."
}
 

Request      

GET api/v1/predict/categories/{parentId}/sub

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

parentId   integer     

The ID of the main category. Example: 1

Get Red Flags / Prediction History

requires authentication

Returns the most recent 50 predictions with red flag analysis and feedback counts. Admins see all predictions; regular users see only their own.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/red-flags" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/red-flags"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": [
        {
            "id": 1,
            "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "vin": "1HGBH41JXMN109186",
            "problem_name": "Brakes > Brake Pad Replacement",
            "red_flag": true,
            "red_flag_reason": "Local estimate appears unrealistically low compared to the aggregated AI prediction.",
            "match_percentage": 45.2,
            "local_average_estimate": 150,
            "ai_average_estimate": 450,
            "feedbacks_count": 3,
            "good_feedbacks_count": 2,
            "created_at": "2026-03-05T10:30:00.000000Z"
        }
    ]
}
 

Request      

GET api/v1/predict/red-flags

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Extract VIN from Image

requires authentication

Uses Gemini AI vision to extract a 17-character VIN from an uploaded image. Supports photos of VIN plates, stickers, dashboards, and registration documents.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/extract-vin" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "image=@C:\Users\ZBook\AppData\Local\Temp\php9769.tmp" 
const url = new URL(
    "http://localhost:62000/api/v1/predict/extract-vin"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "vin": "1HGBH41JXMN109186",
    "message": "VIN extracted successfully"
}
 

Example response (422):


{
    "success": false,
    "message": "Could not detect a valid 17-character VIN in the provided image."
}
 

Example response (500):


{
    "success": false,
    "message": "An error occurred during AI image processing.",
    "error_details": "Error message here"
}
 

Request      

POST api/v1/predict/extract-vin

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

image   file     

The image file containing a VIN. Max 10MB. Allowed types: jpeg, png, jpg, webp. Example: C:\Users\ZBook\AppData\Local\Temp\php9769.tmp

Resolve VIN from License Plate

requires authentication

Looks up a US license plate to get the VIN, then runs it through the existing VIN flow (NHTSA decode, API-Ninjas enrichment, vehicle creation).

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/plate-to-vin" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plate\": \"TESTPLATE1\",
    \"state\": \"CA\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/plate-to-vin"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "plate": "TESTPLATE1",
    "state": "CA"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "vin": "1C4PJMCS6EW221428",
    "plate": "TESTPLATE1",
    "state": "CA",
    "vehicle": {
        "id": "019cd1d5-3003-7069-a439-eddb9f25914d",
        "display_name": "2014 Jeep Cherokee Limited 3.2 L 271 HP ...",
        "motor_vehicle_type": "Truck",
        "motor_vehicle_type_group": "Light Duty"
    },
    "message": "VIN resolved from plate successfully"
}
 

Example response (422):


{
    "success": false,
    "message": "Could not resolve a VIN from the provided license plate."
}
 

Request      

POST api/v1/predict/plate-to-vin

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

plate   string     

The license plate number. Example: TESTPLATE1

state   string     

The 2-letter US state code. Example: CA

Vehicle Lookup by VIN

requires authentication

Returns basic vehicle info (display name, make, model, year, plate number) for a given VIN. If the VIN is not in the database, it will be decoded via NHTSA and created.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/vehicle-lookup" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vin\": \"1GNCT18XX5K000000\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/vehicle-lookup"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vin": "1GNCT18XX5K000000"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "vin": "1GNCT18XX5K000000",
        "display_name": "2005 Chevrolet Equinox LT 3.4 L 185 HP ...",
        "make": "Chevrolet",
        "model": "Equinox",
        "year": 2005,
        "plate_no": "ABC1234"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Could not decode this VIN."
}
 

Request      

POST api/v1/predict/vehicle-lookup

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vin   string     

The VIN number (11-17 characters). Example: 1GNCT18XX5K000000

Predict by Vehicle Specs

requires authentication

Calculates a repair cost prediction using year/make/model instead of a VIN. Searches the database for matching vehicles, optionally narrowed by trim and engine. If no match is found, creates a spec-based vehicle using API-Ninjas for enrichment. Then runs the same prediction flow as the VIN-based endpoint.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/by-specs" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"year\": 2016,
    \"make\": \"Ram\",
    \"model\": \"1500\",
    \"trim\": \"SLT\",
    \"engine\": \"5.7\",
    \"drivetrain\": \"m\",
    \"transmission\": \"y\",
    \"zip_code\": \"90210\",
    \"problem_identifier\": \"42\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/by-specs"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "year": 2016,
    "make": "Ram",
    "model": "1500",
    "trim": "SLT",
    "engine": "5.7",
    "drivetrain": "m",
    "transmission": "y",
    "zip_code": "90210",
    "problem_identifier": "42"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "success": true,
  "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "vehicle_match": {
    "source": "database",
    "matched_count": 12,
    "vehicle_used": {
      "id": "...",
      "vin": "1C6RR6GT2GS******",
      "display_name": "2016 Ram 1500 SLT 5.7 L 395 HP V 8 (T) GAS FI - EZH - A"
    }
  },
  "local_prediction": { "..." },
  "gemini_prediction": { "..." },
  "deepseek_prediction": { "..." },
  "repair_breakdown": { "..." }
}
 

Example response (404):


{
    "success": false,
    "message": "No vehicles found for the provided specs and could not create one."
}
 

Request      

POST api/v1/predict/by-specs

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

year   integer     

The vehicle year. Example: 2016

make   string     

The vehicle make. Example: Ram

model   string     

The vehicle model. Example: 1500

trim   string  optional    

optional The vehicle trim. Example: SLT

engine   string  optional    

optional Engine displacement (e.g. "5.7"). Example: 5.7

drivetrain   string  optional    

Must not be greater than 50 characters. Example: m

transmission   string  optional    

Must not be greater than 100 characters. Example: y

zip_code   string     

The zip code for regional pricing. Example: 90210

problem_identifier   string     

The problem category ID or identifier. Example: 42

POST api/v1/predict/diagnose

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/diagnose" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Eius et animi quos velit et.\",
    \"vin\": \"vdljnik\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/diagnose"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "description": "Eius et animi quos velit et.",
    "vin": "vdljnik"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/predict/diagnose

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

description   string     

Must be at least 10 characters. Must not be greater than 2000 characters. Example: Eius et animi quos velit et.

vin   string  optional    

Must be at least 11 characters. Must not be greater than 17 characters. Example: vdljnik

Start a Diagnostic Chat Session

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/diagnose/start" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "description=Eius et animi quos velit et."\
    --form "vin=vdljnik"\
    --form "image=@C:\Users\ZBook\AppData\Local\Temp\php997E.tmp" 
const url = new URL(
    "http://localhost:62000/api/v1/predict/diagnose/start"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('description', 'Eius et animi quos velit et.');
body.append('vin', 'vdljnik');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/predict/diagnose/start

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

description   string  optional    

Must be at least 10 characters. Must not be greater than 2000 characters. Example: Eius et animi quos velit et.

vin   string  optional    

Must be at least 11 characters. Must not be greater than 17 characters. Example: vdljnik

image   file  optional    

Must be an image. Must not be greater than 10240 kilobytes. Example: C:\Users\ZBook\AppData\Local\Temp\php997E.tmp

Reply to a Diagnostic Chat Session

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/diagnose/reply" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "session_id=6ff8f7f6-1eb3-3525-be4a-3932c805afed"\
    --form "answer=g"\
    --form "image=@C:\Users\ZBook\AppData\Local\Temp\php99FC.tmp" 
const url = new URL(
    "http://localhost:62000/api/v1/predict/diagnose/reply"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('session_id', '6ff8f7f6-1eb3-3525-be4a-3932c805afed');
body.append('answer', 'g');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/predict/diagnose/reply

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

session_id   string     

Must be a valid UUID. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

answer   string  optional    

Must be at least 1 character. Must not be greater than 2000 characters. Example: g

image   file  optional    

Must be an image. Must not be greater than 10240 kilobytes. Example: C:\Users\ZBook\AppData\Local\Temp\php99FC.tmp

Reset a Diagnostic Chat Session

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/diagnose/reset" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"6ff8f7f6-1eb3-3525-be4a-3932c805afed\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/diagnose/reset"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/predict/diagnose/reset

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   string     

Must be a valid UUID. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Get a Diagnostic Chat Session

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/diagnose/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/diagnose/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthorized"
}
 

Request      

GET api/v1/predict/diagnose/{sessionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

requires authentication

Associates a customer email with an existing prediction session.

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/link-email" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",
    \"email\": \"customer@example.com\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/link-email"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "customer@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Get Available Makes

requires authentication

Returns all distinct vehicle makes in the database, sorted alphabetically. Optionally filter by year to only show makes available for that year.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/makes?year=2016" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/makes"
);

const params = {
    "year": "2016",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "count": 45,
    "data": [
        "Acura",
        "BMW",
        "Chevrolet",
        "Dodge",
        "Ford",
        "..."
    ]
}
 

Request      

GET api/v1/predict/makes

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

year   integer  optional    

Optional year to filter makes. Example: 2016

Get Available Models

requires authentication

Returns all distinct vehicle models for a given make. Optionally filter by year.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/models?make=Chevrolet&year=2016" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"b\",
    \"year\": 22
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/models"
);

const params = {
    "make": "Chevrolet",
    "year": "2016",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "b",
    "year": 22
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "count": 12,
    "data": [
        "Camaro",
        "Corvette",
        "Equinox",
        "Malibu",
        "Silverado 1500",
        "..."
    ]
}
 

Request      

GET api/v1/predict/models

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

make   string     

The vehicle make. Example: Chevrolet

year   integer  optional    

Optional year to filter models. Example: 2016

Body Parameters

make   string     

Must not be greater than 100 characters. Example: b

year   integer     

Must be at least 1900. Must not be greater than 2100. Example: 22

Get Available Trims

requires authentication

Returns all distinct trims for a given make, model, and year. Parsed from the vehicle display_name field.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/trims?make=Chevrolet&model=Camaro&year=2016" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"b\",
    \"model\": \"n\",
    \"year\": 7
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/trims"
);

const params = {
    "make": "Chevrolet",
    "model": "Camaro",
    "year": "2016",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "b",
    "model": "n",
    "year": 7
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "count": 3,
    "data": [
        "LT",
        "SS",
        "ZL1"
    ]
}
 

Request      

GET api/v1/predict/trims

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

make   string     

The vehicle make. Example: Chevrolet

model   string     

The vehicle model. Example: Camaro

year   integer     

The vehicle year. Example: 2016

Body Parameters

make   string     

Must not be greater than 100 characters. Example: b

model   string     

Must not be greater than 100 characters. Example: n

year   integer     

Must be at least 1900. Must not be greater than 2100. Example: 7

Get Available Engines

requires authentication

Returns all distinct engine configurations for a given make, model, and year. Optionally filter by trim. Parsed from the vehicle display_name field.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/engines?make=Chevrolet&model=Camaro&year=2016&trim=SS" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"b\",
    \"model\": \"n\",
    \"year\": 7,
    \"trim\": \"z\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/engines"
);

const params = {
    "make": "Chevrolet",
    "model": "Camaro",
    "year": "2016",
    "trim": "SS",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "b",
    "model": "n",
    "year": 7,
    "trim": "z"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "count": 2,
    "data": [
        {
            "displacement": "3.6",
            "hp": "335",
            "cylinders": "V 6",
            "fuel": "GAS"
        },
        {
            "displacement": "6.2",
            "hp": "455",
            "cylinders": "V 8",
            "fuel": "GAS"
        }
    ]
}
 

Request      

GET api/v1/predict/engines

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

make   string     

The vehicle make. Example: Chevrolet

model   string     

The vehicle model. Example: Camaro

year   integer     

The vehicle year. Example: 2016

trim   string  optional    

optional Filter by trim. Example: SS

Body Parameters

make   string     

Must not be greater than 100 characters. Example: b

model   string     

Must not be greater than 100 characters. Example: n

year   integer     

Must be at least 1900. Must not be greater than 2100. Example: 7

trim   string  optional    

Must not be greater than 100 characters. Example: z

Get Available Drivetrains

requires authentication

Returns all distinct drivetrain options for a given make, model, and year.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/drivetrains?make=Ford&model=Escape&year=2023" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"b\",
    \"model\": \"n\",
    \"year\": 7
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/drivetrains"
);

const params = {
    "make": "Ford",
    "model": "Escape",
    "year": "2023",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "b",
    "model": "n",
    "year": 7
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "count": 2,
    "data": [
        "Front-Wheel Drive",
        "All-Wheel Drive"
    ]
}
 

Request      

GET api/v1/predict/drivetrains

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

make   string     

The vehicle make. Example: Ford

model   string     

The vehicle model. Example: Escape

year   integer     

The vehicle year. Example: 2023

Body Parameters

make   string     

Must not be greater than 100 characters. Example: b

model   string     

Must not be greater than 100 characters. Example: n

year   integer     

Must be at least 1900. Must not be greater than 2100. Example: 7

Get Available Transmissions

requires authentication

Returns all distinct transmission options for a given make, model, and year.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/transmissions?make=Ford&model=Escape&year=2023" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"b\",
    \"model\": \"n\",
    \"year\": 7
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/transmissions"
);

const params = {
    "make": "Ford",
    "model": "Escape",
    "year": "2023",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "b",
    "model": "n",
    "year": 7
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "count": 2,
    "data": [
        "Automatic 8-Speed",
        "Automatic (AV-S7)"
    ]
}
 

Request      

GET api/v1/predict/transmissions

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

make   string     

The vehicle make. Example: Ford

model   string     

The vehicle model. Example: Escape

year   integer     

The vehicle year. Example: 2023

Body Parameters

make   string     

Must not be greater than 100 characters. Example: b

model   string     

Must not be greater than 100 characters. Example: n

year   integer     

Must be at least 1900. Must not be greater than 2100. Example: 7

POST api/v1/predict/feedback

Example request:
curl --request POST \
    "http://localhost:62000/api/v1/predict/feedback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"6ff8f7f6-1eb3-3525-be4a-3932c805afed\",
    \"rating\": \"wrong\",
    \"comment\": \"g\"
}"
const url = new URL(
    "http://localhost:62000/api/v1/predict/feedback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
    "rating": "wrong",
    "comment": "g"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/predict/feedback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   string     

Must be a valid UUID. The session_id of an existing record in the prediction_histories table. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

rating   string     

Example: wrong

Must be one of:
  • good
  • wrong
comment   string  optional    

Must not be greater than 1000 characters. Example: g

Get Feedback Stats

requires authentication

Returns feedback statistics and all feedback entries for a prediction. Includes total count, good/wrong breakdown, and a calculated feedback score (0-100%). Admins can view any prediction's feedback; regular users only their own.

Example request:
curl --request GET \
    --get "http://localhost:62000/api/v1/predict/feedback/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:62000/api/v1/predict/feedback/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "total_feedbacks": 5,
    "good_count": 4,
    "wrong_count": 1,
    "feedback_score": 80,
    "feedbacks": [
        {
            "id": 1,
            "rating": "good",
            "comment": "Very accurate!",
            "created_at": "2026-03-05T12:00:00.000000Z"
        }
    ]
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\PredictionHistory]."
}
 

Request      

GET api/v1/predict/feedback/{session_id}

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   string     

The UUID session ID of the prediction. Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890