EndpointOS Docs

Vehicle Inventory API

A demo hosted CRUD API for vehicle inventory records.

OpenAPI JSON

Authentication

Send an EndpointOS API key with every request. Use either bearer auth or the x-api-key header.

Authorization: Bearer sapi_live_xxxxxxxx
x-api-key: sapi_test_xxxxxxxx

Response Shape

Successful responses return data. List endpoints include pagination. Errors return a stable error object.

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Field 'make' is required.",
    "details": {}
  }
}

vehicles

vehicles

Vehicle records available through the generated CRUD API.

Endpoints

GEThttps://endpointos.dev/api/public/vehicle-inventory-api/vehicles
POSThttps://endpointos.dev/api/public/vehicle-inventory-api/vehicles
GEThttps://endpointos.dev/api/public/vehicle-inventory-api/vehicles/{id}
PATCHhttps://endpointos.dev/api/public/vehicle-inventory-api/vehicles/{id}
DELETEhttps://endpointos.dev/api/public/vehicle-inventory-api/vehicles/{id}

curl

curl -X POST "https://endpointos.dev/api/public/vehicle-inventory-api/vehicles" \
  -H "Authorization: Bearer sapi_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"make":"BMW","model":"Example","year":2026,"price":1200,"mileage":1200,"fuelType":"petrol","isPublished":true}'

JavaScript

await fetch("https://endpointos.dev/api/public/vehicle-inventory-api/vehicles", {
  method: "POST",
  headers: {
    Authorization: "Bearer sapi_live_xxxxxxxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "make": "BMW",
  "model": "Example",
  "year": 2026,
  "price": 1200,
  "mileage": 1200,
  "fuelType": "petrol",
  "isPublished": true
})
});

Python

import requests

requests.post(
    "https://endpointos.dev/api/public/vehicle-inventory-api/vehicles",
    headers={"Authorization": "Bearer sapi_live_xxxxxxxx"},
    json={
    "make": "BMW",
    "model": "Example",
    "year": 2026,
    "price": 1200,
    "mileage": 1200,
    "fuelType": "petrol",
    "isPublished": True
}
)

Schema

FieldTypeRequiredNotes
makestringYesText value.
modelstringYesText value.
yearnumberYesFinite numeric value.
pricenumberNoFinite numeric value.
mileagenumberNoFinite numeric value.
fuelTypeenumNoAllowed values: petrol, diesel, hybrid, electric
isPublishedbooleanNotrue or false.