skip to content

API - Get Business Name

Get Business Name.

JSON Option (recommended):

to use as JSON, append ?apiformat=json to the URL, then send through all variables as a JSON encoded string.

URL: getBusinessName.php

Required Fields:

username
password

Returns:

JSON ecoded array with id & name of business.

{["id":"integer","name":"string"]}

Example PHP code with JSON

$param['username'] = '';
$param['password'] = '';

$url = 'https://www.invoicesonline.co.za/api/getBusinessName.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: Fri, 13 August 2021