獲取符合通過條件的客戶產品插件
請求參數
參數 | 類型 | 說明 | 必需的 |
---|---|---|---|
action | string | “GetClientsAddons” | Required |
serviceid | int | string | 為其獲取客戶端產品插件的服務 ID。單個數字或逗號分隔列表 |
clientid | int | 客戶端獲取客戶端產品插件 | Optional |
addonid | int | 預定義的產品插件 id 從 tbladdons (tbladdons.id) 獲取客戶端插件。 | Optional |
響應參數
參數 | 類型 | 說明 |
---|---|---|
result | string | 操作結果:成功或錯誤 |
totalresults | int | 可用結果總數 |
serviceid | int | 搜索的特定服務 ID |
clientid | int | 搜索的特定客戶端 ID |
addons | array | 客戶端產品插件列表 |
示例請求 (CURL)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.example.com/includes/api.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(
array(
'action' => 'GetClientsAddons',
// See https://developers.whmcs.com/api/authentication
'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',
'password' => 'SECRET_OR_HASHED_PASSWORD',
'clientid' => '1',
'responsetype' => 'json',
)
)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
示例請求(本地 API)
$command = 'GetClientsAddons';
$postData = array(
'clientid' => '1',
);
$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later
$results = localAPI($command, $postData, $adminUsername);
print_r($results);
示例響應 JSON
{
"result": "success",
"serviceid": "",
"clientid": "1",
"totalresults": "1",
"addons[addon][0][id]": "1",
"addons[addon][0][userid]": "1",
"addons[addon][0][orderid]": "0",
"addons[addon][0][serviceid]": "1",
"addons[addon][0][addonid]": "0",
"addons[addon][0][name]": "Addon 1",
"addons[addon][0][setupfee]": "0.00",
"addons[addon][0][recurring]": "15.00",
"addons[addon][0][billingcycle]": "Monthly",
"addons[addon][0][tax]": "",
"addons[addon][0][status]": "Active",
"addons[addon][0][regdate]": "2015-12-03",
"addons[addon][0][nextduedate]": "2016-10-03",
"addons[addon][0][nextinvoicedate]": "2016-10-03",
"addons[addon][0][paymentmethod]": "paypal",
"addons[addon][0][paymentmethodname]": "PayPal",
"addons[addon][0][notes]": ""
}
相關用法
- PHP WHMCS GetClientsDomains用法及代碼示例
- PHP WHMCS GetClients用法及代碼示例
- PHP WHMCS GetClientsDetails用法及代碼示例
- PHP WHMCS GetClientsProducts用法及代碼示例
- PHP WHMCS GetClientPassword用法及代碼示例
- PHP WHMCS GetClientGroups用法及代碼示例
- PHP WHMCS GetCurrencies用法及代碼示例
- PHP WHMCS GetContacts用法及代碼示例
- PHP WHMCS GetCredits用法及代碼示例
- PHP WHMCS GetConfigurationValue用法及代碼示例
- PHP WHMCS GetCancelledPackages用法及代碼示例
- PHP WHMCS GetTicketNotes用法及代碼示例
- PHP WHMCS GetUsers用法及代碼示例
- PHP WHMCS GetTLDPricing用法及代碼示例
- PHP WHMCS GetToDoItemStatuses用法及代碼示例
- PHP WHMCS GetPermissionsList用法及代碼示例
- PHP WHMCS GetStaffOnline用法及代碼示例
- PHP WHMCS GetEmails用法及代碼示例
- PHP WHMCS GetPromotions用法及代碼示例
- PHP WHMCS GetRegistrars用法及代碼示例
- PHP WHMCS GetAutomationLog用法及代碼示例
- PHP WHMCS GetQuotes用法及代碼示例
- PHP WHMCS GetActivityLog用法及代碼示例
- PHP WHMCS GetPaymentMethods用法及代碼示例
- PHP WHMCS GetModuleQueue用法及代碼示例
注:本文由純淨天空篩選整理自whmcs.com大神的英文原創作品 GetClientsAddons。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。