I have been assigned to integrate API for my client website. This API is provided by vision6.com.au. There is no much information avialble on their website. Can anyone give me one example which will contact vision6 database and add a contact from our website developed using jquery and php.
Here is the way I am trying
var newVal = { "id": 1, "method": "addUser", "params": [ "APIKEY", "123456", { "username" : "username_123", "password" : "123456abc", "first_name" : "First Name", "last_name" : "Last Name", "email" : "example@example.com", "mobile" : "0412312312", "phone" : "56565656", "fax" : "57575757", "position" : "Manager", "is_read_only" : true, "timezone" : "Australia/Brisbane", "email_user" : true, "is_confirmed" : true } ] }; $.ajax({ url: 'http://www.vision6.com.au/api/jsonrpcserver.php?version=3.0', type: 'POST', beforeSend: function(){alert('sending');}, data: newVal, //dataType: 'json', //data: JSON.stringify(newVal), //contentType: 'application/json; charset=utf-8', dataType: 'json', //async: false, success: function(msg) { alert(msg); } });
This is what I have taken from their documentation developers.vision6.com.au