Bond Studio

The Bond Developer Hub

Welcome to the Bond Studio Developer Hub.

Get up and running fast with documentation, guides, and support.

Let's get started!

Get Started    API Reference

Creating a customer resource

The first thing your customer will need to do is submit their details like their name and address in your onboarding flow. After your customer enters this information, you'll see that a CustomerCustomer - One of the Bond Studio Services handling a consumer's personal information. resource has been created. This Customer resource gives you a way to reference and call customer accounts, and to facilitate account management.

To create an instance of a customer object, use the POST /customers/ operation and provide the parameters as shown in the table below.

Parameter

Type

Description

brand_person_id
required

String

Customer ID in UUID format provided by your brand.

dob
required

Date

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

first_name
required

String

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

middle_name

String

Middle name, maximum 20 characters. Must start with a letter and can only be letters, spaces, and apostrophes.

last_name
required

String

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

addresses
At least one primary address required

Array

Array of one or more 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
required

String

Either MAILING or PHYSICAL.

street
required

String

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

street2

String

Freeform name between 3 and 20 characters.

city
required

String

Two-character US city code or non-US city code, maximum 20 characters.

state
required

String

Two-character US state code or non-US state code, maximum 20 characters.

zip_code
required

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
required

String

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

is_primary
required

Boolean

Is this the primary address; either true or false.

An example of a request to create a customer is shown below.

curl --request POST \
  --url https://sandbox.bond.tech/api/v0/customers/ \
  --header 'Identity: YOUR-IDENTITY' \
  --header 'Authorization: YOUR-AUTHORIZATION' \
  --header 'Content-Type: application/json' \
  --data '{
    "brand_person_id": "YOUR-USER-ID",
    "dob":"1999-12-25",
    "last_name":"Smith",
    "first_name":"Christine",
    "addresses":[
      {
        "address_type":"PHYSICAL",
        "street":"345 California Ave.",
        "street2": "Suit 600",
        "city": "San Francisco",
        "state": "CA",
        "zip_code": "12345-1234",
        "country": "US",
        "is_primary": true
      },
      {
        "address_type":"MAILING",
        "street":"101 Lake Tahoe Rd.",
        "street2": "Suit 01",
        "city": "San Francisco",
        "state": "CA",
        "zip_code": "12345",
        "country": "US",
        "is_primary": false
      }
    ]
  }'
import requests

url = "https://sandbox.bond.tech/api/v0/customers/"

payload = {
  "brand_person_id": YOUR-USER-ID,
  "dob": "1999-12-25",
  "first_name": "Christine",
  "last_name": "Smith",
  "addresses": [
    {
      "address_type": "PHYSICAL",
      "street": "345 California Ave.",
      "street2": "Suit 600",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "12345-1234",
      "country": "US",
      "is_primary": True
    },
    {
      "address_type": "MAILING",
      "street": "101 Lake Tahoe Rd.",
      "street2": "Suit 01",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "12345",
      "country": "US",
      "is_primary": False
    }
  ]
}
headers = {
  "Content-Type": "application/json",
  "Identity": YOUR-IDENTITY,
  "Authorization": YOUR-AUTHORIZATION
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0/customers/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Identity"] = YOUR-IDENTITY
request["Authorization"] = YOUR-AUTHORIZATION
request.body = "{\"addresses\":[{\"address_type\":\"PHYSICAL\",\"street\":\"345 California Ave.\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":true,\"street2\":\"Suit 600\"},{\"address_type\":\"MAILING\",\"street\":\"101 Lake Tahoe Rd.\",\"street2\":\"Suit 01\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345\",\"country\":\"US\",\"is_primary\":false}],\"brand_person_id\":YOUR_USER_ID,\"dob\":\"1999-12-25\",\"first_name\":\"Christine\",\"last_name\":\"Smith\"}"

response = http.request(request)
puts response.read_body
const data = JSON.stringify({
  "brand_person_id": YOUR-USER-ID,
  "dob": "1999-12-25",
  "first_name": "Christine",
  "last_name": "Smith",
  "addresses": [
    {
      "address_type": "PHYSICAL",
      "street": "345 California Ave.",
      "street2": "Suit 600",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "12345-1234",
      "country": "US",
      "is_primary": true
    },
    {
      "address_type": "MAILING",
      "street": "101 Lake Tahoe Rd.",
      "street2": "Suit 01",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "12345",
      "country": "US",
      "is_primary": false
    }
  ]
});

const xhr = new XMLHttpRequest();

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

xhr.open("POST", "https://sandbox.bond.tech/api/v0/customers/");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Identity", YOUR-IDENTITY);
xhr.setRequestHeader("Authorization", YOUR-AUTHORIZATION);

xhr.send(data);
var client = new RestClient("https://sandbox.bond.tech/api/v0/customers/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", YOUR-IDENTITY);
request.AddHeader("Authorization", YOUR-AUTHORIZATION);
request.AddParameter("application/json", "{\"addresses\":[{\"address_type\":\"PHYSICAL\",\"street\":\"345 California Ave.\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":true,\"street2\":\"Suit 600\"},{\"address_type\":\"MAILING\",\"street\":\"101 Lake Tahoe Rd.\",\"street2\":\"Suit 01\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345\",\"country\":\"US\",\"is_primary\":false}],\"brand_person_id\":YOUR_USER_ID,\"dob\":\"1999-12-25\",\"first_name\":\"Christine\",\"last_name\":\"Smith\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"addresses\":[{\"address_type\":\"PHYSICAL\",\"street\":\"345 California Ave.\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":true,\"street2\":\"Suit 600\"},{\"address_type\":\"MAILING\",\"street\":\"101 Lake Tahoe Rd.\",\"street2\":\"Suit 01\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345\",\"country\":\"US\",\"is_primary\":false}],\"brand_person_id\":YOUR_USER_ID,\"dob\":\"1999-12-25\",\"first_name\":\"Christine\",\"last_name\":\"Smith\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0/customers/")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Identity", YOUR-IDENTITY)
  .addHeader("Authorization", YOUR-AUTHORIZATION)
  .build();

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

The JSON response contains all the information related to the newly created customer. It also includes the customer_id which is a unique Bond Studio identifier for your customer. The customer_id is used in subsequent API calls to retrieve and update the customer resource, initiate KYC, and issue cards. An example of a response to a successful request to create a customer is shown below.

{
    "customer_id": "f637cca2-c070-453d-b2eb-8c74f8640c7b",
    "brand_person_id": "8dd4e2de-33be-4bb3-9a19-25069033a5e0",
    "bond_brand_id": "fa538529-9396-4f47-b442-4092227b7477",
    "date_created": "2020-10-23T22:18:09.327165",
    "dob": "1999-12-25",
    "first_name": "Christine",
    "middle_name": "",
    "last_name": "Smith",
    "addresses": [
        {
            "address_id": "091c79fe-d197-4720-9f8b-5eb6757b971b",
            "address_type": "PHYSICAL",
            "street": "345 California St.",
            "street2": "STE 600",
            "city": "San Francisco",
            "state": "CA",
            "zip_code": "94104-2657",
            "country": "US",
            "is_primary": true,
            "deliverability": "deliverable",
            "date_created": "2020-10-23T22:18:09.340601"
        },
        {
          "address_id": "ba5572e6-bb16-46a5-a95f-fb8aba019aff",
          "address_type": "MAILING",
          "street": "101 Lake Tahoe Rd.",
          "street2": "Suit 01",
          "city": "San Francisco",
          "state": "CA",
          "zip_code": "12345",
          "country": "US",
          "is_primary": false,
          "deliverability": "undeliverable",
          "date_created": "2020-10-23T22:18:09.340601"
        } 
    ]
}

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

Trying to create a customer with a missing field

If you try to create a customer with a missing field, you receive a JSON error message similar to the one shown below.

400
{
       'Message': {'last_name': ['Missing data for required field.']},
       'Status': 400,
       'Code': 'create_customer_schema',0
       'Type': 'Request Error'
}

Creating a customer using the same brand_person_id

The brand_person_id is a unique number that you use to identify your customer and is one of the fields that must be provided when you create a customer.

Note: This is not the same as the customer_id which is generated by the API and returned to you in the response.

If you try to create a new customer using an existing brand_person_id that belongs to another customer, you receive an error message similar to the one shown below.

400
{
       'Message': 'A person with this ID already exists. Please choose another',
       'Status': 400,
       'Code': 'person_id_dup',
       'Type': 'Request Error'
}

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

Updated 5 days ago



Creating a customer resource


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.