pguilbault Posted March 1, 2016 Share Posted March 1, 2016 Hi, Made this custom API call to return TLD prices. it include price slabs as well as categories for each tld. Example: Request: array('action' => 'gettldprices', 'slabs' => array('Domain Volume Discount')) Response: Array ( [result] => success [tlds] => Array ( [.com] => Array ( [prices] => Array ( [domainregister] => 14.99 [domaintransfer] => 14.99 [domainrenew] => 14.99 ) [slabs] => Array ( [Domain Volume Discount] => Array ( [domainregister] => 9.99 [domaintransfer] => 9.99 [domainrenew] => 9.99 ) ) [categories] => Array ( [0] => gTLD [1] => Popular ) ) ) ); The way the domain price slabs work is with client groups. So if you want the API to return them you need to add the parameter "slabs". If you are passing a querystring it needs to be in the following format: "slabs[]=Group Name 1&slabs[]=Group Name 2". Ofcourse you need to have a client group with that specific name and have activated the domain price slab for some tlds. You can also pass the parameter "categories" to retrieve only specified TLDs within those categories. If you are passing a querystring it needs to be in the following format: "categories[]=ccTLD&categories[]=Shopping". Thats it! gettldprices.zip 0 Quote Link to comment Share on other sites More sharing options...
pguilbault Posted March 3, 2016 Author Share Posted March 3, 2016 (edited) Errrr... is it only me that is incapable of downloading the attachement ? Here it is: - Removed - Edited March 3, 2016 by Infopro No Need, Attachment is Fine. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 3, 2016 Share Posted March 3, 2016 Errrr... is it only me that is incapable of downloading the attachment ? it's working fine for me too - I think it's a forum setting that new users (e.g those with less than 5 posts) cannot download attachments. 0 Quote Link to comment Share on other sites More sharing options...
pguilbault Posted March 7, 2016 Author Share Posted March 7, 2016 I converted the mysql_query to something a bit more future proof and also added the support for multiple currencies. gettldprices.zip 0 Quote Link to comment Share on other sites More sharing options...
MrL22 Posted August 1, 2016 Share Posted August 1, 2016 Thank you for this, I was unaware that you could write your own API's for WHMCS. There are three in particular I need to write as WHMCS does not have them: - Get tax rates - Get boolean if product is taxable - Get if clients country is taxable Your add-on will give me a great starting point. 0 Quote Link to comment Share on other sites More sharing options...
DigItalWarrior Posted October 20, 2016 Share Posted October 20, 2016 Hi all, I'm interested to learn more about customization. Where I can put this file to test? Thank you in advance 0 Quote Link to comment Share on other sites More sharing options...
DigItalWarrior Posted October 20, 2016 Share Posted October 20, 2016 Ok, solved. Please ignore my post. 0 Quote Link to comment Share on other sites More sharing options...
DigItalWarrior Posted October 20, 2016 Share Posted October 20, 2016 I can't call an option by category or extension? eg. tlds or popular? $postfields["action"] = "gettldprices"; $postfields["tlds"] = ".com"; $postfields["category"] = "popular"; 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.