Skip to main content

Status Codes

API Mitra uses standard HTTP status codes with a JSON body.

CodeMeaningBody
200Success{"status":"ok", ...}
400Bad request โ€” missing/invalid param{"status":"error","message":"..."}
404Not found (e.g. invalid PNR, unknown PIN){"status":"not_found","message":"..."}
500Server error{"status":"error","message":"..."}
502Upstream provider error{"status":"error","message":"..."}
503Database unavailable{"status":"error","message":"db down"}

Error Formatโ€‹

All errors follow the same shape:

{
"status": "error",
"message": "Human-readable explanation"
}

For most APIs an extra api field tells you which service failed:

{
"status": "error",
"api": "weather",
"message": "Unknown city. Available: kolkata, mumbai, delhi..."
}