Retrieve a list of all clients linked to your account.
The results are paginated.
import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const result = await client.clients.list({
embed: "organization",
from: "org_12345678",
limit: 50,
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
for await (const page of result) {
console.log(page);
}
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { clientsList } from "mollie-api-typescript/funcs/clientsList.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await clientsList(client, {
embed: "organization",
from: "org_12345678",
limit: 50,
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
if (res.ok) {
const { value: result } = res;
for await (const page of result) {
console.log(page);
}
} else {
console.log("clientsList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListClientsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.ListClientsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 400, 404, 429 | application/hal+json |
| errors.ClientDefaultError | 4XX, 5XX | */* |
Retrieve a single client by its ID.
import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const result = await client.clients.get({
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
console.log(result);
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { clientsGet } from "mollie-api-typescript/funcs/clientsGet.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await clientsGet(client, {
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("clientsGet failed:", res.error);
}
}
run();import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const result = await client.clients.get({
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
console.log(result);
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { clientsGet } from "mollie-api-typescript/funcs/clientsGet.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await clientsGet(client, {
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("clientsGet failed:", res.error);
}
}
run();import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const result = await client.clients.get({
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
console.log(result);
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { clientsGet } from "mollie-api-typescript/funcs/clientsGet.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await clientsGet(client, {
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("clientsGet failed:", res.error);
}
}
run();import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const result = await client.clients.get({
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
console.log(result);
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { clientsGet } from "mollie-api-typescript/funcs/clientsGet.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await clientsGet(client, {
organizationId: "org_1234567",
embed: "organization",
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("clientsGet failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetClientRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetClientResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 404, 429 | application/hal+json |
| errors.ClientDefaultError | 4XX, 5XX | */* |