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.

315

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.

FunctionPurpose
GET {URI}/accountsGet 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 parameterData typeDescription
paginatebooleanWhether to paginate the results or not. Defaults to false.
prevCursorstringA 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.
nextCursorstringA 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.
maxResultsint32The maximum number of results to return. The default value is 10, and the maximum is 200. This will be ignored if paginate is false.
accountNumberstringSpecify the account number to be queried.
displayNamestringSpecify the account display name to be queried.
statusstringSpecify the status to be queried.
contactEmailstringSpecify the contact email address to be queried.
currencyCodearray of stringsSpecify the currency code(s) to be queried.
minBalancenumberSpecify the minimum currentBalance to be queried.
maxBalancenumberSpecify the maximum currentBalance to be queried.
minDateCreatedAtdate-timeSpecify the earliest createdAt date to be queried.
maxDateCreatedAtdate-timeSpecify the latest createdAt date to be queried.
fundingNotificationEmailarray of stringsSpecify 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:

FunctionPurpose
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.

ParameterData typeDescription
accountIdentifierstringThe 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

Rewards as a Service™ and the RaaS® API are provided by Tango Card, Inc. © 2024 Tango Card, Inc.