Add Customer

$data_string = ‘{ “reference”:”DATACON”, “taxnr”:”BE0894069190″, “name”:”BVBA DATACON”, “address”:”Kerkstraat 123″, “zip”:”1000″, “city”:”Brussels”, “country_id”:”56″, “phone”:”+3211743319″, “email”:”info@datacon-bvba.be”, “birthdate”:”1981-12-31″, “type”:”3″ }’; //JSON String $ch = curl_init(“https://api.onlinefact.be/customers/”); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “POST”); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, “api_key_here:api_secret_here”); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);