Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

Fetch all sets of terms


Endpoint ID:

2100

Method:

Status
colourGreen
titleGET

URL:

/permissions/terms/

termsRequest body:None Spanstylewhite-space: nowraptitleExample 1

{termsID}


termsID

OPTIONAL: A GUID string identifier for the terms


?versionStates

OPTIONAL: A comma-separated list of version states to include. When this query-string parameter is present at contains at least one state, only terms versions matching a requested state will be returned.

States: Active, Inactive, Obsolete, Draft
e.g.: ?versionStates=active,draft


?versionFields

OPTIONAL: A comma-separated list of version fields to include. When this query-string parameter is present, terms version output will only include the named fields.
Fields: version, state, consents

Request body:

None

Response body:


JSON data with information about terms.

Code Block
/permissions/terms – Two terms exists
Code Block
languagejson
{
    "terms": [
        {
            "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
            "name": "Some terms",
            "description": "This explains everything",
            
"text
"versions": [
                {
                    "version": "1.0",
                    "state": "Draft",
             
"versions
       "consents": [
                        {
                            "
version
id": "
1.0
584254a8-a401-4f84-8068-92f173dce72e",
                    
"state
        "name": "
draft",
E-mail"
                        },
                        {
        
"text
                    "id": "
Please accept our terms and conditions"
7a0e1921-ce0e-4c97-86b9-650a93fad2dd",
                            "name": "SMS"
                        }
                    ]
                }
            ]
        },
        {
            "id": "1f788c79-7dde-407f-a976-6b08ffb4c75a",
            "name": "Some other terms",
            "description": "This explains these terms",
            "versions": [
                {
             
"text
       "version": 
"Please accept our terms and conditions",
"2.0",
                    "state": "Active",
                    "
versions
consents": [
                        {
                    
"version
        "id": "
2.0",
584254a8-a401-4f84-8068-92f173dce72e",
                            "
state
name": "
active",
E-mail"
                        },
                      
"text": "Please accept our terms and conditions"
  {
                            "id": "7a0e1921-ce0e-4c97-86b9-650a93fad2dd",
                            "name": "SMS"
                        }
                    ]
                },
                {
                    "version": "1.0",
                    "state": "
obsolete
Obsolete",
                    
"text": "Accept our terms and conditions{ "terms": [
"consents": [
                        {
                            "id": "584254a8-a401-4f84-8068-92f173dce72e",
                            "name": "E-mail"
                        }
                    ]
                }
            ]
        }
    ]
}
/terms/permission – No terms exists
Code Block
languagejson
{
    "terms": []
}
/terms/permission?versionStates=active&versionFields=version,state - Two terms exist, limit version output
Code Block
language
titleExample 2 – No terms exists
json
{
    "terms": [
        {
            "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
            "name": "Some terms",
            "description": "This explains everything",
            "versions": []
        },
        {
            "id": "1f788c79-7dde-407f-a976-6b08ffb4c75a",
            "name": "Some other terms",
            "description": "This explains these terms",
            "versions": [
                {
                    "version": "2.0",
                    "state": "Active"
                }
            ]
        }
    ]
}
Note

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

/permissions/terms/7a6776a3-9411-4d34-9866-99aa9ac7cc27 – Specific terms found
Code Block
languagejson
{
    "terms": [
        {
            "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
            "name": "Some terms",
            "description": "This explains everything",
            "versions": [
                {
                    "version": "1.0",
                    "state": "Draft"
                }
            ]
        }
    ]
}

Status codes:

200

OK


404

Terms not found - only returned when a termsID parameter is included in the request