Accounts
Get Account
Get a specific account by its ID.
| Verb | GET |
| URL | https://api.s.unit.sh/ready-to-launch/accounts/:accountId |
| Required Scope | accounts |
| Timeout (Seconds) | 5 |
Example Request:
curl -X GET 'https://api.s.unit.sh/ready-to-launch/accounts/42' \
-H "Authorization: Bearer ${TOKEN}"
Response
Returns account details including routing number, account number, status, and current balance (in cents).
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| id Required | string | Identifier of the account resource. |
| type Required | string | Type of the account resource. Always account. |
| attributes Required | JSON Object | JSON object representing the account data. |
Attributes
| Name | Type | Description |
|---|---|---|
| id Required | string | The unique identifier of the account. |
| routingNumber Required | string | The routing number of the account. |
| accountNumber Required | string | The account number. |
| status Required | string | The status of the account (Open, Frozen, or Closed). |
| balance Required | integer | The current balance in cents. |
| userIds Required | array | List of user IDs associated with this account. |
Example Response:
{
"data": {
"type": "account",
"id": "10004",
"attributes": {
"routingNumber": "812345678",
"accountNumber": "1000000001",
"status": "Open",
"balance": 150000,
"userIds": ["user_12345", "user_67890"]
}
}
}
List Accounts
List deposit accounts.
| Verb | GET |
| URL | https://api.s.unit.sh/ready-to-launch/accounts |
| Required Scope | accounts |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| filter[customerId] | string | (empty) | Filter accounts by customer ID. Required if userId not provided. |
| filter[userId] | string | (empty) | Filter accounts by user ID. Required if customerId not provided. |
| page[limit] | integer | 100 | Optional. Maximum number of resources to return. Maximum is 10000 resources. |
| page[offset] | integer | 0 | Optional. Number of resources to skip. See Pagination. |
Note
At least one of filter[customerId] or filter[userId] must be provided.
Example Request:
curl -X GET 'https://api.s.unit.sh/ready-to-launch/accounts?filter[customerId]=10000' \
-H "Authorization: Bearer ${TOKEN}"
Response
Returns a paginated list of deposit accounts with their details.
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data Required | Array of accounts | Array of account resources. |
Example Response:
{
{
"data": [
{
"type": "account",
"id": "10020",
"attributes": {
"routingNumber": "406735154",
"accountNumber": "864800000014",
"status": "Open",
"balance": 6000,
"userIds": ["user_12345"]
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 100,
"offset": 0
}
}
}