Mautic Community Forums

REST API List contacts, JSON contacts array in result not as documented

GET “/api/contacts”



Should be:

Code:
{ "total": "1", "contacts": [ { "id": 2, ........... } } }

Actual:
Code:
{ "total": "1", "contacts": { "2": { "id": 2, ........... } } }
1 Like

GET “/api/contacts”

Should be:

{
    "total": "1",
    "contacts": [
        {
            "id": 2,
            ...........
        }
    }
}

Actual:

{
    "total": "1",
    "contacts": {
        "2":  {
            "id": 2,
            ...........
         }
    }
}

The lack of an array is still in the current api.

Can anybody point me to the location of this code so I can work on a solution?