The Customer Search API allows authorized clients to retrieve customer details by providing a Customer ID.
POST /api/customers/search
Base URL: https://banking.finserv.com.ng
This endpoint requires an API key.
| Header | Value |
|---|---|
| x-api-key | Your assigned API key |
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | YOUR_SECURE_API_KEY |
{
"customerId": "CUST123456"
}
{
"firstName": "John",
"lastName": "Doe",
"status": "active",
"branch": "Head Office",
"accountOfficer": "Kolade",
"telephone": "08062425325"
}
{"error": "Customer ID is required"}{"error": "Customer not found"}{"error": "API Key is missing"}{"error": "Invalid API Key"}fetch("https://banking.finserv.com.ng/api/customers/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_SECURE_API_KEY"
},
body: JSON.stringify({
customerId: "CUST123456"
})
})
.then(response => response.json())
.then(data => {
console.log("First Name:", data.firstName);
console.log("Last Name:", data.lastName);
console.log("Status:", data.status);
console.log("Branch:", data.branch);
console.log("Account Officer:", data.accountOfficer);
console.log("Telephone:", data.telephone);
})
.catch(error => console.error("Error:", error));
Set method to POST, URL to https://banking.finserv.com.ng/api/customers/search, add headers, and body as shown above.