API Method: GET /search/clients/
GET /search/clients/
Description:
This endpoint allows users to search for clients within the banking application using either an email address or phone number. It retrieves information about the client, including their personal details and associated financial accounts. This is useful for internal purposes, such as identifying clients for account management, customer service, or initiating transactions with specific clients.
Request:
- HTTP Method:
GET
- Endpoint:
/search/clients/
- Authentication: Requires authentication (e.g., Bearer token or session ID) to ensure that only authorized users can perform client searches and access sensitive client information.
Query Parameters:
-
email
(string
, optional): The email address of the client being searched. -
phoneNumber
(string
, optional): The phone number of the client being searched.Note: At least one of the query parameters (
email
orphoneNumber
) must be provided in the request.
Example Query Parameters:
/search/clients?whatsLookingFor=123
Request Headers:
Authorization
:Bearer <token>
(required) — The token used to authenticate the request.
Response:
- Status Code:
200 OK
— On success, the API returns information about the client and their financial account details. - Content-Type:
application/json
Possible Errors:
400 Bad Request
: The request is missing required query parameters (email or phone number).401 Unauthorized
: The request was made without proper authentication or with an invalid token.403 Forbidden
: The user does not have permission to search for clients.404 Not Found
: No client found with the provided email or phone number.500 Internal Server Error
: An error occurred on the server while processing the request.
This request allows the user to search for a client by email or phone number and returns the client's personal details and associated financial account information.