cURL
curl --request GET \
--url https://sandbox.withclasp.com/notifications \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.withclasp.com/notifications"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.withclasp.com/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.withclasp.com/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.withclasp.com/notifications"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.withclasp.com/notifications")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.withclasp.com/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "<string>",
"previous": "<string>",
"results": [
{
"id": "<string>",
"notification_type": "enrollment_submitted",
"related_object_type": "member",
"related_object_id": "<string>",
"payload": {},
"owner": "clasp",
"created_at": "2023-11-07T05:31:56Z"
}
]
}Notifications
List Notifications
Lists notifications. A notification is created when something happens in Clasp that a member, broker, or employer should be told about, such as a new hire becoming eligible or a member submitting their enrollment.
GET
/
notifications
cURL
curl --request GET \
--url https://sandbox.withclasp.com/notifications \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.withclasp.com/notifications"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.withclasp.com/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.withclasp.com/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.withclasp.com/notifications"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.withclasp.com/notifications")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.withclasp.com/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "<string>",
"previous": "<string>",
"results": [
{
"id": "<string>",
"notification_type": "enrollment_submitted",
"related_object_type": "member",
"related_object_id": "<string>",
"payload": {},
"owner": "clasp",
"created_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
API Key authentication with required prefix "Bearer"
Query Parameters
The pagination cursor value.
Filter by one or more notification types.
enrollment_submitted- A member submitted their enrollmentenrollment_approved- A member's enrollment was approvedmember_terminated- A member was terminatedwelcome- A new hire should be welcomed and invited to enrollnewly_eligible- A member became eligible for benefitsdependent_age_out- A member's dependent is about to age out of coverageopen_enrollment_kickoff- An open enrollment window openedopen_enrollment_reminder- A member has not yet completed open enrollment
Available options:
enrollment_submitted, enrollment_approved, member_terminated, welcome, newly_eligible, dependent_age_out, open_enrollment_kickoff, open_enrollment_reminder Number of results to return per page.
Filter to notifications about a specific object.
Filter by the type of the related object.