Comments (4)
+1 Needed.
from nodejs.
This will be taken up
from nodejs.
Hi @nikunjve , @priyankinfinnov Thanks for using AGILE CRM , Please use below function to update Lead score This will solve your problem
// update lead score
ContactAPI.prototype.update_lead = function update_lead(contact, success, failure) {
var options = this.getOptions();
options.path = '/dev/api/contacts/edit/lead-score';
options.method = 'PUT';
options.headers['Content-Type'] = 'application/json';
var put = https.request(options, function(resp) {
resp.setEncoding('utf8');
var body = "";
resp.on('data', function(data) {
body += data;
});
resp.on('end', function() {
if (success) {
try {
console.log("Status Code = " + resp.statusCode);
var statusCode = resp.statusCode;
if (statusCode != 200){
console.log("Error message = " + body);
}
try {
var contacts = JSON.parse(body);
success(contacts);
} catch (e) {
return body;
}
} catch (ex) {
failure(ex);
}
}
});
resp.on('error', function(e) {
if (failure) {
failure(e);
}
});
});
try {
var data = JSON.stringify(contact);
put.write(data);
put.end();
} catch (ex) {
failure(ex);
}
};
Hope This will Help You ,
In case you need more information regarding Agile CRM REST API please check below main reference :
https://github.com/agilecrm/rest-api
Thanks,
Agile crm support team.
from nodejs.
Really appreciate your fast action. Just in 1.5 years!
Thanks Again.
from nodejs.
Related Issues (15)
- Is this going to be updated in npm website? HOT 7
- Missing error handling code HOT 1
- Fork with fixes
- make this library promise based?
- updateTagsById is not a function HOT 2
- Is this project alive? HOT 2
- page_size parameter
- Problem on duplicate contact HOT 10
- getContactByEmail throws exception if no contact found
- "deleteContact" returning error
- Event API? HOT 1
- Status Code Spam HOT 2
- HTTP400 on function getDealByContactId HOT 1
- NO License Information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs.