Skip to content

NAVIGATION

LAB

EST. MMXXIV — RAJSHAHI / REMOTE

← EXPERIMENTS
API · LIVE

Service Quote API

What happens after you press the button.

A small route handler running on this site, modelled on the service-booking flow in iGarage. Pick a vehicle and a service, send the request, and read exactly what the server sends back. The catalogue is sample data; the request and response are real.

REQUEST

GET /api/lab/service-quote?vehicle=axio-2018&service=brake-inspection

Try the unknown vehicle or the empty service to see the API refuse the request.

  1. Browserfetch()
  2. Route handlerGET /api/lab/…
  3. Validate400 if fields missing
  4. Look up404 if unknown
  5. Price + respondJSON + headers

RESPONSE

Send a request to see the live response.

—INSIDE THE HANDLER

Three steps, each with its own way to say no

The interface is only as clear as the API behind it. Every failure has a status code, a machine-readable code, and a message a UI can show as-is.

  1. 01

    Validate the query

    Missing fields return 400 with an error code and a per-field details map, so a form can mark the exact field.

  2. 02

    Look the records up

    An unknown vehicle or service returns 404 with the id that failed, not a generic error.

  3. 03

    Price the job and respond

    Labour plus parts in BDT, whether the service is due from mileage, and the next three open weekday slots in Dhaka time. Responses carry a request id, Server-Timing, and no-store caching.