Get batch details. Method only available for installations with enabled SEPA Direct Debit plugin
GET http://url_to_your_hostbill.com/admin/api.php?token=:TOKEN&call=getBatchDetails&id=:ID
<?php include 'class.hbwrapper.php'; $hbw = HBWrapper::singleton(); $hbw->setAPIUrl('http://url_to_hb.com/admin/api.php'); if($hbw->logIn("adminlogin","password")) { $return = $hbw->getBatchDetails(array('id'=>:ID)); print_r($return); } ?>
<?php //Use this method to access HostBill api from HostBill modules $api = new ApiWrapper(); $return = $api->getBatchDetails(array('id'=>:ID)); print_r($return); ?>
{ "success": true, "batch": { "id": "7", "creditor_id": "1", "name": "DD20200701", "status": "Draft", "date": "2020-07-01 12:00:29", "dd_date": "2020-07-15", "download_date": "0000-00-00", "preferred_brand": "0", "invoice_count": "0", "invoice_amount": null, "invoices_pending": [ ], "invoices_processed": [ ], "invoices_failed": [ ] }, "call": "getBatchDetails", "server_time": 1594798610 }