List contact groups
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
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": number13 }14}
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
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": 320 }21}