List contact groups
Decommission notice
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
https://{baseURL}/notifications/{versionNumber}/groups?key={Your_API_Key}&maxResults={integer}&pageNumber={integer}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 |
|---|---|
string | The base URL for calling the API. Value: |
string | Service version number. Value: |
string | An API Key valid for the requested service. Value: Your valid |
Optional parameters | Description |
|---|---|
integer | Maximum number of items returned in the response. Value: Greater than zero, less than or equal to 100. Default: |
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 Value: Greater than zero. Default: |
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 |
array | The list of pairs consisting of contact group UUIDs and names. |
groups array | |
| Field | Description |
string | The UUID of the contact group. |
string | (Optional) The name of the contact group. |
resultInfo object | |
| Field | Description |
integer | Maximum number of items returned in the response. |
integer | Number of the items page to be returned in the response. Maximum number
of elements on the page is equal to the |
integer | Number of returned items on the page. |
Response codes
Code | Meaning & possible causes |
|---|---|
| OK |
| Bad Request :
|
Example
List all contact groups available to the user.
Request URL
https://api.tomtom.com/notifications/1/groups?key={Your_API_Key}Response body
{ "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 }}