FinServ API Documentation - Customer Registration

Customer Registration API

The Customer Registration API allows authorized clients to register new customers in the FinServ system.

Endpoint

POST /api/customer

Base URL: https://banking.finserv.com.ng

Authentication

This endpoint requires an API key.

HeaderValue
x-api-keyYour assigned API key

Request

Headers

KeyValue
Content-Typeapplication/json
x-api-keyYOUR_SECURE_API_KEY

Body (JSON)

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phoneNumber": "+2348012345678",
  "address": "12 Marina Street, Lagos"
}

Response

Success (200 OK)

{
  "customerId": "CUST123456",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phoneNumber": "+2348012345678",
  "address": "12 Marina Street, Lagos",
  "status": "registered"
}

Error Responses

Example Usage

JavaScript (Client Side)

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));

Postman

Set method to POST, URL to https://banking.finserv.com.ng/api/customer, add headers, and body as shown above.

Note: Always use HTTPS to protect sensitive data. Rotate API keys regularly for security.