X Enterprises
fastify-xwhatconverts

accounts.list

List WhatConverts accounts with optional date and pagination filters. Requires Agency Key.

accounts.list

List accounts with optional filters. Requires an Agency (Master) API Key.

Signature

fastify.xwhatconverts.accounts.list(params?: {
  accountsPerPage?: number;
  pageNumber?: number;
  startDate?: string;
  endDate?: string;
  order?: "asc" | "desc";
}): Promise<object>

Params

NameTypeRequiredDescription
accountsPerPagenumberNoResults per page. Default 25, max 250.
pageNumbernumberNoPage number.
startDatestringNoStart date in ISO 8601 format.
endDatestringNoEnd date in ISO 8601 format.
orderstringNoSort order: asc or desc.

Returns

A paginated WhatConverts accounts response object.

Throws

  • [xWhatConverts] Network error: <message> — network-level failure.
  • [xWhatConverts] API error: <status> — non-2xx response; 403 if not using Agency Key.

Examples

Basic — list all accounts

const result = await fastify.xwhatconverts.accounts.list();
console.log(result.accounts);

Realistic — paginate all accounts

async function fetchAllAccounts() {
  const pageSize = 250;
  let page = 1;
  const all = [];

  while (true) {
    const result = await fastify.xwhatconverts.accounts.list({
      accountsPerPage: pageSize,
      pageNumber: page,
    });
    all.push(...result.accounts);
    if (result.accounts.length < pageSize) break;
    page++;
  }

  return all;
}

See Also

AI Context

package: "@xenterprises/fastify-xwhatconverts"
method: fastify.xwhatconverts.accounts.list(params?)
use-when: List WhatConverts accounts — requires Agency (Master) API key; supports pagination
params: page (number), perPage (number)
returns: { accounts: array, totalAccounts: number }
Copyright © 2026