Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added rules to example response


Excerpt

Fetch preference group details

...

Endpoint ID:2305
Method:

Status
colourGreen
titleGET

URL:

/preferences/group/{groupID}


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


Span
stylewhite-space: nowrap
Response body:


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

Code Block
title/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
            }
        }
    ]
}


Code Block
title/preferences/group – No groups exist
{
    "groups": []
}


Note

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

...