I'm using Mautic API to search contacts by e-mail. The standard JSON response is that below:
{
"total": "1",
"contacts": {
**"64936": {**
"isPublished": true,
"dateAdded": "2018-07-10T19:01:40-03:00",
"dateModified": "2018-08-24T13:43:42-03:00",
"createdBy": 18,
"createdByUser": "Notes IBM",
"modifiedBy": 38,
"modifiedByUser": "Thales Carvalho",
"id": 64936,
"points": 0,
"color": null,
"fields": {
"core": {
"points": {
...
I am trying to get the contacts ID, which is, in this case, 64936. But, as you can see, the ID is the name key of an object. How do I proceed?
P.S. Since I search by e-mail, every time the e-mail changes, the ID changes too.
The Mautic API's POST method verifies the user e-mail and update or create the contact, so, i don't need to get through this problem anymore.