Manage accounts
Accounts in a platform contain funds to send rewards to recipients. Accounts are located under groups. Groups (customers) are the second level under a platform. You must have at least one group that cannot be deleted or disabled. Each group (customer) contains one or more accounts.
Use case
Your marketing department in your business currently runs two programs: an employee-incentive program and a customer-referral program. You want to keep the funds separate for each program per your accounting requirement. You create two separate accounts on your platform: one for the employee-incentive program and one for the customer-referral program. Each account contains the funds dedicated to the program. You can get details such as name, account number, account identifier, the status of the account, etc. from the account. Here's how:
Get a list of accounts created
Use the GET {URI}/accounts
endpoint to get a list of accounts created on this platform. To create an account under a specific customer, use POST {URI}/customers/{customerIdentifier}/accounts
. See Create an account under a specific customer for more information.
Function | Purpose |
---|---|
GET {URI}/accounts | Get a list of Accounts created on this Platform. |
Here are the query parameters used with GET {URI}/accounts
to get a list of accounts created on this Platform.
Query parameter | Data type | Description |
---|---|---|
paginate | boolean | Whether to paginate the results or not. Defaults to false. |
prevCursor | string | A provided base64 token that represents the cursor for the previous page of results. Use this token to retrieve the previous set of items. This will be ignored if paginate is false. |
nextCursor | string | A provided base64 token that represents the cursor for the next page of results. Use this token to retrieve the next set of items. This will be ignored if paginate is false. |
maxResults | int32 | The maximum number of results to return. The default value is 10, and the maximum is 200. This will be ignored if paginate is false. |
accountNumber | string | Specify the account number to be queried. |
displayName | string | Specify the account display name to be queried. |
status | string | Specify the status to be queried. |
contactEmail | string | Specify the contact email address to be queried. |
currencyCode | array of strings | Specify the currency code(s) to be queried. |
minBalance | number | Specify the minimum currentBalance to be queried. |
maxBalance | number | Specify the maximum currentBalance to be queried. |
minDateCreatedAt | date-time | Specify the earliest createdAt date to be queried. |
maxDateCreatedAt | date-time | Specify the latest createdAt date to be queried. |
fundingNotificationEmail | array of strings | Specify the funding notification email(s) to be queried. |
See the example response below for when you use GET {URI}/accounts
:
[
{
"currentBalance": 0,
"contactEmail": "string",
"fundingNotification": [
{
"emailAddress": "string"
}
],
"accountIdentifier": "string",
"accountNumber": "string",
"displayName": "string",
"createdAt": "2024-03-13T23:25:59.600Z",
"status": "string",
"currencyCode": "string"
}
]
The response message for this endpoint is:
- 200 OK
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
Check account balance
Tango API allows you to check the account balance at any time with GET {URI}/accounts
, but it does not show the low balance alerts. We recommend building in a balance check and alert system if you anticipate the need to re-fund accounts on a regular basis.
The following example response helps you observe your adjusted balance. Perform a GET {URI}/accounts
call or GET {URI}/accounts{accountName}
call to see the adjusted balance of your account following the order. The paginate boolean in query parameter is set to true for this example.
{
"prevCursor": "string",
"nextCursor": "string",
"prevPageAvailable": boolean,
"nextPageAvailable": boolean,
"maxResults": int32,
"items":
{
"accountIdentifier": "string", (5-100 chars)
"accountNumber": "string", (5-100 chars)
"displayName": "string", (100 chars)
"currencyCode": "string", (3 chars)
"currentBalance": 0,
"createdAt": "2023-05-10T18:40:03.899Z",
"status": "string",
"contactEmail": "string" (255 chars)
}
}
Get details for a specific account
Use GET {URI}/accounts/{accountIdentifier}
endpoint to get details for a specific account under this platform:
Function | Purpose |
---|---|
GET {URI}/accounts/{accountIdentifier} | Get details for a specific account on this Platform. |
The following path parameter is used with GET {URI}/accounts/{accountIdentifier}
to get details for a specific account on this platform.
Parameter | Data type | Description |
---|---|---|
accountIdentifier | string | The accountIdentifier for the Account you are seeking details. The string must have 5-100 characters. |
See the example response below for when you use GET {URI}/accounts/accountIdentifier
to get details for a specific account:
{
"currentBalance": 0,
"contactEmail": "string", (255 chars)
"fundingNotification": [
{
"emailAddress": "string"
}
],
"accountIdentifier": "string", (5-100 chars)
"accountNumber": "string", (5-100 chars)
"displayName": "string", (100 chars)
"createdAt": "2024-03-13T23:25:59.600Z",
"status": "string",
"currencyCode": "string" (3 chars)
}
The response message for this endpoint is:
- 200 OK
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
Updated 6 days ago