is account exist

View as Markdown
# Check Driver Account Existence 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 | Parameter | Data Type | Required | Allowed Values / Constraints | Description | | --- | --- | --- | --- | --- | | `phone` | `string` | **Yes** | Min length: 1 (e.g. `+919876543210`) | Mobile phone number to check | #### Example Request URL ``` http GET {{baseUrl}}/api/v1/driver/is-account-exist?phone=+919876543210 ``` --- ### Response Body Schema (`200 OK`) | Field | Data Type | Nullable / Optional | Allowed Values / Constraints | Description | | --- | --- | --- | --- | --- | | `is_exist` | `boolean` | No | `true`, `false` | `true` if an account with this phone number exists, `false` otherwise | | `status` | `enum` | Yes | `"PENDING_ONBOARDING""PENDING_APPROVAL""APPROVED""REJECTED""SUSPENDED""BLOCKED"` | Onboarding & verification status (omitted if account does not exist) | | `is_active` | `boolean` | Yes | `true`, `false` | Whether driver profile is active in the system | | `is_blocked` | `boolean` | Yes | `true`, `false` | Whether driver account has been banned/blocked | --- ### Response Examples #### 1\. `200 OK` — Account Exists (Approved Driver) ``` json { "is_exist": true, "status": "APPROVED", "is_active": true, "is_blocked": false } ``` #### 2\. `200 OK` — Account Exists (Pending Onboarding / Profile Incomplete) ``` json { "is_exist": true, "status": "PENDING_ONBOARDING", "is_active": true, "is_blocked": false } ``` #### 3\. `200 OK` — Account Exists (Blocked / Suspended) ``` json { "is_exist": true, "status": "BLOCKED", "is_active": false, "is_blocked": true } ``` #### 4\. `200 OK` — Account Does Not Exist ``` json { "is_exist": false } ``` #### 5\. `400 Bad Request` — Validation Error (Missing `phone`) Triggered when the `phone` query parameter is omitted or empty: ``` json { "success": false, "message": "Validation failed: phone: Phone number is required", "errors": [ { "field": "phone", "message": "Phone number is required" } ] } ``` --- ### Status Codes Reference | HTTP Status Code | Condition | | --- | --- | | **`200 OK`** | Query processed successfully. Returns existence boolean and status flags. | | **`400 Bad Request`** | Missing 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