Skip to main content

Customers

Customers represent individuals or businesses that you may create financial products for.

You cannot create customer resources directly — they are automatically created once an application is approved.

A customer can either BusinessCustomer or IndividualCustomer.

info

We recommend listening to webhooks to be notified when a customer is created. Once you get notified, you may interact immediately with the customer resource to create financial products for them (e.g. deposit accounts).

Authorized Users

Authorized Users represent individuals that have full access to the Customer's financials - they are able to authenticate and create a Customer Token and initiate any activity on behalf of the customer. This feature is used mostly in Business customers and Sole Proprietors, where the customer is a Business that can have multiple individuals managing its financials.

note

For Individual customers, Authorized users should not be used, except for very specific use cases. Please consult Unit if you plan to use this feature for individuals.

Update Individual Customer

Update an IndividualCustomer. The Customer Updated webhook event will be fired.

note

Changes to a customer's name, date of birth and SSN require the discretion of a compliance officer and therefore cannot be changed using this endpoint. To change any of these, please contact Unit support with the change details and required documents (if there are any) and our compliance team will process the request for you.

VerbPATCH
Urlhttps://api.s.unit.sh/customers/:customerId
Required Scopecustomers-write or customer-tags-write
Data TypeindividualCustomer
Timeout (Seconds)5

Attributes

NameTypeDescription
addressAddressOptional. Address of the individual.
To modify or add specify the new address.
phonePhoneOptional. Phone of the individual.
To modify or add specify the new phone number.
emailstringOptional. Email address of the individual.
To modify or add specify the new email address.
dbastringOptional. If the individual is a sole proprietor who is doing business under a different name.
To modify or add specify the new dba name.
authorizedUsersOptional. Array of AuthorizedUserArray of authorized users. The provided array items will replace the existing ones.
tagsobjectOptional. See Updating Tags.
jwtSubjectstringOptional. See this section for more information.

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataIndividualCustomerCustomer resource.
Update an individual customer:
curl -X PATCH 'https://api.s.unit.sh/customers/:customerId'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "individualCustomer",
"attributes": {
"address": {
"street": "5231 Newell Rd",
"street2": null,
"city": "Palo Alto",
"state": "CA",
"postalCode": "94301",
"country": "US"
},
"email": "richard@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "5555555555"
},
"authorizedUsers": [
{
"fullName": {
"first": "Jared",
"last": "Dunn"
},
"email": "jared@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "1555555590"
}
}
]
}
}
}'

Update Business Customer

Update a BusinessCustomer. The Customer Updated webhook event will be fired.

note

Changes to a customer's name, date of birth and SSN require the discretion of a compliance officer and therefore cannot be changed using this endpoint. To change any of these, please contact Unit support with the change details and required documents (if there are any) and our compliance team will process the request for you.

VerbPATCH
Urlhttps://api.s.unit.sh/customers/:customerId
Required Scopecustomers-write or customer-tags-write
Data TypebusinessCustomer
Timeout (Seconds)5

Attributes

NameTypeDescription
addressAddressOptional. Address of the business.
To modify specify the new address.
phonePhoneOptional. Phone of the business.
To modify specify the new phone number.
contactBusinessContactOptional. Primary contact of the business.
authorizedUsersOptional. Array of AuthorizedUserArray of authorized users. The provided array items will replace the existing ones.
dbastringOptional. To modify or add specify the new dba name.
tagsobjectOptional. See Updating Tags.

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataBusinessCustomerCustomer resource.
Update business customer:
curl -X PATCH 'https://api.s.unit.sh/customers/:customerId'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "businessCustomer",
"attributes": {
"address": {
"street": "5231 Newell Rd",
"street2": null,
"city": "Palo Alto",
"state": "CA",
"postalCode": "94301",
"country": "US"
},
"phone": {
"countryCode": "1",
"number": "5555555555"
},
"contact": {
"fullName": {
"first": "Jone",
"last": "Doe"
},
"email": "jone.doe@unit-finance.com",
"phone": {
"countryCode": "1",
"number": "2025550108"
}
},
"authorizedUsers": [
{
"fullName": {
"first": "Jared",
"last": "Dunn"
},
"email": "jared@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "1555555590"
}
}
]
}
}
}'

Get by Id

Get a customer resource by id.

VerbGET
Urlhttps://api.s.unit.sh/customers/{id}
Required Scopecustomers
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataBusinessCustomer or IndividualCustomerCustomer resource. Can be either business or individual, as indicated by the type field.
curl -X GET 'https://api.s.unit.sh/customers/8' \
-H "Authorization: Bearer ${TOKEN}"

List

List customer resources. Paging can be applied.

VerbGET
Urlhttps://api.s.unit.sh/customers
Required Scopecustomers
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
filter[query]string(empty)Optional. Search term according to the Full-Text Search Rules.
filter[email]string(empty)Optional. Filter customers by email address (case sensitive).
filter[tags]Tags (JSON)(empty)Optional. Filter Customers by Tags.
filter[status][]string(empty)Optional. Filter customers by status (Active, Archived). Usage example: *filter[status][0]=Active
sortstringsort=-createdAtOptional. sort=createdAt for ascending order or sort=-createdAt (leading minus sign) for descending order.
curl -X GET 'https://api.s.unit.sh/customers?page[limit]=20&page[offset]=10' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataArray of BusinessCustomer or IndividualCustomerArray of customer resources. Each resource can be either business or individual, as indicated by the type field.
metaJSON object that contains pagination dataPagination data includes offset, limit and total (total items).
Example Response:
{
"data": [
{
"type": "businessCustomer",
"id": "1",
"attributes": {
"createdAt": "2020-05-10T12:28:37.698Z",
"name": "Pied Piper",
"address": {
"street": "5230 Newell Rd",
"street2": null,
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
},
"phone": {
"countryCode": "1",
"number": "1555555566"
},
"stateOfIncorporation": "DE",
"ein": "123456789",
"entityType": "Corporation",
"contact": {
"fullName": {
"first": "Richard",
"last": "Hendricks"
},
"email": "richard@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "1555555566"
}
},
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"application": {
"data": {
"type": "businessApplication",
"id": "1"
}
}
}
},
{
"type": "individualCustomer",
"id": "8",
"attributes": {
"createdAt": "2020-05-12T19:41:04.123Z",
"fullName": {
"first": "Peter",
"last": "Parker"
},
"ssn": "721074426",
"address": {
"street": "20 Ingram St",
"street2": null,
"city": "Forest Hills",
"state": "NY",
"postalCode": "11375",
"country": "US"
},
"dateOfBirth": "2001-08-10",
"email": "peter@oscorp.com",
"phone": {
"countryCode": "1",
"number": "1555555566"
},
"status": "Active"
},
"relationships": {
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"application": {
"data": {
"type": "individualApplication",
"id": "8"
}
}
}
}
],
"meta": {
"pagination": {
"total": 2,
"limit": 100,
"offset": 0
}
}
}

Archive Customer

Archive a customer. The Customer Archived webhook event will be fired.

note

Archiving a Customer is a final action that cannot be undone.
Once a Customer has been archived, they become read-only and no changes can be made to anything associated with that customer.
You may only archive a customer after all their account have been closed.
In the future, if you would like to provide financial services to the same customer, they would have to submit a new Application

VerbPOST
Urlhttps://api.s.unit.sh/customers/:customerId/archive
Required Scopecustomers-write
Data TypecustomerArchive
Timeout (Seconds)5

Attributes

NameTypeDescription
reasonstringThe reason for archiving the customer. One of Inactive, FraudACHActivity, FraudCardActivity, FraudCheckActivity, FraudApplicationHistory, FraudAccountActivity, FraudClientIdentified, FraudLinkedToFraudulentCustomer, ByBank. This list is subject to change.

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataBusinessCustomer or IndividualCustomerCustomer resource. be either business or individual, as indicated by the type field.
Archive Customer:
curl -X POST 'https://api.s.unit.sh/customer/10000/archive'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "archiveCustomer",
"attributes": {
"reason": "FraudCardActivity"
}
}
}'

Add Authorized Users

Add authorized users for a customer. The Customer Update webhook event will be fired.

note

When adding an authorized user with the same Email as an existing authorized users of the customer, the existing authorized user info will be updated according to the info in the request.

VerbPOST
Urlhttps://api.s.unit.sh/customers/:customerId/authorized-users
Required Scopecustomers-write
Data TypeaddAuthorizedUsers
Timeout (Seconds)5

Attributes

NameTypeDescription
authorizedUsersArray of AuthorizedUserArray of authorized users. The provided array items will be added to the existing ones.

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataBusinessCustomer or IndividualCustomerCustomer resource. be either business or individual, as indicated by the type field.
Add Customer Authorized Users:
curl -X POST 'https://api.s.unit.sh/customers/10000/authorized-users'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "addAuthorizedUsers",
"attributes": {
"authorizedUsers": [
{
"fullName": {
"first": "Erlich",
"last": "Backman"
},
"email": "erlich@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "1234567890"
}
}
]
}
}
}'

Remove Authorized Users

Remove existing authorized users from a customer. The Customer Update webhook event will be fired.

note

Authorized users emails are unique, when removing an authorized user it is identified only by its email address

VerbDELETE
Urlhttps://api.s.unit.sh/customers/:customerId/authorized-users
Required Scopecustomers-write
Data TyperemoveAuthorizedUsers
Timeout (Seconds)5

Attributes

NameTypeDescription
authorizedUsersEmailsArray of emails (strings)The list of authorized users emails to remove from the customer.

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataBusinessCustomer or IndividualCustomerCustomer resource. be either business or individual, as indicated by the type field.
Remove Customer Authorized Users:
curl -X DELETE 'https://api.s.unit.sh/customer/10000/authorized-users'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "removeAuthorizedUsers",
"attributes": {
"authorizedUsersEmails": [
"jared@piedpiper.com"
]
}
}
}'