Requires Support Fields plugin to be added and active in HostBill. Return list of fields and their values assigned to a ticket
GET http://url_to_your_hostbill.com/admin/api.php?api_id=API_ID&api_key=API_KEY&call=getTicketFields&ticket_id=:TICKET_ID
<?php include 'class.hbwrapper.php'; HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key'); $hbw = HBWrapper::singleton(); $return = $hbw->getTicketFields(array('ticket_id'=>:TICKET_ID)); print_r($return); ?>
<?php //Use this method to access HostBill api from HostBill modules $api = new ApiWrapper(); $return = $api->getTicketFields(array('ticket_id'=>:TICKET_ID)); print_r($return); ?>
{ "success": false, "fields": { "Textarea Field": "this is a test" }, "call": "getTicketFields", "server_time": 1498217504 }