# Simplify the output for /api/contacts?minimal=true to be truly minimal

**URL:** <https://forum.mautic.org/t/simplify-the-output-for-api-contacts-minimal-true-to-be-truly-minimal/25317>\
**Category:** Development\
**Created:** [September 6, 2022, 12:27pm UTC](https://forum.mautic.org/t/simplify-the-output-for-api-contacts-minimal-true-to-be-truly-minimal/25317 "2022-09-06T12:27:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stgoos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/stgoos/32/8149_2.png) [@stgoos](https://forum.mautic.org/u/stgoos)\
**Post date:** [September 6, 2022, 12:27pm UTC](https://forum.mautic.org/t/simplify-the-output-for-api-contacts-minimal-true-to-be-truly-minimal/25317/1 "2022-09-06T12:27:47Z")

</div>

The minimal=true parameter doesn’t really minify the output at all at the moment and still leaves us with an pretty annoying JSON structure to deal with… This is especially the case when you try to map the fields in Azure Synapse or Azure Data Factory as those can’t handle the continuously changing contact id in the mapping structure.

```auto
 "total": "199871",
    "contacts": {
        "215849": {},
        "215848": {},

```

It should become:

```auto
 "total": "199871",
    "contacts": {
        {},
        {},

```

And for the minimal character preferably with only the fields \> all information. So instead of:

```auto
{
"total": "199871",
    "contacts": {
        "215849": {
            "isPublished": true,
            "dateAdded": "2022-09-05T09:13:33+00:00",
            "dateModified": "2022-09-05T09:13:33+00:00",
            "createdBy": null,
            "createdByUser": null,
            "modifiedBy": null,
            "modifiedByUser": " ",
            "id": 215849,
            "points": 1,
            "color": null,
            "fields": {
                "core": {
                    "points": {
				...
                    },
                    "last_active": {
				...
                    },
		    ...
                "professional": [],
                "all": {
                    "id": "215849",
                    "points": 1,
                    "last_active": "2022-09-05 09:13:33",
                    "firstname": null,
                    "lastname": null,
                    "email": "demo@domain.ext",
                    "phone": null,
                    "mobile": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "state": null,
			  ...
                    "optin": true
                }
            }
        }
    }
}

```

this:

```auto
{
"total": "199871",
    "contacts": {
            "isPublished": true,
            "dateAdded": "2022-09-05T09:13:33+00:00",
            "dateModified": "2022-09-05T09:13:33+00:00",
            "all_fields": {
                    "id": "215849",
                    "points": 1,
                    "last_active": "2022-09-05 09:13:33",
                    "firstname": null,
                    "lastname": null,
                    "email": "demo@domain.ext",
                    "phone": null,
                    "mobile": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "state": null,
			  ...
                    "optin": true
            }
    	},
    	{},
    	{}
  }
}

```

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [May 29, 2026, 2:45pm UTC](https://forum.mautic.org/t/simplify-the-output-for-api-contacts-minimal-true-to-be-truly-minimal/25317/2 "2026-05-29T14:45:09Z")

</div>

see [REST API: How to filter to only get needed fields? - #10 by ekke](https://forum.mautic.org/t/rest-api-how-to-filter-to-only-get-needed-fields/28426/10) for a better-late-than-never workaround on this one 🙂
