Hey there,
Having an issue making a seemingly simple request.
var request = require("request");
var options = {
method: 'POST',
url: 'https://api.hubapi.com/crm/v3/objects/contacts/search',
qs: {hapikey: API_KEY},
headers: {accept: 'application/json', 'content-type': 'application/json'},
body: {
filterGroups: [{filters: [{value: '123', propertyName: 'pp_id_parrain', operator: 'EQ'}]}],
sorts: ['string'],
query: '123',
properties: ['firstname'],
limit: 50,
after: 50
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
This is returning:
HTTP 200
{
"total": 1,
"results": []
}
I don’t understand why the results aren’t returning a first name. Or results of any kind. I was under the impression the [‘firstname’] in the properties param would mean the firstname of the contact object matching the query would be returned.
Anyone willing to offer some insight?