Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qonto.com/llms.txt

Use this file to discover all available pages before exploring further.

@qonto/embed-sdk / organizations

Variable: organizations

const organizations: object
The organizations namespace contains all the functions related to organizations’ operations such as retrieving bank accounts. Client-side only - Uses proxy-based authentication (proxyEndpointDescriptor). For server-side operations with accessToken, import from '@qonto/embed-sdk/server/organizations'.

Type declaration

getBankAccounts()

getBankAccounts: (operationSettings) => Promise<BankAccount[]>
Retrieves the bank accounts for the organization. Client-side only - Uses proxy-based authentication. For server-side operations, import from '@qonto/embed-sdk/server/organizations'.

Parameters

operationSettings
An object with operation-level settings such as proxyEndpointDescriptor (required).
operationSettings
ClientOperationSettings

Returns

Promise<BankAccount[]> A promise that resolves to the bank accounts for the organization.

Throws

InvalidParametersError If proxyEndpointDescriptor is not provided.

Throws

EmbedApiError If the API request fails or returns an error.

Example

const bankAccounts = await getBankAccounts({
  operationSettings: { proxyEndpointDescriptor }
});

getMembership()

getMembership: (params) => Promise<Membership>
Retrieves the membership information for the current user. Client-side only - Uses proxy-based authentication. For server-side operations, import from '@qonto/embed-sdk/server/organizations'.

Parameters

params
(Optional) An object containing:
  • operationSettings: (Optional) An object with operation-level settings such as proxyEndpointDescriptor. If not provided here, the settings previously passed to the initialize function will be used.
operationSettings?
ClientOperationSettings

Returns

Promise<Membership> A promise that resolves to the membership information for the current user.

Throws

InvalidParametersError If proxyEndpointDescriptor is not provided here or via initialize.

Throws

EmbedApiError If the API request fails or returns an error.

Examples

// Using proxyEndpointDescriptor passed to initialize
const membership = await getMembership();
// Passing proxyEndpointDescriptor per-call
const membership = await getMembership({
  operationSettings: { proxyEndpointDescriptor }
});

getOrganization()

getOrganization: (operationSettings) => Promise<Organization>
Retrieves the organization information. Client-side only - Uses proxy-based authentication. For server-side operations, import from '@qonto/embed-sdk/server/organizations'.

Parameters

operationSettings
An object with operation-level settings such as proxyEndpointDescriptor (required).
operationSettings
ClientOperationSettings

Returns

Promise<Organization> A promise that resolves to the organization the current user belongs to.

Throws

InvalidParametersError If proxyEndpointDescriptor is not provided.

Throws

EmbedApiError If the API request fails or returns an error.

Example

const organization = await getOrganization({
  operationSettings: { proxyEndpointDescriptor }
});

Example

import { organizations } from '@qonto/embed-sdk/organizations';

const bankAccounts = await organizations.getBankAccounts({
  operationSettings: { proxyEndpointDescriptor }
});