Creating your first customer

In order to create a customer using the API see the following guide.

1. Authenticate

First obtain a bearer token as described [here ](https://docs.nfiniti.co/v1.0/docs/getting-started

2. Prepare your data

Gather the required data from your customer.

First Name
Last Name
Title
Date Of Birth
Customer Number
Address
Email
performKYCCheck

And create a JSON object using the values

{
  "customerType": "NATURAL",
  "nameDetails": {
    "nameId": "string",
    "title": "string",
    "firstName": "string",
    "lastName": "string"
  },
  "number": "string",
  "thumbnail": "string",
  "dateOfBirth": "2017-05-23T23:13:11.911Z",
  "address": {
    "address1": "string",
    "address2": "string",
    "address3": "string",
    "town": "string",
    "postcode": "string"
  },
  "email": "string",
  "performKYCCheck": true
}

3. Send a request

You can then send this JSON object to the relevant end point

var data = JSON.stringify(data);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://client.nfiniti.staging.co/api/Customers/{natural}");

xhr.send(data);

What’s Next

Add a vault