List contact groups

Service version: 1
Last edit: 2022.08.30

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

  • Constants and parameters enclosed in curly brackets { } must be replaced with their values.
  • Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.

URL request format

get
URL request format
https://{baseURL}/notifications/{versionNumber}/groups?key={Your_API_Key}&maxResults={integer}&pageNumber={integer}

curl command request format

get
curl command request format
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.
  • The order of request parameters is not important.

Required parameters

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

Description

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

Response data

Response body

Response body - JSON
1{
2 "groups": [
3 {
4 "id": "group_id",
5 "name": "group_name"
6 },
7 ...
8 ],
9 "resultInfo": {
10 "maxResults": number,
11 "pageNumber": number,
12 "itemsCount": number
13 }
14}

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

FieldDescription

id


string

The UUID of the contact group.

name


string

(Optional) The name of the contact group.

resultInfo object

FieldDescription

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.

Response codes

Code

Meaning & 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.

Example

List all contact groups available to the user.

Request URL

get
Request example
https://api.tomtom.com/notifications/1/groups?key={Your_API_Key}

Response body

Response body - JSON
1{
2 "groups": [
3 {
4 "id": "c623f589-5f5b-4a1b-b8c1-b93f273e1207",
5 "name": "Managers Group"
6 },
7 {
8 "id": "695c769b-6d63-4269-bb31-9d343ec802f0",
9 "name": "Developers Group"
10 },
11 {
12 "id": "3376c0f7-fc96-4a94-9834-28737b34335c",
13 "name": "Testers Group"
14 }
15 ],
16 "resultInfo": {
17 "maxResults": 100,
18 "pageNumber": 1,
19 "itemsCount": 3
20 }
21}