URL: getDocumentStatus.php
to use as JSON, append ?apiformat=json to the URL, then send through all variables as a JSON encoded string.
username
password
DocType (the type of document, for now only jobcard is supported)
DocNR - the document number. Integer only.
JSON encoded array of client documents in the following format:
$array[status] = status name;
$array[status_id] = status id;
$param['username'] = '';
$param['password'] = '';
$param['DocType'] = 'jobcard';
$param['DocNR'] = '123';
$url = 'https://www.invoicesonline.co.za/api/getDocumentStatus.php?apiformat=json';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); //set the url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return as a variable
curl_setopt($ch, CURLOPT_POST, 1); //set POST method
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($param)); //set the POST variables
$response = curl_exec($ch); //run the whole process and return the response
Updated: Tue, 23 June 2026