fastify-xwhatconverts
profiles.list
List WhatConverts profiles with optional account, date, and pagination filters.
profiles.list
List profiles with optional filters. Returns a paginated result.
Signature
fastify.xwhatconverts.profiles.list(params?: {
profilesPerPage?: number;
pageNumber?: number;
accountId?: string;
startDate?: string;
endDate?: string;
order?: "asc" | "desc";
}): Promise<object>
Params
| Name | Type | Required | Description |
|---|---|---|---|
profilesPerPage | number | No | Results per page. Default 25, max 250. |
pageNumber | number | No | Page number. |
accountId | string | No | Filter by account ID. |
startDate | string | No | Start date in ISO 8601 format. |
endDate | string | No | End date in ISO 8601 format. |
order | string | No | Sort order: asc or desc. |
Returns
A paginated WhatConverts profiles response object.
Throws
[xWhatConverts] Network error: <message>— network-level failure.[xWhatConverts] API error: <status>— non-2xx response from WhatConverts.
Examples
Basic — list all profiles
const result = await fastify.xwhatconverts.profiles.list();
console.log(result.profiles);
Realistic — list profiles for a specific account
fastify.get("/accounts/:accountId/profiles", async (request) => {
const result = await fastify.xwhatconverts.profiles.list({
accountId: request.params.accountId,
profilesPerPage: 100,
order: "asc",
});
return result.profiles.map((p) => ({
id: p.profile_id,
name: p.profile_name,
url: p.profile_url,
}));
});
See Also
- profiles.get — fetch a single profile
- profiles.create — create a profile
AI Context
package: "@xenterprises/fastify-xwhatconverts"
method: fastify.xwhatconverts.profiles.list(params?)
use-when: List WhatConverts profiles — optionally filter by accountId; supports pagination
params: accountId (string, optional), page (number), perPage (number)
returns: { profiles: array, totalProfiles: number }
