2305: Get preference groups

Fetch preference group details

Endpoint ID:2305
Method:

GET

URL:

/preferences/group/{groupID}


groupIDOPTIONAL: A GUID string identifier for the group
Request body:None

Response body:

JSON data containing an array of groups. When a groupID has been given, this array will only contain a single element.

/preferences/group/38ed187d-456d-4617-9bbd-045d3ebf15e0
{
    "groups": [
        {
            "id": "38ed187d-456d-4617-9bbd-045d3ebf15e0",
            "name": "Group 1",
            "description": "This explains everything",
            "isActive": true,
            "labels": [
                {
                    "language": "da",
                    "label": "Tekst",
                    "isDefault": true
                },
                {
                    "language": "en",
                    "label": "Text",
                    "isDefault": false
                }
            ],
            "members": [
                {
                    "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
                    "name": "Preference 1",
                    "description": "This explains everything",
                    "isActive": true,
                    "labels": [
                        {
                            "language": "da",
                            "label": "Tekst",
                            "isDefault": true
                        },
                        {
                            "language": "en",
                            "label": "Text",
                            "isDefault": false
                        }
                    ]
                },
                {
                    "id": "dd9eaf78-18ff-44ea-9717-25b103060643",
                    "name": "Preference 2",
                    "description": "This explains everything",
                    "isActive": true,
                    "labels": [
                        {
                            "language": "da",
                            "label": "Tekst",
                            "isDefault": true
                        },
                        {
                            "language": "en",
                            "label": "Text",
                            "isDefault": false
                        }
                    ]
                }
            ],
            "rules": {
                "minSelection": 2,
                "maxSelection": 6
            }
        }
    ]
}
/preferences/group – No groups exist
{
    "groups": []
}

When a groupID parameter is included in the request, an empty groups array will never be returned - either the requested group object will be returned, or a 404 response.


Status codes:200OK

404Group not found - only returned when a groupID parameter is included in the request