API Endpoints
You can find these endpoints in src/aggregators/plaid/plaid.controller.ts
Get token link.
POST
{{url}}/aggregators/token-link
This endpoint generates a public_token that has a time-to-live of 30 minutes.
Headers
Authorization*
String
Bearer token
{
"statusCode": 201,
"data": {
"link_token": "link-sandbox-0ed4a93e-ba5f-42ca-be0f-7ce8f04cd42d"
}
}
Generate access token and processor token.
POST
{{url}}/aggregators/banking-connection
In this endpoint, send a public_token to generate an access_token so you can get linked account information in Plaid.
Headers
Authorization*
String
Bearer token
Request Body
public_token*
String
third_party_connection
boolean
This parameter is a flag to know if you want to directly connect your account to your BaaS
Get my accounts.
GET
{{url}}/aggregators/my-accounts
This endpoint returns all accounts registered by the user.
Headers
Authorization*
String
Bearer token
{
"statusCode": 200,
"data": {
"accounts": [
{
"baas_account_id": <BassAccountId>,
"account_id": <AccountId>,
"name": "Plaid Saving",
"baas_status": "active"
"subtype": "savings",
"type": "depository",
"mask": "1111,
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
}
]
}
}
For the my-accounts
endpoints, the baasAccountId
and baasStatus
fields are taken from the BaaS the account is connected to. If these fields have a null value, it means that the account has not been connected to any BaaS. But, if there is a baasAccountId, we can take the baas_status as a reference to know if the connection to the BaaS was successful.
Connect account to BaaS.
POST
{{url}}/aggregators/banking-account-connection
This endpoint connects the selected account to the BaaS.
Headers
Authorization*
String
Bearer token
Request Body
account_id*
String
Remove Plaid connection.
DELETE
{{url}}/aggregators/unlink-banking-connection
This endpoint removes the access token generated to make queries in Plaid.
Headers
Authorization*
String
Bearer token
Remove specific account.
DELETE
{{URL}}/aggregators/my-accounts/:id
This endpoint removes the processor token generated to make queries in Plaid.
Path Parameters
id*
Account ID
Headers
Authorization*
String
Bearer token
Last updated
Was this helpful?