Get goal by ID
curl --request GET \
--url https://app.hipp.health/api/v1/goals/{goalId}{
"type": "<string>",
"publicId": "<string>",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"goalStatement": "<string>",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"instructions": "<string>",
"baselineDate": "2023-11-07T05:31:56Z",
"targetAchievementDate": "2023-11-07T05:31:56Z",
"progressSummary": "<string>",
"isBehavior": true,
"behaviorInstances": [
{
"publicId": "<string>",
"quantity": 123,
"happenedAt": "2023-11-07T05:31:56Z",
"antecedent": "<string>",
"consequence": "<string>",
"durationSeconds": 123
}
]
}Goals
Get Goal By Id
Get a single goal by goalId. Returns different schema based on goal type (behavior, skill, rating, or interval)
GET
/
v1
/
goals
/
{goalId}
Get goal by ID
curl --request GET \
--url https://app.hipp.health/api/v1/goals/{goalId}{
"type": "<string>",
"publicId": "<string>",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"goalStatement": "<string>",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"instructions": "<string>",
"baselineDate": "2023-11-07T05:31:56Z",
"targetAchievementDate": "2023-11-07T05:31:56Z",
"progressSummary": "<string>",
"isBehavior": true,
"behaviorInstances": [
{
"publicId": "<string>",
"quantity": 123,
"happenedAt": "2023-11-07T05:31:56Z",
"antecedent": "<string>",
"consequence": "<string>",
"durationSeconds": 123
}
]
}Get Goal By Id
Retrieve a single goal by its goalId. Returns different schema based on goal type (frequency_duration, opportunity, rating, or interval).Headers
Authorization: Bearer <your-api-key>
Path Parameters
goalId(required): Goal public identifier
Success Response (200)
Response varies by goal type.Frequency/Duration Based Goal Response
{
"type": "frequency_duration",
"publicId": "goal_abc123",
"targetMaladaptiveBehaviorName": "Aggression",
"dataCollectionType": "FREQUENCY_AND_DURATION",
"addedToTreatmentPlanAt": "2024-01-15T10:30:00Z",
"goalStatement": "Reduce aggressive behavior during transitions",
"definition": "Physical aggression including hitting, kicking, or pushing",
"instructions": "Monitor and record instances during class transitions",
"status": "IN_PROGRESS",
"baselineDate": "2024-01-15T00:00:00Z",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"progressSummary": "Showing improvement over past 2 weeks",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"baselineMetric": {
"publicId": "metric_123",
"value": 10,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "metric_124",
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "metric_125",
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"behaviorInstances": [
{
"publicId": "instance_abc",
"quantity": 3,
"durationSeconds": 120,
"happenedAt": "2024-01-15T14:30:00Z",
"antecedent": "Transition to next activity",
"consequence": "Redirected to quiet area"
}
]
}
Opportunity Based Goal Response
{
"type": "opportunity",
"publicId": "goal_xyz789",
"goalStatement": "Complete hand washing sequence independently",
"skillAcquisitionGoalType": "CHAINED_GOAL",
"shortDescription": "Hand washing routine",
"instructions": "Use task analysis with 8 steps",
"skillCategory": "Self-care",
"status": "IN_PROGRESS",
"baselineDate": "2024-01-15T00:00:00Z",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"progressSummary": "Currently at 60% independence",
"minTrialsCount": 3,
"enabledOutcomes": ["SUCCESS", "FAILURE", "PROMPTED"],
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"baselineMetric": {
"publicId": "metric_126",
"value": 20,
"unit": "PERCENTAGE",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "metric_127",
"value": 80,
"unit": "PERCENTAGE",
"successCriteria": "GREATER_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "metric_128",
"value": 80,
"unit": "PERCENTAGE",
"successCriteria": "GREATER_THAN_OR_EQUAL_TO"
},
"childGoals": [
{
"publicId": "goal_child1"
}
],
"skillTrials": [
{
"happenedAt": "2024-01-15T14:30:00Z",
"trialOutcome": "SUCCESS"
},
{
"happenedAt": "2024-01-15T14:35:00Z",
"trialOutcome": "PROMPTED"
}
]
}
Rating Goal Response
{
"type": "rating",
"publicId": "goal_rating123",
"title": "Anxiety level during transitions",
"description": "Rate anxiety on 1-10 scale",
"instructions": "Observe and rate at start of each transition",
"status": "IN_PROGRESS",
"measurementType": "RATING",
"ratingInstances": [
{
"publicId": "rating_abc",
"rating": 7,
"happenedAt": "2024-01-15T14:30:00Z"
}
]
}
Interval Goal Response
{
"type": "interval",
"publicId": "goal_interval123",
"title": "On-task behavior",
"description": "Track engagement during work periods",
"instructions": "Observe at end of each interval",
"status": "IN_PROGRESS",
"measurementType": "INTERVAL",
"intervalDuration": 30,
"intervalQuantity": 10,
"sets": 3,
"intervalRecordingType": "WHOLE",
"window": 5,
"intervalSets": [
{
"setNumber": 1,
"happenedAt": "2024-01-15T14:00:00Z",
"endTime": "2024-01-15T14:05:00Z",
"present": 8,
"absent": 2,
"instances": [
{
"intervalNumber": 1,
"isPresent": true,
"happenedAt": "2024-01-15T14:00:00Z"
}
]
}
]
}
Error Responses
400 - Validation Error
{
"error": "Validation error",
"details": [
{
"code": "invalid_string",
"message": "Invalid goalId format",
"path": ["goalId"]
}
]
}
500 - Internal Server Error
{
"error": "An unexpected error occurred"
}
Examples
cURL Example
# Get goal by goalId
curl -X GET "https://app.hipp.health/api/v1/goals/goal_abc123" \
-H "Authorization: Bearer your-api-key"
JavaScript Example
const getGoalById = async (goalId) => {
const response = await fetch(
`https://app.hipp.health/api/v1/goals/${goalId}`,
{
method: "GET",
headers: {
Authorization: "Bearer your-api-key",
},
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || "Failed to fetch goal");
}
return response.json();
};
// Usage
try {
const goal = await getGoalById("goal_abc123");
console.log("Goal:", goal);
console.log("Type:", goal.type);
console.log("Status:", goal.status);
} catch (error) {
console.error("Error fetching goal:", error.message);
}
Path Parameters
Response
Successful response
- Frequency/Duration Based
- Opportunity Based
- Rating Goal
- Interval Goal
Available options:
FREQUENCY_ONLY, DURATION_ONLY, FREQUENCY_AND_DURATION Available options:
BASELINE, IN_MAINTENANCE, MASTERED, ARCHIVED, IN_PROGRESS, DISCONTINUED, FUTURE, ON_HOLD Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I