Skip to main content
Glama

whmcs_get_affiliates

Retrieve affiliate data from WHMCS to track partner performance and manage referral programs.

Instructions

Get list of affiliates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitstartNoStarting offset
limitnumNoNumber of results

Implementation Reference

  • src/index.ts:1146-1162 (registration)
    Registration of the 'whmcs_get_affiliates' MCP tool, including input schema definition and handler that delegates to WhmcsApiClient.getAffiliates
    server.registerTool( 'whmcs_get_affiliates', { title: 'Get Affiliates', description: 'Get list of affiliates', inputSchema: { limitstart: z.number().optional().describe('Starting offset'), limitnum: z.number().optional().describe('Number of results'), }, }, async (params) => { const result = await whmcsClient.getAffiliates(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
  • Core handler implementation: WhmcsApiClient.getAffiliates method that performs the WHMCS API call to 'GetAffiliates' action with pagination parameters and returns affiliate list data.
    async getAffiliates(params: { limitstart?: number; limitnum?: number; } = {}) { return this.call<WhmcsApiResponse & { totalresults: number; startnumber: number; numreturned: number; affiliates: { affiliate: Array<{ id: number; userid: number; date: string; visitors: number; paytype: string; payamount: string; onetime: string; balance: string; withdrawn: string; }> }; }>('GetAffiliates', params); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scarecr0w12/whmcs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server