Sorry, you need to enable JavaScript to visit this website.

List contact groups

 

Service version: 1
Last edit: 2020.05.21

On this page

Purpose

This endpoint obtains a list of tuples representing the user's contact groups. Each tuple contains a single contact group's UUID and name.

Request data

HTTPS method: GET

URL format

For ease of viewing and identification:

  • Required constants and parameters are shown in bold text.
  • Optional parameters are shown in plain text.
https://baseURL/notifications/versionNumber/groups?key=Your_API_Key&maxResults=integer&pageNumber=integer

curl command

curl 'https://baseURL/notifications/versionNumber/groups?key=Your_API_Key&maxResults=integer&pageNumber=integer'

Request parameters

The following table describes the parameters that can be used in a Request.

  • Required parameters must be used or the call will fail.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
  • The order of request parameters is not important.
Required parameters
Parameter Description
baseURL
string
The base URL for calling the API.
Value: api.tomtom.com
versionNumber
string
Service version number.
Value: 1
key
string
An API Key valid for the requested service.
Value: Your valid API Key.
Optional parameters
[maxResults]
integer
Maximum number of items returned in the Response.
Value: Greater than zero, less than or equal to 100.
Default: 100
[pageNumber]
integer
The number of the items page to be returned in the Response. The maximum number of elements on the page is equal to the maxResults value.
Value: Greater than zero.
Default: 1

▲ Return to top

Response data

Response body

{
  "groups": [
    {
      "id": "group_id",
      "name": "group_name"
    },
    ...
  ],
  "resultInfo": {
    "maxResults": number,
    "pageNumber": number,
    "itemsCount": number
  }
}

Response fields

The following table describes all of the fields that can appear in a Response.

Primary fields
Field Description
groups[]
array
The list of pairs consisting of contact group UUIDs and names.
groups[] array
Field Description
id
string
The UUID of the contact group.
name
string
(Optional) The name of the contact group.
resultInfo{} object
Field Description
maxResults
integer
Maximum number of items returned in the Response.
pageNumber
integer
Number of the items page to be returned in the Response. Maximum number of elements on the page is equal to the maxResults value.
itemsCount
integer
Number of returned items on the page.

HTTP Response codes

Code Meaning and possible causes
200 OK
400 Bad Request:
  • Page numbering starts from 1.
  • Minimum number of results per page is 1.
  • Maximum number of results per page is 100.

▲ Return to top

Examples

List all contact groups available to the user.

Request URL

https://api.tomtom.com/notifications/1/groups?key=Your_API_Key

Response body (JSON)

{
  "groups": [
    {
      "id": "c623f589-5f5b-4a1b-b8c1-b93f273e1207",
      "name": "Managers Group"
    },
    {
      "id": "695c769b-6d63-4269-bb31-9d343ec802f0",
      "name": "Developers Group"
    },
    {
      "id": "3376c0f7-fc96-4a94-9834-28737b34335c",
      "name": "Testers Group"
    }
  ],
  "resultInfo": {
    "maxResults": 100,
    "pageNumber": 1,
    "itemsCount": 3
  }
}

▲ Return to top