PNR Status
GET
GET /v1/pnr/:pnrDescription
Booking record behind a 10-digit PNR: train, journey date, class, quota, fare paid at booking, chart status and every passenger's current status with coach and berth. Reported exactly as the reservation system returns it — CNF, RAC and WL are never reinterpreted, and a flushed or expired PNR returns 404 PNR_NOT_FOUND.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pnr | PATH | string | YES | Path param - 10-digit PNR, e.g. 4523819076. |
Code Example
javascript
const res = await fetch(
"https://railway-engine.apkscope.workers.dev/v1/pnr/4523819076",
{ headers: { "x-api-key": "YOUR_KEY" } },
);
const { status, data, error } = await res.json();
if (status === "SUCCESS" || status === "STALE_DATA") {
console.log(data.trainNumber, data.journeyDate, data.classCode, data.chart?.status);
for (const p of data.passengers) {
console.log(p.passengerNumber, p.currentStatus, p.coach, p.berthCode);
}
} else {
console.error(status, error?.code, error?.message);
}Notes
A PNR is a personal credential: responses are never cached, never written to logs, and never shared between requests — always send it over HTTPS. Errors: 400 INVALID_REQUEST (not 10 digits), 404 PNR_NOT_FOUND (flushed, expired or never issued), 429 RATE_LIMITED, 503 PROVIDER_UNAVAILABLE. The passenger list is reported as PRS reports it; waitlist position is not predicted.
Response Example