Example requests for additional banking data
Example proxy requests to the Plaid and TrueLayer APIs
Use the following examples to help you make requests to Plaid or TrueLayer endpoints through the proxy.
Example request to Plaid
All requests to the Plaid API use POST; the actual method is defined as a path parameter. This example shows a proxy request to the /item/get
endpoint in the Plaid API.
POST /companies/{companyId}/connections/{connectionId}/data/proxy?endpoint=item/get
companyId
: The ID of a company for which you are authorized to access banking data through the Plaid integration.connectionId
: Connection ID of a linked data connection for the specified company.
If successful, a list of Plaid items associated with the connection is returned.
Example request to TrueLayer
This example shows a proxy request to the /direct-debits
endpoint in the TrueLayer Data API.
- Get an account ID from the Bank accounts endpoint in the Codat API:
GET /companies/{companyId}/connections/{connectionId}/data/bankAccounts
companyId
: The ID of a company for which you are authorized to access banking data through the TrueLayer integration.connectionId
: Connection ID of a linked data connection for the specified company.
- Make a GET request to the
/direct_debits
endpoint in the TrueLayer API:
GET /companies/{companyId}/connections/{connectionId}/data/proxy?endpoint=accounts/{account_id}/direct_debits
account_id
: The ID of the account in TrueLayer to retrieve direct debits for.
If successful, a list of direct debits associated with the account is returned.
Errors returned through the proxy from the Plaid or TrueLayer API always contain a canBeRetried: “Unknown”
parameter in the response. This parameter can be ignored.