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 be 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).

Update Individual Customer#

Update an IndividualCustomer.

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

Attributes#

NameTypeDescription
addressAddressAddress of the individual.
To modify or add specify the new address.
phonePhonePhone of the individual.
To modify or add specify the new phone number.
emailstringEmail address of the individual.
To modify or add specify the new email address.
dbastringIf the individual is a sole proprietor who is doing business under a different name.
To modify or add specify the new dba name.
tagsobjectSee Updating Tags.

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"      }    }  }}'

Update Business Customer#

Update an BusinessCustomer.

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

Attributes#

NameTypeDescription
addressAddressAddress of the business.
To modify specify the new address.
phonePhonePhone of the business.
To modify specify the new phone number.
contactBusinessContactPrimary contact of the business.
authorizedUsersArray of AuthorizedUserArray of authorized users. The provided array items will replace the existing ones.
tagsobjectSee 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

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

Query Parameters#

NameTypeDefaultDescription
page[limit]integer100Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Number 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.
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.
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"          }        }      },      "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"        }      },      "relationships": {        "org": {          "data": {            "type": "org",            "id": "1"          }        },        "application": {          "data": {            "type": "individualApplication",            "id": "8"          }        }      }    }  ]}