Skip to navigation

me

View as Markdown

Retrieves the full profile details of the authenticated driver, including account status, duty status, rating, wallet balance, active vehicle information, and onboarding flags.


Endpoint Overview

  • Method: GET

  • Route: /api/v1/driver/me

  • Authentication: Bearer Token (Driver JWT)

  • Content-Type: N/A


Request Headers

HeaderTypeRequiredDescription
AuthorizationstringYesFormat: Bearer

Response Body Schema (200 OK)

Top-Level KeyData TypeDescription
driverobjectComplete authenticated driver profile

driver Object Fields

FieldData TypeNullableAllowed Values / ConstraintsDescription
idstringNoPrefixed with drv_Unique driver ID
namestringYesAny stringFull name of the driver
phonestringNoE.164 string formatRegistered mobile phone number
is_phone_verifiedbooleanNotrue, falseWhether phone number is verified
emailstringYesValid emailRegistered email address
is_email_verifiedbooleanNotrue, falseWhether email is verified
genderenumYes"MALE", "FEMALE", nullDriver gender
date_of_birthstringYesISO 8601 TimestampDriver date of birth
profile_image_urlstringYesValid URLAvatar image URL
is_profile_completebooleanNotrue, falseProfile completion status
statusenumNo"PENDING_ONBOARDING""PENDING_APPROVAL""APPROVED""REJECTED""SUSPENDED""BLOCKED"Operational & verification state
duty_statusenumNo"OFFLINE""ONLINE""ON_TRIP"Real-time driver operational state
rejection_reasonstringYesAny stringRejection explanation if status is REJECTED
ratingstringNoDecimal string (e.g. "4.85")Driver rating (out of 5.00)
total_tripsintegerNo>= 0Total completed trips count
wallet_balancestringNoDecimal string (e.g. "3250.00")Driver wallet balance
service_categoryenumNo"BIKE""CAB""AMBULANCE""LOGISTICS"Operational service domain
citystringNoDefault: "DEFAULT"Operating city
statestringYesAny stringOperating state/province
languagestringNoDefault: "en"Preferred app language
own_referral_codestringYesPrefixed with CAP_Unique referral code assigned to this driver
referred_by_codestringYesAny stringReferral code used during signup
vehicle_namestringYesAny stringFlattened vehicle brand/make (e.g. "Maruti Suzuki")
vehicle_modelstringYesAny stringFlattened vehicle model (e.g. "Swift Dzire")
vehicle_colorstringYesAny stringFlattened vehicle paint color (e.g. "White")
number_platestringYesAny stringFlattened vehicle license number plate
vehicleobjectYesSub-object or nullDetailed vehicle record (null if no vehicle registered)
vehicle.idstringNoPrefixed with veh_Unique vehicle ID
vehicle.namestringNoAny stringVehicle make/brand name
vehicle.modelstringNoAny stringVehicle model name
vehicle.colorstringNoAny stringVehicle color
vehicle.number_platestringNoAny stringRegistration plate number
is_activebooleanNotrue, falseSystem active status
is_blockedbooleanNotrue, falseWhether account is blocked
last_login_atstringYesISO 8601 TimestampTimestamp when driver last authenticated
created_atstringNoISO 8601 TimestampAccount registration timestamp
updated_atstringNoISO 8601 TimestampLast update timestamp

Response Examples

1. 200 OK — Success (Profile with Vehicle)

{
"driver": {
"id": "drv_8a7b6c5d4e",
"name": "Ravi Kumar",
"phone": "+919876543210",
"is_phone_verified": true,
"email": "ravi.kumar@example.com",
"is_email_verified": true,
"gender": "MALE",
"date_of_birth": "1992-05-15T00:00:00.000Z",
"profile_image_url": "https://example.com/profiles/ravi.jpg",
"is_profile_complete": true,
"status": "APPROVED",
"duty_status": "ONLINE",
"rejection_reason": null,
"rating": "4.85",
"total_trips": 142,
"wallet_balance": "3250.00",
"service_category": "CAB",
"city": "Bengaluru",
"state": "Karnataka",
"language": "en",
"own_referral_code": "CAP_8X9K2",
"referred_by_code": null,
"vehicle_name": "Maruti Suzuki",
"vehicle_model": "Swift Dzire",
"vehicle_color": "White",
"number_plate": "KA-01-AB-1234",
"vehicle": {
"id": "veh_1a2b3c4d5e",
"name": "Maruti Suzuki",
"model": "Swift Dzire",
"color": "White",
"number_plate": "KA-01-AB-1234"
},
"is_active": true,
"is_blocked": false,
"last_login_at": "2026-09-21T04:45:00.000Z",
"created_at": "2026-08-10T12:00:00.000Z",
"updated_at": "2026-09-21T04:45:00.000Z"
}
}

2. 200 OK — Success (Newly Registered Driver, Incomplete Onboarding)

{
"driver": {
"id": "drv_8a7b6c5d4e",
"name": null,
"phone": "+919876543210",
"is_phone_verified": true,
"email": null,
"is_email_verified": false,
"gender": null,
"date_of_birth": null,
"profile_image_url": null,
"is_profile_complete": false,
"status": "PENDING_ONBOARDING",
"duty_status": "OFFLINE",
"rejection_reason": null,
"rating": "5.00",
"total_trips": 0,
"wallet_balance": "0.00",
"service_category": "CAB",
"city": "DEFAULT",
"state": null,
"language": "en",
"own_referral_code": "CAP_8X9K2",
"referred_by_code": null,
"vehicle_name": null,
"vehicle_model": null,
"vehicle_color": null,
"number_plate": null,
"vehicle": null,
"is_active": true,
"is_blocked": false,
"last_login_at": "2026-09-21T04:45:00.000Z",
"created_at": "2026-09-21T04:45:00.000Z",
"updated_at": "2026-09-21T04:45:00.000Z"
}
}

3. 401 Unauthorized — Missing or Invalid Access Token

When Authorization header is missing:

{
"error": "Unauthorized",
"message": "Driver access token is missing. Header format must be &#x27;Bearer <token>&#x27;."
}

When access token is expired or invalid:

{
"error": "Unauthorized",
"message": "Invalid or expired driver access token."
}

4. 401 Unauthorized — Session Revoked (Logged in on Another Device)

Enforced via single-device session tracking when a newer login has invalidated this session:

{
"error": "SESSION_REVOKED",
"message": "Your session has been terminated because your driver account logged in on another device."
}

5. 403 Forbidden — Account Blocked or Deactivated

Triggered if the driver account has been banned or deactivated by an admin:

{
"error": "Forbidden",
"message": "Driver account is blocked or deactivated."
}

6. 404 Not Found — Driver Not Found

{
"error": "Driver not found"
}

7. 500 Internal Server Error

{
"error": "Internal server error"
}

Status Codes Reference

HTTP Status CodeCondition
200 OKAccess token verified; current driver profile returned.
401 UnauthorizedMissing/invalid token or session revoked due to concurrent login.
403 ForbiddenAccount is blocked, banned, or soft-deleted.
404 Not FoundDriver record not found in database.
500 Internal Server ErrorUnhandled server or database error.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.