The Customer Registration API allows authorized clients to register new customers in the FinServ system.
POST /api/customer
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 |
{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phoneNumber": "+2348012345678",
"address": "12 Marina Street, Lagos"
}
{
"customerId": "CUST123456",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phoneNumber": "+2348012345678",
"address": "12 Marina Street, Lagos",
"status": "registered"
}
{"error": "First name, Last name, Email, and Phone number are required"}{"error": "API Key is missing"}{"error": "Invalid API Key"}fetch("https://banking.finserv.com.ng/api/customer", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_SECURE_API_KEY"
},
body: JSON.stringify({
firstName: "John",
lastName: "Doe",
email: "john.doe@example.com",
phoneNumber: "+2348012345678",
address: "12 Marina Street, Lagos"
})
})
.then(response => response.json())
.then(data => {
console.log("Customer ID:", data.customerId);
console.log("Name:", data.firstName, data.lastName);
console.log("Email:", data.email);
console.log("Phone:", data.phoneNumber);
console.log("Address:", data.address);
console.log("Status:", data.status);
})
.catch(error => console.error("Error:", error));
Set method to POST, URL to https://banking.finserv.com.ng/api/customer, add headers, and body as shown above.