Hi there,
I am trying to submit an outbound HTTP Put Request to Pipeline deals API via the following code:
var companyId = 12345679;
var url = “https://api.pipelinedeals.com/api/v3/companies/” + companyId + “/?api_key=xxxxxxxxxxx”;
var response = HTTP.put(url, { data: {“company[name]”:" } },function(err, res) { console.log(err);} );
I get an error message saying that the required parameters are missing. When i tested the same on POSTMAN REST to test the api, it is working.
I tried using params instead of data as well but was not able to to have any success as well!
What could the problem be or how should I go about solving this issue?
ahref
2
Try writing the data as:
data: {"company":{"name":""} }
and perhaps place the api_key in params
as docuemnted here: http://docs.meteor.com/#/full/http_call
Worth a try :D?
gosh! this is embarrasing! I missed out a “.json” in the url.
The url is “https://api.pipelinedeals.com/api/v3/companies/” + companyId + “.json/?api_key=xxxxxxxxxxx”;
instead of
“https://api.pipelinedeals.com/api/v3/companies/” + companyId + “/?api_key=xxxxxxxxxxx”;
Thanks alot for your help though ahref!
ahref
4
Did your error object not have 404 in it D:?
Nope. It showed 422, with an error thrown as “company params is required”!