Skip to content

Instantly share code, notes, and snippets.

@graut
Created July 15, 2016 11:34
Show Gist options
  • Save graut/53f63f68f5ace107646760de32990719 to your computer and use it in GitHub Desktop.
Save graut/53f63f68f5ace107646760de32990719 to your computer and use it in GitHub Desktop.
/**
* Created by Ghanshyam on 2/7/16.
*/
var AgileCRMManager = require("./agilecrm.js");
var obj = new AgileCRMManager("your_domain", "your_rest_api_key", "your_user_email");
var success = function (data) {
console.log(data);
};
var error = function (data) {
console.log(data);
};
var contact = {
"lead_score": "92",
"tags": [
"Lead",
"Likely Buyer"
],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Los "
},
{
"type": "SYSTEM",
"name": "address",
"value": "{\"address\":\"225 George Street\",\"city\":\"NSW\",\"state\":\"Sydney\",\"zip\":\"2000\",\"country\":\"Australia\"}"
}
]
};
obj.contactAPI.add(contact, success, error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment