User Operations
POST /user
Description: Creates a new user.
Request Body:
{
"email": "[email protected]",
"mobile": "98765432***"
}
Success Response (201 Created):
{
"status": true,
"code": 201,
"message": "user added successfully",
"data": {
"user_id": "46c7dc1e-c229-4f9f-83d6-d64851bedde7",
"user_type": "individual",
"client_id": "e513739a-5231-4538-a818-ea2b8a1a2bc0",
"email": "[email protected]",
"mobile": "98765432***",
"updated_at": "2025-07-11T07:09:17.064Z",
"created_at": "2025-07-11T07:09:17.064Z",
"pid": null,
"tid": null,
"bank_id": null
}
}
GET /user/:userId
Description: Retrieves a specific user’s information by their ID.
Success Response (200 OK):
{
"status": true,
"code": 200,
"message": "User found",
"data": {
"user_id": "e6ee0af8-c1e2-471f-9a51-fb26bd7621c8",
"client_id": "e513739a-5231-4538-a818-ea2b8a1a2bc0",
"pid": null,
"tid": null,
"bank_id": "178621e1-ac93-48dc-9f07-b55b2d5b7746",
"user_type": "individual",
"email": "[email protected]",
"mobile": "9876543211",
"created_at": "2025-07-07T07:14:27.683Z",
"updated_at": "2025-07-07T07:19:45.151Z"
}
}
GET /users?page=“page_number”
Description: Retrieves a paginated list of all users.
Query Parameters:
page
: The page number to retrieve (e.g.,1
).
Success Response (200 OK):
{
"status": true,
"code": 200,
"message": "Users fetched successfully",
"data": {
"total_users": 4,
"page": 1,
"limit": 50,
"users": [
{
"user_id": "81c7d8ff-c87d-4ce8-8e19-a7cbc9ff8a2a",
"client_id": "e513739a-5231-4538-a818-ea2b8a1a2bc0",
"pid": null,
"tid": "14133530-5f54-45a4-bdd5-a643f7703a13",
"bank_id": null,
"user_type": "individual",
"email": "[email protected]",
"mobile": "8888888888",
"created_at": "2025-06-27T07:05:00.459Z",
"updated_at": "2025-07-04T10:26:51.762Z"
},
{
"user_id": "e6ee0af8-c1e2-471f-9a51-fb26bd7621c8",
"client_id": "e513739a-5231-4538-a818-ea2b8a1a2bc0",
"pid": null,
"tid": null,
"bank_id": "178621e1-ac93-48dc-9f07-b55b2d5b7746",
"user_type": "individual",
"email": "[email protected]",
"mobile": "9876543211",
"created_at": "2025-07-07T07:14:27.683Z",
"updated_at": "2025-07-07T07:19:45.151Z"
},
{
"user_id": "62a0ee2c-51e6-4321-9aca-4282d5fad156",
"client_id": "e513739a-5231-4538-a818-ea2b8a1a2bc0",
"pid": null,
"tid": "4fd34ea6-0d6d-4f62-b92c-b2cbf5ec290e",
"bank_id": null,
"user_type": "individual",
"email": "[email protected]",
"mobile": "9876543211",
"created_at": "2025-07-08T07:42:03.769Z",
"updated_at": "2025-07-08T07:45:50.220Z"
},
{
"user_id": "46c7dc1e-c229-4f9f-83d6-d64851bedde7",
"client_id": "e513739a-5231-4538-a818-ea2b8a1a2bc0",
"pid": null,
"tid": null,
"bank_id": null,
"user_type": "individual",
"email": "[email protected]",
"mobile": "9876543211",
"created_at": "2025-07-11T07:09:17.064Z",
"updated_at": "2025-07-11T07:09:17.064Z"
}
]
}
}