Get goals
curl --request GET \
--url https://app.hipp.health/api/v1/goalsimport requests
url = "https://app.hipp.health/api/v1/goals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.hipp.health/api/v1/goals', 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://app.hipp.health/api/v1/goals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.hipp.health/api/v1/goals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hipp.health/api/v1/goals")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hipp.health/api/v1/goals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"publicId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"targetAchievementDate": "2023-11-07T05:31:56Z",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"treatmentPlanId": "<string>",
"type": "<string>",
"status": "BASELINE",
"isBehavior": true,
"numberOfInstances": 1,
"goalStatement": "<string>",
"instructions": "<string>",
"progressSummary": "<string>",
"definition": "<string>",
"targetMaladaptiveBehaviorName": "<string>"
}
],
"pagination": {
"page": 1,
"pageSize": 1,
"totalCount": 1,
"totalPages": 1
}
}{
"message": "Validation Error",
"statusCode": 400,
"validationErrors": [
{
"code": "invalid_type",
"message": "Required",
"path": [
"email"
]
}
]
}{
"error": "An unexpected error occurred",
"statusCode": 500
}Goals
Get All Goals
Get paginated list of goals with optional filtering by treatment plan, type, and status
GET
/
v1
/
goals
Get goals
curl --request GET \
--url https://app.hipp.health/api/v1/goalsimport requests
url = "https://app.hipp.health/api/v1/goals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.hipp.health/api/v1/goals', 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://app.hipp.health/api/v1/goals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.hipp.health/api/v1/goals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hipp.health/api/v1/goals")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hipp.health/api/v1/goals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"publicId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"targetAchievementDate": "2023-11-07T05:31:56Z",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"treatmentPlanId": "<string>",
"type": "<string>",
"status": "BASELINE",
"isBehavior": true,
"numberOfInstances": 1,
"goalStatement": "<string>",
"instructions": "<string>",
"progressSummary": "<string>",
"definition": "<string>",
"targetMaladaptiveBehaviorName": "<string>"
}
],
"pagination": {
"page": 1,
"pageSize": 1,
"totalCount": 1,
"totalPages": 1
}
}{
"message": "Validation Error",
"statusCode": 400,
"validationErrors": [
{
"code": "invalid_type",
"message": "Required",
"path": [
"email"
]
}
]
}{
"error": "An unexpected error occurred",
"statusCode": 500
}Get All Goals
Retrieve a paginated list of goals with optional filtering by treatment plan, type, and status.Headers
Authorization: Bearer <your-api-key>
Query Parameters
page(optional): Page number (1-indexed). Default:1. Minimum:1pageSize(optional): Number of items per page. Default:25. Minimum:1, Maximum:100treatmentPlanId(optional): Filter by treatment plan public IDtype(optional): Filter by goal type (frequency_duration,opportunity,rating,interval)status(optional): Filter by goal status
Success Response (200)
{
"data": [
{
"publicId": "goal_abc123",
"type": "frequency_duration",
"status": "IN_PROGRESS",
"goalStatement": "Reduce aggressive behavior during transitions",
"instructions": "Monitor and record instances during class transitions",
"progressSummary": "Showing improvement over past 2 weeks",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z",
"addedToTreatmentPlanAt": "2024-01-15T10:30:00Z",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"treatmentPlanId": "tp_xyz789",
"definition": "Physical aggression including hitting, kicking, or pushing",
"isBehavior": true,
"targetMaladaptiveBehaviorName": "Aggression",
"numberOfInstances": 45
}
],
"pagination": {
"page": 1,
"pageSize": 25,
"totalCount": 100,
"totalPages": 4
}
}
Error Responses
400 - Validation Error
{
"error": "Validation error",
"details": [
{
"code": "invalid_string",
"message": "Invalid parameter value",
"path": ["page"]
}
]
}
500 - Internal Server Error
{
"error": "An unexpected error occurred"
}
Examples
cURL Example
# Get all goals
curl -X GET "https://app.hipp.health/api/v1/goals?page=1&pageSize=25" \
-H "Authorization: Bearer your-api-key"
# Get goals for a specific treatment plan
curl -X GET "https://app.hipp.health/api/v1/goals?treatmentPlanId=tp_xyz789" \
-H "Authorization: Bearer your-api-key"
# Get frequency duration goals only
curl -X GET "https://app.hipp.health/api/v1/goals?type=frequency_duration" \
-H "Authorization: Bearer your-api-key"
JavaScript Example
const getGoals = async (params = {}) => {
const queryParams = new URLSearchParams(params);
const response = await fetch(
`https://app.hipp.health/api/v1/goals?${queryParams}`,
{
method: "GET",
headers: {
Authorization: "Bearer your-api-key",
},
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || "Failed to fetch goals");
}
return response.json();
};
// Usage
try {
const result = await getGoals({
page: 1,
pageSize: 25,
treatmentPlanId: "tp_xyz789",
status: "IN_PROGRESS",
});
console.log("Goals:", result.data);
console.log("Pagination:", result.pagination);
} catch (error) {
console.error("Error fetching goals:", error.message);
}
Query Parameters
Page number (1-indexed)
Required range:
x >= 1Number of items per page
Required range:
1 <= x <= 100Filter by treatment plan public ID
Filter by goal type
Available options:
frequency_duration, opportunity, rating, interval Filter by goal status