API

The PSM Pal API provides programmatic access to vehicle reliability data, survival curves, category risk scores, and cost projections.

Endpoints

POST/api/functions/get_survival_curve10 cr.

Survival curve across all mileage ranges

POST/api/functions/get_category_risks10 cr.

Failure probability per system for a mileage range

POST/api/functions/get_cost_projection20 cr.

Expected repair costs by region

POST/api/functions/get_category_detail15 cr.

Breakdown of one category by component

POST/api/functions/compare_vehicles20 cr.

Side-by-side comparison of two vehicles

GET/api/functions/get_available_vehiclesFree

Full catalog of supported vehicles

Authentication

All requests require a valid session cookie from Supabase Auth. Authenticate via /login before calling any endpoint.

Request format

All POST endpoints accept JSON with the following common fields:

{
  "brand": "Toyota",
  "model": "Corolla",
  "engine": "1.8 VVT-i",
  "year": 2018,
  "intervalle": "100000_150000km",
  "region": "france"
}