Skip to main content

Get All Non Registered Users API

Overview

Retrieve a list of non-registered users with optional filtering, search, and pagination support. This API allows you to query non-registered user information stored in the system. Additionally, when the check_registered_user flag is enabled, the API can also check and return registered user details from the user master table if a registered user exists with the provided phone number.

API Details

Endpoint

GET https://api.gafapay.com/gafapay/v3/user/non_registered_user

Headers

authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b

Query Parameters

Optional Parameters

  • phone_number (String): Filter by exact phone number match

    • Example: 9876543210
    • Returns only records matching this exact phone number
  • dial_code (String): Dial code for the phone number (required when check_registered_user is true)

    • Example: +91, +1
    • Used in conjunction with check_registered_user flag to search for registered users
  • check_registered_user (Boolean): Flag to check for registered user in user master table

    • true = Check user master table for registered user with provided phone number
    • false or not provided = Skip registered user check
    • When true, both phone_number and dial_code must be provided
    • If a registered user is found, it will be included in the response under registered_user field
  • is_active (Boolean): Filter by active status

    • true = Active records only
    • false = Inactive records only
    • Default: true (if not specified, returns active records only)
  • skip (Integer): Number of records to skip (pagination)

    • Default: 0
    • Example: 0, 10, 20
    • Use for implementing pagination
  • limit (Integer): Maximum number of records to return (pagination)

    • Default: 10
    • Example: 10, 25, 50
    • Limits the number of results returned

Response

{
"success": 1,
"error": [],
"data": {
"non_registered_user": [
{
"id": "6f1b82443e524459831de59d430a0c41",
"phone_number": "9876543210",
"full_name": "John Doe",
"address": "123 Main Street, City, Country",
"dob": 631152000,
"created_by": "e4946877f18946b299fdd0f2133dcba",
"updated_by": null,
"created_date": 1755925484,
"updated_date": 1755925484,
"is_active": true
}
],
"registered_user": {
"id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"phone_number": "9876543210",
"full_name": "Jane Smith",
"address": null,
"dob": 631152000,
"created_by": "e4946877f18946b299fdd0f2133dcba",
"updated_by": "e4946877f18946b299fdd0f2133dcba",
"created_date": 1755925484,
"updated_date": 1755925484,
"is_active": true
}
}
}

Response with Only Registered User (No Non-Registered Users Found)

When check_registered_user is true and a registered user is found but no non-registered users exist:

{
"success": 1,
"error": [],
"data": {
"non_registered_user": [],
"registered_user": {
"id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"phone_number": "9876543210",
"full_name": "Jane Smith",
"address": null,
"dob": 631152000,
"created_by": "e4946877f18946b299fdd0f2133dcba",
"updated_by": "e4946877f18946b299fdd0f2133dcba",
"created_date": 1755925484,
"updated_date": 1755925484,
"is_active": true
}
}
}

Response Fields

  • success (integer): Response status indicator
    • 1 = Success
    • 0 = Failure
  • error (array): Array of error messages (empty on success)
  • data (object): Response data object
    • non_registered_user (array): Array of non-registered user objects
    • registered_user (object|null): Registered user object (only present when check_registered_user is true and a registered user is found)

Non Registered User Object Fields

  • id (string): Unique identifier of the non-registered user
  • phone_number (string): User's phone number
  • full_name (string|null): User's full name
  • address (string|null): User's address
  • dob (long|null): Date of birth as Unix timestamp (epoch seconds)
  • created_by (string|null): ID of the user who created this record
  • updated_by (string|null): ID of the user who last updated this record
  • created_date (long): Creation timestamp (Unix epoch seconds)
  • updated_date (long): Last update timestamp (Unix epoch seconds)
  • is_active (boolean): Active status of the record

Registered User Object Fields

When check_registered_user is true and a registered user is found, the registered_user object contains the same fields as the non-registered user object:

  • id (string): Unique identifier of the registered user
  • phone_number (string): User's phone number
  • full_name (string|null): User's full name (mapped from displayName or firstName + lastName from user master)
  • address (string|null): Always null (user master doesn't have address field)
  • dob (long|null): Date of birth as Unix timestamp (mapped from birthDate)
  • created_by (string|null): ID of the user who created this record
  • updated_by (string|null): ID of the user who last updated this record
  • created_date (long): Creation timestamp (Unix epoch seconds)
  • updated_date (long): Last update timestamp (Unix epoch seconds)
  • is_active (boolean): Active status of the record

Note: The registered user object only includes the fields that match the non-registered user structure, not all user master data fields.

Error Response

{
"success": 0,
"error": ["USER_NON_REGISTERED_USER_DATA_NOT_FOUND"],
"data": {}
}

Example Usage

Basic Request (Get All Active Records)

curl --location 'https://api.gafapay.com/gafapay/v3/user/non_registered_user' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b'

Request with Phone Number Filter

curl --location 'https://api.gafapay.com/gafapay/v3/user/non_registered_user?phone_number=9876543210' \
--header 'authorization: Token YOUR_TOKEN_HERE' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID'

Request with Registered User Check

curl --location 'https://api.gafapay.com/gafapay/v3/user/non_registered_user?phone_number=9876543210&dial_code=%2B91&check_registered_user=true' \
--header 'authorization: Token YOUR_TOKEN_HERE' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID'

Note: When using check_registered_user=true, both phone_number and dial_code must be provided. The API will check the user master table for a registered user with the matching phone number and dial code. If found, the registered user details will be included in the response under the registered_user field.