Remitur Posted December 18, 2022 Share Posted December 18, 2022 About MergeTicket ( https://developers.whmcs.com/api-reference/mergeticket/ ) : the sample code is wrong. The sample code provided is this: $command = 'MergeTicket'; $postData = array( 'ticketid' => '1', 'mergeticketids' => '2,3,4,5,6,7', 'subject' => 'This is a sample updated ticket subject', 'clientid' => '1', ); $adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later $results = localAPI($command, $postData, $adminUsername); print_r($results); But it's wrong, because: 'subject' parameter does not exist (the right name is 'newsubject') 'clientid' parameter does not exist (of, if it's legit, it's not documented) So the right sample code should be: $command = 'MergeTicket'; $postData = array( 'ticketid' => '1', 'mergeticketids' => '2,3,4,5,6,7', 'newsubject' => 'This is a sample updated ticket subject', ); $adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later $results = localAPI($command, $postData, $adminUsername); print_r($results); 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted December 18, 2022 Share Posted December 18, 2022 You are right. subject is optional and clientid is not needed. Request Parameters shows the available options to set. Example code is wrong. Its not the only API documentation that is wrong or outdated. I always edit the pages and create requests for update, when I find mistakes or changes. 1 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.