To retrieve updated contacts, use the advanced_search object within the Contacts Search endpoint.
HTTP Method: POSTEndpoint:
https://incoming.qomon.app/search
Headers Required: * Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"data": {
"advanced_search": {
"page": 0,
"per_page": 100,
"query": {
"$all": [
{
"$all": [
{
"$condition": {
"attr": "UpdatedAt",
"ope": "gte",
"value": "now-1d/d"
}
}
]
}
]
}
}
}
}The core of this polling mechanism relies on the $condition object inside your query:
attr: "UpdatedAt": Targets the timestamp when a contact was last modified or created in Qomon.ope: "gte": Stands for "Greater Than or Equal to." This tells the API to return any record updated during or after your specified time.value: "now-1d/d": This uses server-side date math to dynamically calculate the time. "now-1d/d" tells the API to look at "Now, minus 1 day, rounded down to the start of the day." You can easily adjust this value based on your polling frequency (for example, looking back exactly one hour by using "now-1h" if you are running an hourly cron job).
Because the API returns a maximum of 1000 contacts per request in this configuration ("per_page": 1000), your code must handle pagination to ensure no updates are missed during busy days:
"page": 0."page": 1 and make the exact same request again.