MENU navbar-image

Introduction

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

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

API Key Management

APIs for managing developer API keys.

List API Keys

requires authentication

Get a list of all API keys for the authenticated user.

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/dashboard/keys" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/dashboard/keys"
);

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


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

Example response (200):


{
    "status": "success",
    "data": [
        {
            "id": 1,
            "name": "My Key",
            "public_key": "pk_test_...",
            "secret_key": "sk_test_...",
            "environment": "test",
            "last_used_at": null
        }
    ]
}
 

Request      

GET api/v1/dashboard/keys

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Generate API Key

requires authentication

Create a new API key for the authenticated user.

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/dashboard/keys" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Mobile App\",
    \"environment\": \"test\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/dashboard/keys"
);

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

let body = {
    "name": "Mobile App",
    "environment": "test"
};

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

Example response (201):


{
    "status": "success",
    "message": "API key generated successfully...",
    "data": {
        "id": 1,
        "name": "Mobile App",
        "public_key": "pk_test_...",
        "secret_key": "sk_test_...",
        "environment": "test"
    }
}
 

Request      

POST api/v1/dashboard/keys

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The name/label for the key. Example: Mobile App

environment   string     

The environment (live or test). Example: test

Revoke API Key

requires authentication

Delete an API key, preventing any future access with it.

Example request:
curl --request DELETE \
    "https://100.53.191.230/api/v1/dashboard/keys/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/dashboard/keys/1"
);

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


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

Example response (200):


{
    "status": "success",
    "message": "API key revoked successfully."
}
 

Request      

DELETE api/v1/dashboard/keys/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the API key to revoke. Example: 1

Authentication

APIs for handling user login, registration and logout.

Authenticate User

Log in a user with their email and password to receive a management token.

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"user@example.com\",
    \"password\": \"password\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/auth/login"
);

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

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

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

Example response (200):


{
    "status": "success",
    "message": "Authenticated successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe"
        },
        "session_token": "1|..."
    }
}
 

Request      

POST api/v1/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

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

password   string     

The password of the user. Example: password

Register User

Create a new developer account and receive a management token.

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"john@example.com\",
    \"password\": \"password\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/auth/register"
);

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

let body = {
    "name": "John Doe",
    "email": "john@example.com",
    "password": "password"
};

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

Example response (201):


{
    "status": "success",
    "message": "User registered successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe"
        },
        "session_token": "2|..."
    }
}
 

Request      

POST api/v1/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The name of the user. Example: John Doe

email   string     

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

password   string     

The password (min 8 chars). Example: password

Logout

requires authentication

Revoke the current management token.

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

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


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

Example response (200):


{
    "status": "success",
    "message": "Logged out successfully"
}
 

Request      

POST api/v1/auth/user/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Endpoints

GET api/v1/admin/problems

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/problems" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/problems"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/problems

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/problems/stats

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/problems/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/problems/stats"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/problems/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/problems/{parentId}/children

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/problems/architecto/children" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/problems/architecto/children"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/problems/{parentId}/children

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

parentId   string     

Example: architecto

GET api/v1/admin/problems/{id}/show

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/problems/architecto/show" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/problems/architecto/show"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/problems/{id}/show

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the problem. Example: architecto

GET api/v1/admin/problems/{id}/details

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/problems/architecto/details" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/problems/architecto/details"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/problems/{id}/details

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the problem. Example: architecto

GET api/v1/admin/vehicles

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/vehicles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/vehicles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/vehicles/stats

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/vehicles/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles/stats"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/vehicles/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/vehicles/form-options

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/vehicles/form-options" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles/form-options"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/vehicles/form-options

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/vehicles/search-models

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/vehicles/search-models" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles/search-models"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/vehicles/search-models

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/vehicles

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/admin/vehicles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vehicle_model_id\": \"architecto\",
    \"new_make\": \"n\",
    \"new_model\": \"g\",
    \"new_year\": 16,
    \"vin_mask\": \"miyvdlj\",
    \"current_mileage\": 52,
    \"plate_no\": \"ikhwaykcmyuwpwlv\",
    \"motor_vehicle_type\": \"q\",
    \"motor_vehicle_type_group\": \"w\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles"
);

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

let body = {
    "vehicle_model_id": "architecto",
    "new_make": "n",
    "new_model": "g",
    "new_year": 16,
    "vin_mask": "miyvdlj",
    "current_mileage": 52,
    "plate_no": "ikhwaykcmyuwpwlv",
    "motor_vehicle_type": "q",
    "motor_vehicle_type_group": "w"
};

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

Request      

POST api/v1/admin/vehicles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vehicle_model_id   string  optional    

The id of an existing record in the vehicle_models table. Example: architecto

new_make   string  optional    

This field is required when vehicle_model_id is not present. Must not be greater than 255 characters. Example: n

new_model   string  optional    

This field is required when vehicle_model_id is not present. Must not be greater than 255 characters. Example: g

new_year   integer  optional    

This field is required when vehicle_model_id is not present. Must be at least 1900. Must not be greater than 2100. Example: 16

vin_mask   string     

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

current_mileage   integer     

Must be at least 0. Example: 52

plate_no   string  optional    

Must not be greater than 20 characters. Example: ikhwaykcmyuwpwlv

motor_vehicle_type   string  optional    

Must not be greater than 255 characters. Example: q

motor_vehicle_type_group   string  optional    

Must not be greater than 255 characters. Example: w

seed_facility_id   string  optional    

The id of an existing record in the service_facilities table.

GET api/v1/admin/vehicles/{vehicle_id}

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/vehicles/019ca9f7-adeb-731e-9b71-062301ab7efe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles/019ca9f7-adeb-731e-9b71-062301ab7efe"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/vehicles/{vehicle_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vehicle_id   string     

The ID of the vehicle. Example: 019ca9f7-adeb-731e-9b71-062301ab7efe

PUT api/v1/admin/vehicles/{vehicle_id}

Example request:
curl --request PUT \
    "https://100.53.191.230/api/v1/admin/vehicles/019ca9f7-adeb-731e-9b71-062301ab7efe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vin_mask\": \"bngzmiy\",
    \"current_mileage\": 60,
    \"plate_no\": \"dljnikhwaykcmyuw\",
    \"motor_vehicle_type\": \"p\",
    \"motor_vehicle_type_group\": \"w\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles/019ca9f7-adeb-731e-9b71-062301ab7efe"
);

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

let body = {
    "vin_mask": "bngzmiy",
    "current_mileage": 60,
    "plate_no": "dljnikhwaykcmyuw",
    "motor_vehicle_type": "p",
    "motor_vehicle_type_group": "w"
};

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

Request      

PUT api/v1/admin/vehicles/{vehicle_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vehicle_id   string     

The ID of the vehicle. Example: 019ca9f7-adeb-731e-9b71-062301ab7efe

Body Parameters

vin_mask   string     

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

current_mileage   integer     

Must be at least 0. Example: 60

plate_no   string  optional    

Must not be greater than 20 characters. Example: dljnikhwaykcmyuw

motor_vehicle_type   string  optional    

Must not be greater than 255 characters. Example: p

motor_vehicle_type_group   string  optional    

Must not be greater than 255 characters. Example: w

DELETE api/v1/admin/vehicles/{vehicle_id}

Example request:
curl --request DELETE \
    "https://100.53.191.230/api/v1/admin/vehicles/019ca9f7-adeb-731e-9b71-062301ab7efe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/vehicles/019ca9f7-adeb-731e-9b71-062301ab7efe"
);

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


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

Request      

DELETE api/v1/admin/vehicles/{vehicle_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vehicle_id   string     

The ID of the vehicle. Example: 019ca9f7-adeb-731e-9b71-062301ab7efe

GET api/v1/admin/regions

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/regions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/regions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/regions/stats

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/regions/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions/stats"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/regions/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/regions/states

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/regions/states" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions/states"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/regions/states

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/regions/recalculate

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/admin/regions/recalculate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions/recalculate"
);

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


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

Request      

POST api/v1/admin/regions/recalculate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/regions

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/admin/regions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"facility_name\": \"b\",
    \"city\": \"n\",
    \"state\": \"g\",
    \"zip_code\": \"zmiyvdljnikhwayk\",
    \"country\": \"c\",
    \"avg_labor_rate\": 38
}"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions"
);

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

let body = {
    "facility_name": "b",
    "city": "n",
    "state": "g",
    "zip_code": "zmiyvdljnikhwayk",
    "country": "c",
    "avg_labor_rate": 38
};

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

Request      

POST api/v1/admin/regions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

facility_name   string     

Must not be greater than 255 characters. Example: b

city   string  optional    

Must not be greater than 255 characters. Example: n

state   string  optional    

Must not be greater than 255 characters. Example: g

zip_code   string  optional    

Must not be greater than 20 characters. Example: zmiyvdljnikhwayk

country   string  optional    

Must not be greater than 255 characters. Example: c

avg_labor_rate   number  optional    

Must be at least 0. Example: 38

GET api/v1/admin/regions/{facility_id}

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/regions/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions/1"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/regions/{facility_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

facility_id   integer     

The ID of the facility. Example: 1

PUT api/v1/admin/regions/{facility_id}

Example request:
curl --request PUT \
    "https://100.53.191.230/api/v1/admin/regions/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"facility_name\": \"b\",
    \"city\": \"n\",
    \"state\": \"g\",
    \"zip_code\": \"zmiyvdljnikhwayk\",
    \"country\": \"c\",
    \"avg_labor_rate\": 38
}"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions/1"
);

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

let body = {
    "facility_name": "b",
    "city": "n",
    "state": "g",
    "zip_code": "zmiyvdljnikhwayk",
    "country": "c",
    "avg_labor_rate": 38
};

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

Request      

PUT api/v1/admin/regions/{facility_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

facility_id   integer     

The ID of the facility. Example: 1

Body Parameters

facility_name   string     

Must not be greater than 255 characters. Example: b

city   string  optional    

Must not be greater than 255 characters. Example: n

state   string  optional    

Must not be greater than 255 characters. Example: g

zip_code   string  optional    

Must not be greater than 20 characters. Example: zmiyvdljnikhwayk

country   string  optional    

Must not be greater than 255 characters. Example: c

avg_labor_rate   number  optional    

Must be at least 0. Example: 38

DELETE api/v1/admin/regions/{facility_id}

Example request:
curl --request DELETE \
    "https://100.53.191.230/api/v1/admin/regions/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/regions/1"
);

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


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

Request      

DELETE api/v1/admin/regions/{facility_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

facility_id   integer     

The ID of the facility. Example: 1

GET api/v1/admin/transactions

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/transactions/stats

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/transactions/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions/stats"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/transactions/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/transactions/form-options

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/transactions/form-options" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions/form-options"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/transactions/form-options

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/transactions

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/admin/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions"
);

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


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

Request      

POST api/v1/admin/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/transactions/{transaction_id}

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/transactions/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions/1"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/transactions/{transaction_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transaction_id   integer     

The ID of the transaction. Example: 1

GET api/v1/admin/transactions/{transaction_id}/details

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/v1/admin/transactions/1/details" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions/1/details"
);

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": "Unauthenticated."
}
 

Request      

GET api/v1/admin/transactions/{transaction_id}/details

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transaction_id   integer     

The ID of the transaction. Example: 1

PUT api/v1/admin/transactions/{transaction_id}

Example request:
curl --request PUT \
    "https://100.53.191.230/api/v1/admin/transactions/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions/1"
);

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


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

Request      

PUT api/v1/admin/transactions/{transaction_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transaction_id   integer     

The ID of the transaction. Example: 1

DELETE api/v1/admin/transactions/{transaction_id}

Example request:
curl --request DELETE \
    "https://100.53.191.230/api/v1/admin/transactions/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/admin/transactions/1"
);

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


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

Request      

DELETE api/v1/admin/transactions/{transaction_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transaction_id   integer     

The ID of the transaction. Example: 1

Access Secure Data

requires authentication

This endpoint is protected by the API Key middleware. You must provide a valid secret key in the Authorization header.

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/secure-data" \
    --header "Authorization: Bearer sk_test_..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/v1/secure-data"
);

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


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

Example response (200):


{
    "message": "Secure data accessed successfully",
    "api_key_used": "My Key"
}
 

Request      

POST api/v1/secure-data

Headers

Authorization        

Example: Bearer sk_test_...

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/user

Example request:
curl --request GET \
    --get "https://100.53.191.230/api/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/api/user"
);

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": "Unauthenticated."
}
 

Request      

GET api/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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 Repair Cost Prediction

requires authentication

Calculates a repair price estimate using local historical data combined with AI predictions from Gemini and DeepSeek. Results are cached for 3 days using a memory decay system (100% fresh → 0% at expiry).

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/predict" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vin\": \"1HGBH41JXMN109186\",
    \"zip_code\": \"90210\",
    \"problem_identifier\": \"42\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/predict"
);

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

let body = {
    "vin": "1HGBH41JXMN109186",
    "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",
    "memory_source": "fresh",
    "memory_decay_remaining": 100,
    "memory_expires_at": "2026-03-08T12:00:00+00:00",
    "red_flag": false,
    "red_flag_reason": null,
    "match_percentage": 87.5,
    "aggregated_ai_average": 450,
    "local_prediction": {
        "average_total_estimate": 425.5,
        "low_total_estimate": 350,
        "high_total_estimate": 500
    },
    "gemini_prediction": {
        "ai_average_estimate": 460,
        "match_percentage": 92
    },
    "deepseek_prediction": {
        "ai_average_estimate": 440,
        "match_percentage": 96.5
    },
    "repair_breakdown": {
        "source": "local_scaled",
        "parts": [
            {
                "name": "Brake Pad Set",
                "unit_price": 45,
                "quantity": 2,
                "total_price": 90
            }
        ],
        "estimated_labor_hours": 1.5,
        "total_parts_cost": 90,
        "total_estimate": 425.5
    }
}
 

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 calculating the estimate.",
    "error_details": "Error message here"
}
 

Request      

POST api/v1/predict

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

zip_code   string     

The zip code for regional pricing. Example: 90210

problem_identifier   string     

The problem category ID or identifier. Example: 42

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 \
    "https://100.53.191.230/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(
    "https://100.53.191.230/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 "https://100.53.191.230/api/v1/predict/categories" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/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

List Sub-Categories

requires authentication

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

Example request:
curl --request GET \
    --get "https://100.53.191.230/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(
    "https://100.53.191.230/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 "https://100.53.191.230/api/v1/predict/red-flags" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://100.53.191.230/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 \
    "https://100.53.191.230/api/v1/predict/extract-vin" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "image=@/tmp/phpqGmp2t" 
const url = new URL(
    "https://100.53.191.230/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: /tmp/phpqGmp2t

Submit Prediction Feedback

requires authentication

Allows users to rate a prediction as "good" or "wrong" with an optional comment. Admins can submit feedback on any prediction; regular users only on their own.

Example request:
curl --request POST \
    "https://100.53.191.230/api/v1/predict/feedback" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",
    \"rating\": \"good\",
    \"comment\": \"Price was accurate for my area.\"
}"
const url = new URL(
    "https://100.53.191.230/api/v1/predict/feedback"
);

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

let body = {
    "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "rating": "good",
    "comment": "Price was accurate for my area."
};

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

Example response (201):


{
    "success": true,
    "message": "Feedback submitted successfully.",
    "data": {
        "id": 1,
        "prediction_history_id": 42,
        "rating": "good",
        "comment": "Price was accurate for my area.",
        "created_at": "2026-03-05T12:00:00.000000Z"
    }
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "session_id": [
            "The selected session id is invalid."
        ]
    }
}
 

Request      

POST api/v1/predict/feedback

Headers

Authorization        

Example: Bearer {YOUR_API_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   string     

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

rating   string     

The rating value. Must be "good" or "wrong". Example: good

comment   string  optional    

Optional feedback comment (max 1000 chars). Example: Price was accurate for my area.

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 "https://100.53.191.230/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(
    "https://100.53.191.230/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