0

List bank feed account mappings

by
Published Oct 17, 2025

The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). > **For custom builds only** > > Only use this endpoint if you are building your own account management UI.

Script codat Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Codat = {
3
	encodedKey: string
4
}
5
/**
6
 * List bank feed account mappings
7
 * The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts.
8

9
A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).
10

11
> **For custom builds only**
12
> 
13
> Only use this endpoint if you are building your own account management UI.
14
 */
15
export async function main(auth: Codat, companyId: string, connectionId: string) {
16
	const url = new URL(
17
		`https://api.codat.io/companies/${companyId}/connections/${connectionId}/bankFeedAccounts/mapping`
18
	)
19

20
	const response = await fetch(url, {
21
		method: 'GET',
22
		headers: {
23
			Authorization: `Basic ${auth.encodedKey}`
24
		},
25
		body: undefined
26
	})
27
	if (!response.ok) {
28
		const text = await response.text()
29
		throw new Error(`${response.status} ${text}`)
30
	}
31
	return await response.json()
32
}
33