Hi,
I want to get the contacts that is created base on the time filter.
Using Postman as a test, I was able to receive the expected response.
But upon creation using javascript, I receive this kind of error response.
Code:
var headers = new Array();
headers['accept'] = '*/*';
headers['Content-Type'] = 'application/json';
var url = "https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=hapikey"
var body = {
"filterGroups":[
{
"filters": [
{
"propertyName": "createdate",
"operator": "GT",
"value": "1602123448000"
}
]
}
]
}
var response = https.post({
url:url,
headers:headers,
body:body
});
Response:
{
"status":"error",
"message":"Invalid input JSON on line 1, column 14: Unrecognized token 'filterGroups': was expecting 'null', 'true', 'false' or NaN",
"correlationId":"54873d32-5fb2-42ac-81e9-ff1ba7a69905"
}
I can’t figure out on which part has problem.
Can someone help/teach me to correct this?