Manage customers (groups)
Tango API allows you to manage the customers (groups) on your platform. A group is a collection of accounts to hold funds and place orders. It's the second level under your company's platform. Each platform contains one or more groups. Only one group in your platform may have the same name as the platform. Groups cannot be deleted or disabled once created.
Coming soon
Customers are also known as Groups in Tango. We are planning to update our API endpoints in our V3.0 release to replace Customers with Groups.
Use cases
The following use cases show examples for enterprises and small companies:
- Enterprises: In ABC enterprise, all departments or divisions have their own groups. The manager of each department or division has control over all accounts in their department. They can create multiple accounts for teams, projects, budgets, or anything that needs funds tracked separately. They can also create groups for accounts that require a controlled access; for example, team A has a separate group than team B since the two teams do not need access to each other's account.
- Small Companies: In an small company, groups are set up by:
- Accounts such as Internal programs, sales initiatives, and employee moral.
- Customer programs such as loyalty accounts, or referral accounts.
- Platform customer with sub customers. In platform customers, each customer has their own group; sub customers can have multiple projects or budgets with the platform customer depending on their budget needs.
Get a list of all customers
UseGET {URI}/customers
endpoint to get a list of all customers on this platform. There is no parameters for this endpoint.
Endpoint | Purpose |
---|---|
GET {URI}/customers | Get a list of all customers on this platform. |
The following code shows the response example for when you use GET {URI}/customers\
:
[
{
"customerIdentifier": "string", (5-100 chars)
"displayName": "string",(100 chars)
"status": "string",
"createdAt": "2024-03-11T19:30:55.706Z",
"accounts": [
{
"accountIdentifier": "string", (5-100 chars)
"accountNumber": "string",
"displayName": "string", (100 chars)
"createdAt": "2024-03-11T19:30:55.706Z",
"status": "string",
"currencyCode": "string"
}
]
}
]
The response message for this endpoint is:
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
Create a new customer
Use POST {URI}/customers
endpoint to create a new customer on this platform.
Endpoint | Purpose |
---|---|
POST {URI}/customers | Create a new customer on this platform. |
The following query parameters are used when you usePOST {URI}/customers
to create a new customer on this platform.
Parameter | Data type | Description |
---|---|---|
customerIdentifier | string | A unique identifier for this customer. It must be between 5-100 characters and accepts the following: -0-9a-zA-Z in any sequence. |
displayName | string | A friendly name for this customer. The string may have up to 100 characters. |
The following code shows the response example for when you use POST {URI}/customers
:
{
"customerIdentifier": "string", (5-100 chars)
"displayName": "string", (100 chars)
}
The response message for this endpoint is:
- 201 Created
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
- 409 Conflict, duplicate Exists
Get details for a specific customer
Use GET {URI}/customers/{customerIdentifier}
endpoint to get details for a specific customer on your platform.
Endpoint | Purpose |
---|---|
GET {URI}/customers/{customerIdentifier} | Get details for a specific customer on this platform. |
The following parameter is used when using GET {URI}/customers/{customerIdentifier}
to get details for a specific customer:
Parameter | Data type | Description |
---|---|---|
customerIdentifier | string | A unique identifier for the customer under which you are seeking details. The string must have 5-100 characters. |
The following code shows the response example for when you useGET {URI}/customers/{customerIdentifier}
:
{
"customerIdentifier": "string",
"displayName": "string",
"status": "string",
"createdAt": "2024-03-11T19:30:55.706Z",
"accounts": [
{
"accountIdentifier": "string",
"accountNumber": "string",
"displayName": "string",
"createdAt": "2024-03-11T19:30:55.706Z",
"status": "string",
"currencyCode": "string"
}
]
}
The response message for this endpoint is:
- 200 OK
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
Get a list of all accounts created for a specific customer
Use GET {URI}/customers/{customerIdentifier}/accounts
endpoint to get a list of all accounts created for a specific customer on your platform.
Endpoint | Purpose |
---|---|
GET {URI}/customers/{customerIdentifier}/accounts | Get a list of all accounts created for a specific customer on this platform. |
The following path and query parameters are used when you use GET {URI}/customers/{customerIdentifier}/accounts
to get a list of all accounts created for a specific customer on this platform.
Path parameter | Data type | Description |
---|---|---|
customerIdentifier | string | A unique identifier for the customer under which you are seeking details. The string must have 5-100 characters. |
Query parameter | Data type | Description |
---|---|---|
paginate | boolean | Whether to paginate the results or not. Defaults to false. |
prevCursor | string | The cursor to use for the previous page of results. This will be ignored if paginate is false. |
nextCursor | string | The cursor to use for the next page of results. This will be ignored if paginate is false. |
maxResults | int32 | The maximum number of results to return. The default 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. |
The following example shows the response for when you use GET {URI}/customers/{customerIdentifier}/accounts
:
[
{
"currentBalance": 0,
"contactEmail": "string",
"fundingNotification": [
{
"emailAddress": "string"
}
],
"accountIdentifier": "string",
"accountNumber": "string",
"displayName": "string",
"createdAt": "2024-03-14T16:18:41.061Z",
"status": "string",
"currencyCode": "string"
}
]
The response message for this endpoint is:
- 200 OK
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
Create an account under a specific customer
Use the POST {URI}/customers/{customerIdentifier}/accounts
endpoint to create an account under a specific customer on this platform.
Endpoint | Purpose |
---|---|
POST {URI}/customers/{customerIdentifier}/accounts | Create an account under a specific customer on this platform. |
Here are the list of parameters for when you use POST {URI}/customers/{customerIdentifier}/accounts
to create an account under specific customer on your platform:
Path parameter | Data type | Description |
---|---|---|
customerIdentifier | string | A unique identifier for the customer under which you are creating a new account. The string must have 5-100 characters. |
Body parameter | Data type | Description |
---|---|---|
accountIdentifier | string | A unique identifier for this account. It must be between 5-100 characters and accepts the following: -0-9a-zA-Z in any sequence. |
displayName | string | A friendly name for this account. The string may have up to 100 characters. |
contactEmail | string | An email address for a designated representative for this account. The string may have up to 100 characters. |
currencyCode | string | The currency accepted by this account for deposits/withdraws. Only one currency can be specified. Currency can never be changed. The currency defaults to USD if it's not specified. |
fundingNotification | arrays of object | send funding notification emails to the following addresses. |
The following example shows the response for when you use POST {URI}/customers/{customerIdentifier}/accounts
to create an account under specific customer on your platform. The account identifier must be lowercase:
{
"accountIdentifier": "string", (5-100 chars)
"displayName": "string", (100 chars)
"contactEmail": "string", (100 chars)
"currencyCode": "USD", (3 chars)
"fundingNotification": [
{
"emailAddress": "string"
}
]
}
The response message for this endpoint is:
- 201 Created
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
- 409 Conflict, Duplicate Exist
Update an account under a specific customer
Use the PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier}
endpoint to update an account under a specific customer on this platform.
Endpoint | Purpose |
---|---|
PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier} | Update an account under a specific customer on this platform. |
Here are the list of parameters for when you use PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier}
to update an account under a specific customer on this platform.
Path parameter | Data type | Description |
---|---|---|
customerIdentifier | string | (Required) A unique identifier for the customer under which you are creating a new account. The string must have 5-100 characters. |
accountIdentifier | string | The accountIdentifier for the account you are updating. |
Body parameter | Data type | Description |
---|---|---|
displayName | string | (Optional) A friendly name for this account. |
contactEmail | string | (Optional) An email address for a designated representative for this account. The string may have up to 100 characters. |
fundingNotification | array of objects | (Optional) Send funding notification emails to the following addresses. A provided list replaces the existing list, an empty list clears all existing emails, and a null/omitted value leaves the list unchanged. |
The following example shows the response for when you use PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier}
to update an account under a specific customer on this platform:
{
"currentBalance": 0,
"contactEmail": "string",
"fundingNotification": [
{
"emailAddress": "string"
}
],
"accountIdentifier": "string",
"accountNumber": "string",
"displayName": "string",
"createdAt": "2024-03-14T16:18:41.061Z",
"status": "string",
"currencyCode": "string"
}
The response message for this endpoint is:
- 200 OK
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
Updated 4 months ago