Customers
Customers are a unique object that represents a person or entity that has access to one or more Accounts. It is important to note that customers and accounts are a many to many relationship, and any given customer may have access to very many, one, or no accounts.
Properties
- Name
accounts
- Type
- [string]
- Description
An array of identifiers that denote what accounts are associated with a customer.
- Name
socialSecurityNumber
- Type
- string
- Description
The social security number of the customer. It is important to note that this is a unique identifier and must be treated with caution.
- Name
dateOfBirth
- Type
- string
- Description
The legal date of birth of the customer.
- Name
documentLocatorNumber
- Type
- integer
- Description
The document locator number for the customer, generally used for tax purposes.
- Name
preferredName
- Type
- string
- Description
The preferred name of the customer.
- Name
firstName
- Type
- string
- Description
The legal first name of the customer.
- Name
middleName
- Type
- string
- Description
The legal middle name of the customer.
- Name
lastName
- Type
- string
- Description
The legal last name of the customer.
- Name
emails
- Type
- [string]
- Description
The email addresses associated with the customer.
- Name
phoneNumbers
- Type
- [phone]
- Description
The phone numbers associated with the customer.
- Name
addresses
- Type
- [address]
- Description
The address objects associated with the customer.
Create A New Customer
This endpoint allows you to create a new customer. A new customer will have no account IDs associated with their customer ID, and no restrictions. The customer ID is a unique identifier for the customer and will be returned from the call. It is important to note that the customer ID may differ across digital banking platforms, and it is important to store this value for future reference. See the Accounts documentation for more information on how to associate accounts with a customer.
Required Parameters
- Name
socialSecurityNumber
- Type
- string
- Description
The social security number of the customer. It is important to note that this is a unique identifier and must be treated with caution.
- Name
dateOfBirth
- Type
- string
- Description
The legal date of birth of the customer.
- Name
documentLocatorNumber
- Type
- integer
- Description
The document locator number for the customer, generally used for tax purposes.
- Name
preferredName
- Type
- string
- Description
The preferred name of the customer.
- Name
firstName
- Type
- string
- Description
The legal first name of the customer.
- Name
middleName
- Type
- string
- Description
The legal middle name of the customer.
- Name
lastName
- Type
- string
- Description
The legal last name of the customer.
- Name
emails
- Type
- [string]
- Description
The email addresses associated with the customer.
- Name
phoneNumbers
- Type
- [phone]
- Description
The phone numbers associated with the customer.
- Name
addresses
- Type
- [address]
- Description
The address objects associated with the customer.
Request
curl -G https://api.sonderlabs.io/sandbox/customer \
-H "Authorization: Bearer {token}" \
-d "socialSecurityNumber": "123-45-6789" \
-d "dateOfBirth": "1990-01-01" \
-d "documentLocatorNumber": 123456789 \
-d "preferredName": "Sarah" \
-d "firstName": "Sarah" \
-d "middleName": "Jane" \
-d "lastName": "Smith" \
-d "emails": "["sarah@sonderlabs.io"]" \
-d "phoneNumbers": "[{"type": "MOBILE", "number": "555-555-5555"}]" \
-d "addresses": "[{"type": "HOME", "street": "123 Main St", "city": "Anytown", "state": "NY", "zip": "12345"}]"
Response
{
"data": {
"customerId": "SU18VxiTglfSSSEIbbV3MJRmBZm1VVds"
},
"success": true,
"error": null,
"requestId": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003",
"log_ref_id": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003"
}
Retrieve A Customer
This endpoint allows you to get a customer. A customer may or may not have account IDs associated with their customer ID, and may or may not have restrictions. The customer ID is a query parameter and is a unique identifier for the customer. The documentLocatorNumber and socialSecurityNumber are not returned in the response for security reasons. If you need to access these values, you must store them securely on your end.
Request
curl -G https://api.sonderlabs.io/sandbox/customer/SU18VxiTglfSSSEIbbV3MJRmBZm1VVds \
-H "Authorization: Bearer {token}" \
Response
{
"data" {
"customerId": "SU18VxiTglfSSSEIbbV3MJRmBZm1VVds",
"accountIds": ["aub36832", "wlf47906"],
"addresses": [
{
"type": "HOME",
"street": "123 Main St",
"city": "Anytown",
"state": "NY",
"zip": "12345"
}
],
"dateOfBirth": "1990-01-01",
"emails": ["sara@sonderlabs.io"],
"firstName": "Sarah",
"lastName": "Smith",
"middleName": "Jane",
"phoneNumbers": [
{
"type": "MOBILE",
"number": "555-555-5555"
}
],
"preferredName": "Sarah",
},
"success": true,
"error": null,
"requestId": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003",
"log_ref_id": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003"
}
Update A Customer
This endpoint allows you to update a customer. The socialSecurityNumber, dateOfBirth, firstName, middleName, lastName, and documentLocatorNumber cannot be updated. Only pass in the parameters that you wish to update. There is no batch update endpoint for customers, and each customer must be updated individually.
Required Parameters
- Name
customerId
- Type
- string
- Description
The unique identifier for the customer.
Optional Parameters
- Name
documentLocatorNumber
- Type
- integer
- Description
The document locator number for the customer, generally used for tax purposes.
- Name
preferredName
- Type
- string
- Description
The preferred name of the customer.
- Name
emails
- Type
- [string]
- Description
The email addresses associated with the customer.
- Name
phoneNumbers
- Type
- [phone]
- Description
The phone numbers associated with the customer.
- Name
addresses
- Type
- [address]
- Description
The address objects associated with the customer.
Request
curl -G https://api.sonderlabs.io/sandbox/customer/SU18VxiTglfSSSEIbbV3MJRmBZm1VVds \
-H "Authorization: Bearer {token}" \
-d chosen_name="John"
Response
{
"data": {
"customerId": "SU18VxiTglfSSSEIbbV3MJRmBZm1VVds",
"accountIds": ["aub36832", "wlf47906"],
"addresses": [
{
"type": "HOME",
"street": "123 Main St",
"city": "Anytown",
"state": "NY",
"zip": "12345"
}
],
"dateOfBirth": "1990-01-01",
"emails": ["sarah@sonderlabs.io"],
"firstName": "Sarah",
"lastName": "Smith",
"middleName": "Jane",
"phoneNumbers": [
{
"type": "MOBILE",
"number": "555-555-5555"
}
],
"preferredName": "John",
},
"success": true,
"error": null,
"requestId": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003",
"log_ref_id": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003"
}
Delete A Customer
This endpoint allows you to delete a customer. All associated accounts must first be deleted before a customer may be deleted. This action is irreversible.
Request
curl -G https://api.sonderlabs.io/sandbox/customer/SU18VxiTglfSSSEIbbV3MJRmBZm1VVds \
-H "Authorization: Bearer {token}"
Response
{
"data": {},
"success": true,
"error": null,
"requestId": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003",
"log_ref_id": "f7b1b1b0-0b1b-11ec-9a03-0242ac130003"
}