Accounts
Accounts are any depository account objects. These accounts are owned by one or more Customers. It is important to note that customers and accounts are a many to many relationship, and any given customer may have access to very many, one, or no accounts.
Properties
- Name
accountId
- Type
- string
- Description
The unique identifier for the account.
- Name
type
- Type
- string
- Description
The type of account. This is always in all caps and delimited with an underscore.
- Name
name
- Type
- string
- Description
The colloquial name of the account. Commonly used in UIs and digital banking applications.
- Name
amount
- Type
- number
- Description
The amount of value in the account. This can be a debt or credit balance.
- Name
customers
- Type
- [Customer]
- Description
The Customers that are associated with the account. A Customer being associated does not necessarily mean that they have access to the account.
- Name
currency
- Type
- string
- Description
The currency that the account is denominated in. In ISO 4217 format.
- Name
transactions
- Type
- [Transaction]
- Description
The transactions that have been made on the account.
- Name
flags
- Type
- [string]
- Description
The flags that are associated with the account.
Create A New Account
This endpoint allows you to create a new account. All of the account type parameters are required to create a new account. Each account will be initialized with a unique account id. All new accounts must be assigned to a Customer object.
Required Parameters
- Name
associatedCustomerIds
- Type
- [string]
- Description
The customer ids that the account is associated with.
- Name
name
- Type
- string
- Description
The colliquial name of the account.
- Name
currency
- Type
- string
- Description
The currency that the account is denominated in. In ISO 4217 format.
- Name
type
- Type
- string
- Description
The type of the account. This is always in all caps and delimited with an underscore.
Request
curl -G https://api.sonderlabs.io/v1/account \
-H "Authorization: Bearer {token}" \
-d associatedCustomerIds=["whdXMSivHxRsMZ2B7nfOaiMkw5VKBiNN"] \
-d name="Personal Checking" \
-d currency="USD" \
-d type="CHECKING"
Response
{
"data": {
"amount": 0,
"currency": "USD",
"name": "Personal Checking",
"type": "CHECKING",
"accountId": "uvE3CCnqRAXU1WtZel3igMMWJeQjcZ3V",
"customers": ["whdXMSivHxRsMZ2B7nfOaiMkw5VKBiNN"],
"transactions": [],
"flags": []
},
"success": true,
"error": null,
"requestId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N",
"logRefId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N"
}
Retrieve An Account
This endpoint allows you to retrieve an account by its unique account id.
Request
curl -G https://api.sonderlabs.io/sandbox/account/uvE3CCnqRAXU1WtZel3igMMWJeQjcZ3V \
-H "Authorization: Bearer {token}"
Response
{
"data": {
"amount": 0,
"currency": "USD",
"name": "Personal Checking",
"type": "CHECKING",
"accountId": "uvE3CCnqRAXU1WtZel3igMMWJeQjcZ3V",
"customers": ["whdXMSivHxRsMZ2B7nfOaiMkw5VKBiNN"],
"transactions": [],
"flags": []
},
"success": true,
"error": null,
"requestId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N",
"logRefId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N"
}
Update An Account
This endpoint allows you to update an account by its unique account id.
Required Parameters
- Name
name
- Type
- string
- Description
The colliquial name of the account.
- Name
currency
- Type
- string
- Description
The currency that the account is denominated in. In ISO 4217 format.
Request
curl -G https://api.sonderlabs.io/sandbox/account/uvE3CCnqRAXU1WtZel3igMMWJeQjcZ3V \
-H "Authorization: Bearer {token}" \
-d name="Personal Savings" \
-d currency="USD"
Response
{
"data": {
"amount": 0,
"currency": "USD",
"name": "Personal Savings",
"type": "CHECKING",
"accountId": "uvE3CCnqRAXU1WtZel3igMMWJeQjcZ3V",
"customers": ["whdXMSivHxRsMZ2B7nfOaiMkw5VKBiNN"],
"transactions": [],
"flags": []
},
"success": true,
"error": null,
"requestId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N",
"logRefId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N"
}
Delete An Account
This endpoint allows you to delete an account by its unique account id.
Request
curl -G https://api.sonderlabs.io/sandbox/account/uvE3CCnqRAXU1WtZel3igMMWJeQjcZ3V \
-H "Authorization: Bearer {token}"
Response
{
"data": {},
"success": true,
"error": null,
"requestId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N",
"logRefId": "orpPL9VLfcOK7DOuv5W4ZadRAVoDJg9N"
}