Skip to main content

APIs

List

List statement resources. Filtering and paging can be applied.

VerbGET
URLhttps://api.s.unit.sh/statements
Required Scopestatements
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[accountId]string(empty)Optional. Filters the results by the specified account id.
filter[accountIds][]string(empty)Optional. Filters the results by the specified account ids. Usage example: filter[accountIds][0]=10000&filter[accountIds][1]=10001
filter[customerId]string(empty)Optional. Filters the results by the specified customer id.
filter[period]ISO8601 Date string(empty)Optional. Filters the results for a specific month. e.g. 2021-01
sortstringsort=periodOptional. Leave empty or provide sort=period for ascending order. Provide sort=-period (leading minus sign) for descending order.
curl -X GET 'https://api.s.unit.sh/statements?page[limit]=20&page[offset]=10' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

data
Array of Statement
Array of statement resources.
Example Response:
{
"data": [
{
"type": "statement",
"id": "1",
"attributes": {
"period": "2020-07"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "1000"
}
},
"customer": {
"data": {
"type": "customer",
"id": "1"
}
}
}
},
{
"type": "statement",
"id": "2",
"attributes": {
"period": "2020-08"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "1000"
}
},
"customer": {
"data": {
"type": "customer",
"id": "1"
}
}
}
}
]
}

Get HTML by Id

Get a statement HTML output by id.

VerbGET
URLhttps://api.s.unit.sh/statements/{id}/html
Required Scopestatements
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
filter[customerId]string(empty)Optional. Verify that the statements belongs to the customer.
language"en" or "es""en"Optional. Select the statement language. en - English, es - Spanish

Response

Response is a HTML document.

curl -X GET 'https://api.s.unit.sh/statements/1/html' \
-H "Authorization: Bearer ${TOKEN}"

Get PDF by Id

Get a statement PDF output by id.

VerbGET
URLhttps://api.s.unit.sh/statements/{id}/pdf
Required Scopestatements
Timeout (Seconds)240

Query Parameters

NameTypeDefaultDescription
filter[customerId]string(empty)Optional. Verify that the statements belongs to the customer.
language"en" or "es""en"Optional. Select the statement language. en - English, es - Spanish

Response

Response is a PDF document.

curl -X GET 'https://api.s.unit.sh/statements/1/pdf' \
-H "Authorization: Bearer ${TOKEN}"

Get Bank verification PDF

Customers may be required, for various reasons, to provide proof that they hold a bank account with a certain financial institution. This is typically provided by the bank in a letter called "Bank verification letter", which includes the customer, account and financial institution information. If the customer is required to prove availability of funds, the letter may also include the available balance on the account.

The API returns a white-label bank verification letter. The white label configuration including the logo, representative name, email, and phone is done through the Unit Dashboard settings. Verification letters can be accessed immediately after an account is approved.

Note

Logo, representative name, email, and phone number in Org Settings > Branding are all required fields to generate a bank verification PDF.

Note

Unit supports all font types but recommends using *.WOFF for best results

Bank Verification Letter Example
VerbGET
URLhttps://api.s.unit.sh/statements/{accountId}/bank/pdf
Required Scopestatements
Timeout (Seconds)180

Query Parameters

NameTypeDefaultDescription
includeProofOfFundsbooleanfalseOptional. include customer proof of funds

Response

Response is a PDF document.

curl -X GET 'https://api.s.unit.sh/statements/1/bank/pdf' \
-H "Authorization: Bearer ${TOKEN}"