Customer APIs
Create Business Wallet Customer
| Verb | POST |
| URL | https://api.s.unit.sh/customers |
| Required Scope | customers-write |
| Data Type | businessWalletCustomer |
| Timeout (Seconds) | 5 |
Attributes
curl -X POST 'https://api.s.unit.sh/customers'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "businessWalletCustomer",
"attributes": {
"bankName": "myBankName",
"businessName": "Sirius & Snape Inc.",
"address": {
"street": "5230 Newell Rd",
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
},
"ein": "123456789",
"businessVertical": "TechnologyMediaOrTelecom",
"numberOfEmployees": "Between10And50",
"tags": {
"purpose": "Sirius & Snape Inc."
},
"idempotencyKey": "3a1a33be-4e12-4603-9ed0-820922389fb8"
}
}
}'
Response
Response is a JSON:API document.
201 Created
{
"data": {
"type": "businessWalletCustomer",
"id": "42",
"attributes": {
"bankName": "myBankName",
"businessName": "Sirius & Snape Inc.",
"address": {
"street": "5230 Newell Rd",
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
},
"ein": "123456789",
"businessVertical": "TechnologyMediaOrTelecom",
"numberOfEmployees": "Between10And50",
"tags": {
"purpose": "Sirius & Snape Inc."
},
"idempotencyKey": "3a1a33be-4e12-4603-9ed0-820922389fb8"
}
}
}
Update Individual Customer
Update an IndividualCustomer. The Customer Updated webhook event will be fired.
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.
| Verb | PATCH |
| URL | https://api.s.unit.sh/customers/:customerId |
| Required Scope | customers-write or customer-tags-write |
| Data Type | individualCustomer |
| Timeout (Seconds) | 5 |
Attributes
To modify or add specify the new email address.
To modify or add specify the new dba name.
Response
Response is a JSON:API document.
200 OK
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"
},
"canConnectWithAuthVendor": true
}
]
}
}
}'
Update Business Customer
Update a BusinessCustomer. The Customer Updated webhook event will be fired.
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.
| Verb | PATCH |
| URL | https://api.s.unit.sh/customers/:customerId |
| Required Scope | customers-write or customer-tags-write |
| Data Type | businessCustomer |
| Timeout (Seconds) | 5 |
Attributes
Response
Response is a JSON:API document.
200 OK
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"
},
"canConnectWithAuthVendor": true
}
]
}
}
}'
Update Trust Customer
Update a TrustCustomer. The Customer Updated webhook event will be fired.
| Verb | PATCH |
| URL | https://api.s.unit.sh/customers/:customerId |
| Required Scope | customers-write or customer-tags-write |
| Data Type | trustCustomer |
| Timeout (Seconds) | 5 |
Attributes
Response
Response is a JSON:API document.
200 OK
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": "trustCustomer",
"attributes": {
"contact": {
"fullName": {
"first": "Jone",
"last": "Doe"
},
"email": "jone.doe@unit-finance.com",
"phone": {
"countryCode": "1",
"number": "2025550108"
},
"address": {
"street": "5231 Newell Rd",
"street2": null,
"city": "Palo Alto",
"state": "CA",
"postalCode": "94301",
"country": "US"
}
},
"authorizedUsers": [
{
"fullName": {
"first": "Jared",
"last": "Dunn"
},
"email": "jared@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "1555555590"
},
"canConnectWithAuthVendor": true
}
]
}
}
}'
Archive Customer
Archive a customer. The Customer Archived webhook event will be fired.
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
| Verb | POST |
| URL | https://api.s.unit.sh/customers/:customerId/archive |
| Required Scope | customers-write |
| Data Type | customerArchive |
| Timeout (Seconds) | 5 |
Attributes
Inactive, FraudACHActivity, FraudCardActivity, FraudCheckActivity, FraudApplicationHistory, FraudAccountActivity, FraudClientIdentified, FraudLinkedToFraudulentCustomer, ByBank. This list is subject to change.Response
Response is a JSON:API document.
200 OK
type field.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"
}
}
}'
Get by Id
Get a customer resource by id.
| Verb | GET |
| URL | https://api.s.unit.sh/customers/{id} |
| Required Scope | customers |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| include | string | (empty) | Optional. A comma-separated list of related resources to include in the response. Related resource include: authorizedUser. See Getting Related Resources |
Response
Response is a JSON:API document.
200 OK
type field.curl -X GET 'https://api.s.unit.sh/customers/8' \
-H "Authorization: Bearer ${TOKEN}"
List
List customer resources. Paging can be applied.
| Verb | GET |
| URL | https://api.s.unit.sh/customers |
| Required Scope | customers |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page[limit] | integer | 100 | Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
| page[offset] | integer | 0 | Optional. 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 |
| sort | string | sort=-createdAt | Optional. 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
type field.{
"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
}
}
}