POST /api/auth
Body:
{
"token": string,
"clientId": string,
"table": string, // "Riders", "Drivers", or "Dispatchers"
"email": string
}
Response:
{
"jwt": string
}
JWT after decoding:
{
"id": string,
"userType": "Rider" | "Driver" | "Dispatcher"
}
To use this JWT token, attach it to any request in the Authorization
header, following the form:
{
"Authorization": "Bearer <token>"
}
GET /api/riders/<id>
Response: All fields in the document of the specified Rider
GET /api/riders
Response: All documents in the Riders table in an array accessed with key "data"