Skip to navigation

is account exist

View as Markdown

Checks if a driver account is already registered with a given phone number, and returns the driver’s current account status, active state, and block status before proceeding to login or registration.


Endpoint Overview

  • Method: GET

  • Route: /api/v1/driver/is-account-exist

  • Authentication: None (Public)

  • Content-Type: N/A


Query Parameters

ParameterData TypeRequiredAllowed Values / ConstraintsDescription
phonestringYesMin length: 1 (e.g. +919876543210)Mobile phone number to check

Example Request URL

GET {{baseUrl}}/api/v1/driver/is-account-exist?phone=+919876543210

Response Body Schema (200 OK)

FieldData TypeNullable / OptionalAllowed Values / ConstraintsDescription
is_existbooleanNotrue, falsetrue if an account with this phone number exists, false otherwise
statusenumYes"PENDING_ONBOARDING""PENDING_APPROVAL""APPROVED""REJECTED""SUSPENDED""BLOCKED"Onboarding & verification status (omitted if account does not exist)
is_activebooleanYestrue, falseWhether driver profile is active in the system
is_blockedbooleanYestrue, falseWhether driver account has been banned/blocked

Response Examples

1. 200 OK — Account Exists (Approved Driver)

{
"is_exist": true,
"status": "APPROVED",
"is_active": true,
"is_blocked": false
}

2. 200 OK — Account Exists (Pending Onboarding / Profile Incomplete)

{
"is_exist": true,
"status": "PENDING_ONBOARDING",
"is_active": true,
"is_blocked": false
}

3. 200 OK — Account Exists (Blocked / Suspended)

{
"is_exist": true,
"status": "BLOCKED",
"is_active": false,
"is_blocked": true
}

4. 200 OK — Account Does Not Exist

{
"is_exist": false
}

5. 400 Bad Request — Validation Error (Missing phone)

Triggered when the phone query parameter is omitted or empty:

{
"success": false,
"message": "Validation failed: phone: Phone number is required",
"errors": [
{
"field": "phone",
"message": "Phone number is required"
}
]
}

Status Codes Reference

HTTP Status CodeCondition
200 OKQuery processed successfully. Returns existence boolean and status flags.
400 Bad RequestMissing or empty phone query parameter.

Would you like the documentation for GET /api/v1/driver/me (Protected driver profile) next, or another specific route?

Authentication

AuthorizationBearer

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

Query parameters

phoneintegerOptional