Notification groups provide a way to send notifications to groups of users and/or email addresses about events on CareHQ (for example when an action is completed.
A unique Id for the notification group.
The date/time the nominal code was created.
A description of the notification groups purpose.
A list of email addresses to notify.
The date/time the nominal code was modified.
A unique name for the notification group.
A list of users to notify.
{
"_id": "6724fbc74f73a2cebf637812",
"created": "2024-11-01 16:03:19",
"description": "Billing and credit control department",
"email_to": [
"finance@marshallcare.co.uk"
],
"modified": "2024-11-01 16:03:19",
"name": "Finance",
"users": [
"6724fbc74f73a2cebf6377fe"
]
}
Return a list of notification groups setup for your account on CareHQ.
['_id']
A list of attributes to include for fetched objects.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
A filter that accepts a date/time and filters the items returned to those modified after the date/time.
A filter that accepts a date/time and filters the items returned to those modified before the date/time.
A case insensitive keyword filter applied to the following fields; description, name.
1
The page number to fetch.
10
The number of items to return per page.
_id
A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.
Returns a page of notification groups.
var notificationGroups = apiClient.Request(
HttpMethod.Get,
"notification-groups",
new MultiValueDict()
.Add("attributes", "name")
);
<?php
$notification_groups = $api_client->request(
'GET',
'notification-groups',
[
'attributes'=>['name']
]
);
notification_groups = api_client(
'GET',
'notification-groups',
params={
'attributes': ['name']
}
)
notification_groups = api_client.request(
'GET',
'notification-groups',
params: {
'attributes' => ['name']
}
)
{
"item_count": 1,
"items": [
{
"_id": "6724fbc74f73a2cebf637812",
"name": "Finance"
}
],
"page": 1,
"page_count": 1,
"per_page": 10
}
Retrieve a notification group object.
Returns a notification group object.
var notificationGroup = apiClient.Request(
HttpMethod.Get,
$"notification-groups/{notificationGroupId}"
);
<?php
$notification_group = $api_client->request(
'GET',
'notification-groups/' . $notification_group_id
);
notification_group = api_client(
'GET',
f'notification-groups/{notification_group_id}'
)
notification_group = api_client.request(
'GET',
"notification-groups/#{notification_group_id}"
)
{
"_id": "6724fbc74f73a2cebf637812",
"created": "2024-11-01 16:03:19",
"description": "Billing and credit control department",
"email_to": [
"finance@marshallcare.co.uk"
],
"modified": "2024-11-01 16:03:19",
"name": "Finance",
"users": [
"6724fbc74f73a2cebf6377fe"
]
}