{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"GetClientsAddons","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"getclientsaddons","__idx":0},"children":["GetClientsAddons"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Obtain the Clients Product Addons that match passed criteria"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-parameters","__idx":1},"children":["Request Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"GetClientsAddons\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serviceid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int|string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The service id(s) to obtain the client product addons for. Single number or comma separated list"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["clientid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The client to obtain the client product addons for"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["addonid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The predefined product addon id from tbladdons (tbladdons.id) to obtain client addons for."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-parameters","__idx":2},"children":["Response Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["result"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The result of the operation: success or error"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["totalresults"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The total number of results available"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serviceid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The specific service id searched for"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["clientid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The specific client id searched for"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["addons"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The client product addons list"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-curl","__idx":3},"children":["Example Request (CURL)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, 'https://www.example.com/includes/api.php');\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS,\n    http_build_query(\n        array(\n            'action' => 'GetClientsAddons',\n            // See https://developers.whmcs.com/api/authentication\n            'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',\n            'password' => 'SECRET_OR_HASHED_PASSWORD',\n            'clientid' => '1',\n            'responsetype' => 'json',\n        )\n    )\n);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$response = curl_exec($ch);\ncurl_close($ch);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-local-api","__idx":4},"children":["Example Request (Local API)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$command = 'GetClientsAddons';\n$postData = array(\n    'clientid' => '1',\n);\n$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later\n\n$results = localAPI($command, $postData, $adminUsername);\nprint_r($results);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response-json","__idx":5},"children":["Example Response JSON"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n    \"result\": \"success\",\n    \"serviceid\": \"\",\n    \"clientid\": \"1\",\n    \"totalresults\": \"1\",\n    \"addons[addon][0][id]\": \"1\",\n    \"addons[addon][0][qty]\": \"1\",\n    \"addons[addon][0][userid]\": \"1\",\n    \"addons[addon][0][orderid]\": \"0\",\n    \"addons[addon][0][serviceid]\": \"1\",\n    \"addons[addon][0][addonid]\": \"0\",\n    \"addons[addon][0][name]\": \"Addon 1\",\n    \"addons[addon][0][setupfee]\": \"0.00\",\n    \"addons[addon][0][recurring]\": \"15.00\",\n    \"addons[addon][0][billingcycle]\": \"Monthly\",\n    \"addons[addon][0][tax]\": \"\",\n    \"addons[addon][0][status]\": \"Active\",\n    \"addons[addon][0][regdate]\": \"2015-12-03\",\n    \"addons[addon][0][nextduedate]\": \"2016-10-03\",\n    \"addons[addon][0][nextinvoicedate]\": \"2016-10-03\",\n    \"addons[addon][0][paymentmethod]\": \"paypal\",\n    \"addons[addon][0][paymentmethodname]\": \"PayPal\",\n    \"addons[addon][0][notes]\": \"\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"version-history","__idx":6},"children":["Version History"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Version"},"children":["Version"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Changelog"},"children":["Changelog"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial Version"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8.12"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Added ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["qty"]}," parameter"]}]}]}]}]}]},"headings":[{"value":"GetClientsAddons","id":"getclientsaddons","depth":1},{"value":"Request Parameters","id":"request-parameters","depth":3},{"value":"Response Parameters","id":"response-parameters","depth":3},{"value":"Example Request (CURL)","id":"example-request-curl","depth":3},{"value":"Example Request (Local API)","id":"example-request-local-api","depth":3},{"value":"Example Response JSON","id":"example-response-json","depth":3},{"value":"Version History","id":"version-history","depth":3}],"frontmatter":{"title":"GetClientsAddons","seo":{"title":"GetClientsAddons"}},"lastModified":"2026-08-04T14:47:26.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/getclientsaddons","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}