Managing customers

How to retrieve, delete, and update existing customers.

Use the operations shown below to manage customers:

Retrieving customers

Retrieving all customers

To retrieve all customers, use the GET /customers operation and provide the optional query parameters from the table below.

Query parameter

Type

Description

page

int32

The required page number to return.

per_page

int32

Number of customers to return per page. One of: 1, 2, 5, 10, 20, 50

An example of a request to retrieve all customers is shown below.

curl --request GET \
     --url 'https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20' \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHENTICATION' \
     --header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHENTICATION'

response = http.request(request)
puts response.read_body
const options = {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Identity: 'YOUR-IDENTITY',
    Authorization: 'YOUR-AUTHENTICATION'
  }
};

fetch('https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20"

headers = {
    "Accept": "application/json",
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHENTICATION"
}

response = requests.get(url, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHENTICATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHENTICATION")
  .build();

Response response = client.newCall(request).execute();import requests

url = "https://sandbox.bond.tech/api/v0.1/customers?page=1&per_page=20"

headers = {
    "Accept": "application/json",
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHENTICATION"
}

response = requests.get(url, headers=headers)

print(response.text)

An example of a response to a successful request to retrieve all customers is shown below.

[
  {
    "customer_id": "8559dec0-2edb-4c3c-a3c5-32de10174c34",
    "brand_person_id": "7b18da9e-0217-4ecb-8454-8c0ab8bedc14",
    "bond_brand_id": "e2b37ab8-5e6e-4538-bbe0-35121b481845",
    "date_created": "2020-10-26T21:48:57.287919",
    "dob": "1997-12-25",
    "first_name": "James",
    "middle_name": "Herbert",
    "last_name": "Bond",
    "ssn": "XXX-XX-6789",
    "phone": "650-123-4567",
    "email": "[email protected]",
    "kyc_requests_available": 3,
    "addresses": [
      {
        "address_id": "9e8241d2-ac5e-41c6-8b38-b3fe44387266",
        "address_type": "PHYSICAL",
        "street": "345 California St.",
        "street2": "Suite 600",
        "city": "San Francisco",
        "state": "CA",
        "zip_code": "94104-2657",
        "country": "US",
        "is_primary": true,
        "deliverability": "deliverable",
        "date_created": "2020-10-26T21:48:57.287919"
      },
      {
        "address_id": "242c459e-6bd5-4158-89ee-550f0bdd133d",
        "address_type": "MAILING",
        "street": "111 Lake Tahoe Rd.",
        "street2": "",
        "city": "San Francisco",
        "state": "CA",
        "zip_code": "12345",
        "country": "US",
        "is_primary": false,
        "deliverability": "undeliverable",
        "date_created": "2020-10-26T21:48:57.287919"
      }
    ]
  },
  {
    "customer_id": "3cf29100-4396-4c90-b4b0-6edfeca0ee3f",
    "brand_person_id": "1ea85e01-c35f-4675-9f74-e39fa877bc53",
    "bond_brand_id": "e2b37ab8-5e6e-4538-bbe0-35121b481845",
    "date_created": "2020-10-27T22:48:57.287919",
    "dob": "1997-12-25",
    "first_name": "Christine",
    "middle_name": "J",
    "last_name": "Smith",
    "ssn": "XXX-XX-6789",
    "phone": "650-124-4567",
    "email": "[email protected]",
    "addresses": [
      {
        "address_id": "acf383d1-8510-47ed-ad28-0ca72f33bc33",
        "address_type": "PHYSICAL",
        "street": "345 California St.",
        "street2": "",
        "city": "San Francisco",
        "state": "CA",
        "zip_code": "94104-2657",
        "country": "US",
        "is_primary": true,
        "deliverability": "deliverable_missing_unit",
        "date_created": "2020-10-27T22:48:57.287919"
      },
      {
        "address_id": "47dc4547-b306-4f49-94c4-4ad89cbb9dac",
        "address_type": "MAILING",
        "street": "111 Lake Tahoe Rd.",
        "street2": "",
        "city": "San Francisco",
        "state": "CA",
        "zip_code": "12345",
        "country": "US",
        "is_primary": false,
        "deliverability": "undeliverable",
        "date_created": "2020-10-27T22:48:57.287919"
      }
    ]
  }
]

Retrieving a single customer

To retrieve a single customer, use the GET /customers/{customer_id} operation with no other parameters, as shown in the example below.

curl --request GET \
     --url https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14 \
     --header 'Authorization: YOUR-AUTHORIZATION' \
     --header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'

response = http.request(request)
puts response.read_body
const options = {
  method: 'GET',
  headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'}
};

fetch('https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14"

headers = {
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14");
var request = new RestRequest(Method.GET);
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14")
  .get()
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();

An example of a response to a successful request to retrieve a customer is shown below.

{
  "customer_id": "8559dec0-2edb-4c3c-a3c5-32de10174c34",
  "brand_person_id": "7b18da9e-0217-4ecb-8454-8c0ab8bedc14",
  "bond_brand_id": "e2b37ab8-5e6e-4538-bbe0-35121b481845",
  "date_created": "2020-10-26T21:48:57.287919",
  "dob": "1997-12-25",
  "first_name": "James",
  "middle_name": "Herbert",
  "last_name": "Bond",
  "ssn": "XXX-XX-6789",
  "phone": "650-123-4567",
  "email": "[email protected]",
  "kyc_requests_available": 3,
  "addresses": [
    {
      "address_id": "9e8241d2-ac5e-41c6-8b38-b3fe44387266",
      "address_type": "PHYSICAL",
      "street": "345 California St.",
      "street2": "Suite 600",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "94104-2657",
      "country": "US",
      "is_primary": true,
      "deliverability": "deliverable",
      "date_created": "2020-10-26T21:48:57.287919"
    },
    {
      "address_id": "242c459e-6bd5-4158-89ee-550f0bdd133d",
      "address_type": "MAILING",
      "street": "111 Lake Tahoe Rd.",
      "street2": "",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "12345",
      "country": "US",
      "is_primary": false,
      "deliverability": "undeliverable",
      "date_created": "2020-10-26T21:48:57.287919"
    }
  ]
}

For a complete specification and interactive examples, see Retrieving customers and Retrieving a single customer in the Bond API Reference.

Deleting a customer

To delete a customer, use the DELETE /customers/{customer_id} operation with no other parameters, as shown in the example below.

curl --request DELETE \
     --url https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14 \
     --header 'Authorization: YOUR-AUTHORIZATION' \
     --header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'

response = http.request(request)
puts response.read_body
const options = {
  method: 'DELETE',
  headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'}
};

fetch('https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14"

headers = {
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/customers/931e2341-c3eb-4681-97d4-f6e09d90da14")
  .delete(null)
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();

If the request is successful, you receive the following response:
Customer resource deleted

For a complete specification and interactive examples, see Deleting a customer in the Bond API Reference.

Updating a customer

Most customer details can't be updated after they've passed KYC (which is a part of a successful credit application submission) as the new information needs to be verified before the update can occur.

📘

Note

Only email_address, phone_number, and any secondary addresses can be updated after a customer has passed KYC.

Other fields require additional information to be confirmed. If you need to update information for a customer that has passed KYC, contact Bond directly.

To update a customer that has not yet passed KYC, use the PATCH /customers/{customer_id} operation and provide the relevant, optional parameters that you want to update, as shown in the table below.

Parameter

Type

Description

dob

date

Birthday in YYYY-MM-DD format, for example 1994-03-20.

first_name

string

First name, between 2 and 50 characters. Must start with a letter and can only be letters, spaces, and apostrophes.

middle_name

string

Middle name, between 2 and 50 characters. Must start with a letter and can only be letters, spaces, and apostrophes.

last_name

string

Last name, between 2 and 50 characters. Must start with a letter and can only be letters, spaces, and apostrophes.

ssn

string

Unique Social Security Number associated with the customer

phone

string

User's phone number. Must be only numbers or dash-separated.

phone_country_code

string

Country dialing code. Between one and three digits.

email

string

User's valid email address, for example [email protected]

addresses
At least one primary address required

array

Array of object(s) detailing the physical or mailing addresses (see address Object table below).

The addresses array within customer_id has the following structure.

address Object

Type

Description

address_type

string

Either MAILING or PHYSICAL.

street

string

Freeform name between 1 and 40 characters. May contain only alphanumeric and these special characters . , _ - #

street2

string

Freeform name maximum 40 characters.

city

string

Freeform name between 2 and 40 characters.

state

string

Two-character US state code. Non-US state code, maximum 20 characters.

zip_code

string

Five-digit US zip code, (for example 12345) or nine-digit US zip code, (for example 12345-1234).
Non-US state code between 2 and 20 characters.

country

string

ISO 3166-1 alpha-2 country code, maximum two characters.

is_primary

boolean

Is this the primary address; either true or false.

An example of a request to update a customer's state is shown below.

curl --request PATCH \
     --url https://sandbox.bond.tech/api/v0.1/customers/5fec3f30-dc2e-4b20-9e07-53c31400bbe3 \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHENTICATION' \
     --header 'Content-Type: application/json' \
     --header 'Identity: YOUR-IDENTITY' \
     --data '
{
     "addresses": [
          {
               "address_type": "PHYSICAL",
               "street": "345 California Ave.",
               "street2": "Suite 600",
               "city": "San Francisco",
               "state": "CA",
               "zip_code": "12345-1234",
               "country": "US",
               "is_primary": true
          }
     ],
     "dob": "1997-12-25",
     "first_name": "James",
     "last_name": "Bond",
     "middle_name": "Herbert",
     "ssn": "XXX-XX-9999",
     "phone": "555-111-2222",
     "phone_country_code": "1",
     "email": "[email protected]"
}
'

An example of a response to a successful request to update a customer is shown below.

{
       "customer_id":"931e2341-c3eb-4681-97d4-f6e09d90da14",
       "bond_brand_id":"e0cb152c-51dc-44b0-af3c-5c68341068da",
       "brand_person_id":"8dd4e2de-33be-4bb3-9a19-25069033a5e2",
       "date_created":"2021-02-11T13:26:50.553841+00:00"
       "dob":"1961-03-03",
       "first_name":"sam",
       "middle_name":"amazed",
       "last_name":"McKorkindale",
       "kyc_requests_available":3,
       "addresses":[...]
}

For a complete specification and interactive examples, see Updating a customer in the Bond API Reference.


Did this page help you?