0

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.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Thales
  • 3
  • 4
  • Try the "parse json" shape, add the payload, it will generate the schema for you. – Balaji Sep 21 '18 at 10:52
  • The thing is that I'm trying to get the 64936 number ... like I sayed, the ID is the key name of the object, and its variants accordly to the requisition. – Thales Sep 24 '18 at 19:04
  • 1
    Anyway, not directly, but I already solve the problem. 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 problema anymore. Thanks for the help everyone! – Thales Sep 24 '18 at 19:08

1 Answers1

0

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.

Thales
  • 3
  • 4