> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hipp.health/llms.txt
> Use this file to discover all available pages before exploring further.

# Get All Goals

> Get paginated list of goals with optional filtering by treatment plan, type, and status

## 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: `1`
* `pageSize` (optional): Number of items per page. Default: `25`. Minimum: `1`, Maximum: `100`
* `treatmentPlanId` (optional): Filter by treatment plan public ID
* `type` (optional): Filter by goal type (`frequency_duration`, `opportunity`, `rating`, `interval`)
* `status` (optional): Filter by goal status

### Success Response (200)

```json theme={null}
{
  "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

```json theme={null}
{
  "error": "Validation error",
  "details": [
    {
      "code": "invalid_string",
      "message": "Invalid parameter value",
      "path": ["page"]
    }
  ]
}
```

#### 500 - Internal Server Error

```json theme={null}
{
  "error": "An unexpected error occurred"
}
```

## Examples

### cURL Example

```bash theme={null}
# 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

```javascript theme={null}
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);
}
```


## OpenAPI

````yaml GET /v1/goals
openapi: 3.0.0
info:
  title: Hipp Health API
  version: 1.0.0
  description: API for managing users and resources within your Hipp Health organization
servers:
  - url: https://app.hipp.health/api
    description: Production Server
security: []
paths:
  /v1/goals:
    get:
      tags:
        - V1
      summary: Get goals
      description: >-
        Get paginated list of goals with optional filtering by treatment plan,
        type, and status
      operationId: get-v1-goals
      parameters:
        - in: query
          name: page
          description: Page number (1-indexed)
          schema:
            type: integer
            minimum: 1
            default: 1
          required: false
        - in: query
          name: pageSize
          description: Number of items per page
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
          required: false
        - in: query
          name: treatmentPlanId
          description: Filter by treatment plan public ID
          schema:
            type: string
          required: false
        - in: query
          name: type
          description: Filter by goal type
          schema:
            type: string
            enum:
              - frequency_duration
              - opportunity
              - rating
              - interval
          required: false
        - in: query
          name: status
          description: Filter by goal status
          schema:
            type: string
          required: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGoalsResponseSchema'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    PaginatedGoalsResponseSchema:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/GoalListSchema'
        pagination:
          $ref: '#/components/schemas/PaginationResponseSchema'
      required:
        - data
        - pagination
    GoalListSchema:
      type: object
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/BehaviorGoalListSchema'
        - $ref: '#/components/schemas/SkillGoalListSchema'
        - $ref: '#/components/schemas/RatingGoalListSchema'
        - $ref: '#/components/schemas/IntervalGoalListSchema'
    PaginationResponseSchema:
      type: object
      properties:
        page:
          type: integer
          minimum: 0
          exclusiveMinimum: true
        pageSize:
          type: integer
          minimum: 0
          exclusiveMinimum: true
        totalCount:
          type: integer
          minimum: 0
        totalPages:
          type: integer
          minimum: 0
      required:
        - page
        - pageSize
        - totalCount
        - totalPages
    ValidationError:
      type: object
      properties:
        error:
          type: string
          example: Validation error
        details:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: invalid_string
              message:
                type: string
                example: Valid email is required
              path:
                type: array
                items:
                  type: string
                example:
                  - email
    BehaviorGoalListSchema:
      type: object
      properties:
        publicId:
          type: string
        goalStatement:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        progressSummary:
          type: string
          nullable: true
        createdAt:
          $ref: '#/components/schemas/dateToString'
        updatedAt:
          $ref: '#/components/schemas/dateToString'
        addedToTreatmentPlanAt:
          $ref: '#/components/schemas/dateToString'
        targetAchievementDate:
          $ref: '#/components/schemas/nullableDateToString'
        autoProgressToMaintenanceEnabled:
          type: boolean
        autoProgressToMasteredEnabled:
          type: boolean
        treatmentPlanId:
          type: string
        type:
          type: string
        status:
          $ref: '#/components/schemas/BehaviorGoalStatus'
        definition:
          type: string
          nullable: true
        isBehavior:
          type: boolean
        targetMaladaptiveBehaviorName:
          type: string
          nullable: true
        numberOfInstances:
          type: number
          minimum: 0
      required:
        - publicId
        - createdAt
        - updatedAt
        - addedToTreatmentPlanAt
        - targetAchievementDate
        - autoProgressToMaintenanceEnabled
        - autoProgressToMasteredEnabled
        - treatmentPlanId
        - type
        - status
        - isBehavior
        - numberOfInstances
    SkillGoalListSchema:
      type: object
      properties:
        publicId:
          type: string
        goalStatement:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        progressSummary:
          type: string
          nullable: true
        createdAt:
          $ref: '#/components/schemas/dateToString'
        updatedAt:
          $ref: '#/components/schemas/dateToString'
        addedToTreatmentPlanAt:
          $ref: '#/components/schemas/dateToString'
        targetAchievementDate:
          $ref: '#/components/schemas/nullableDateToString'
        autoProgressToMaintenanceEnabled:
          type: boolean
        autoProgressToMasteredEnabled:
          type: boolean
        treatmentPlanId:
          type: string
        type:
          type: string
        status:
          $ref: '#/components/schemas/SkillAcquisitionGoalStatus'
        skillAcquisitionGoalType:
          $ref: '#/components/schemas/SkillAcquisitionGoalType'
        skillCategory:
          type: string
          nullable: true
        shortDescription:
          type: string
          nullable: true
        enabledOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/TrialOutcomes'
        minTrialsCount:
          type: number
          nullable: true
        numberOfTrials:
          type: number
          minimum: 0
        numberOfPhases:
          type: number
          minimum: 0
        numberOfChildGoals:
          type: number
          minimum: 0
      required:
        - publicId
        - createdAt
        - updatedAt
        - addedToTreatmentPlanAt
        - targetAchievementDate
        - autoProgressToMaintenanceEnabled
        - autoProgressToMasteredEnabled
        - treatmentPlanId
        - type
        - status
        - skillAcquisitionGoalType
        - enabledOutcomes
        - numberOfTrials
        - numberOfPhases
        - numberOfChildGoals
    RatingGoalListSchema:
      type: object
      properties:
        publicId:
          type: string
        goalStatement:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        progressSummary:
          type: string
          nullable: true
        createdAt:
          $ref: '#/components/schemas/dateToString'
        updatedAt:
          $ref: '#/components/schemas/dateToString'
        addedToTreatmentPlanAt:
          $ref: '#/components/schemas/dateToString'
        targetAchievementDate:
          $ref: '#/components/schemas/nullableDateToString'
        autoProgressToMaintenanceEnabled:
          type: boolean
        autoProgressToMasteredEnabled:
          type: boolean
        treatmentPlanId:
          type: string
        type:
          type: string
        status:
          $ref: '#/components/schemas/GoalStatus'
        title:
          type: string
        description:
          type: string
          nullable: true
        isBehaviorReduction:
          type: boolean
          nullable: true
        numberOfInstances:
          type: number
          minimum: 0
        numberOfChildGoals:
          type: number
          minimum: 0
      required:
        - publicId
        - createdAt
        - updatedAt
        - addedToTreatmentPlanAt
        - targetAchievementDate
        - autoProgressToMaintenanceEnabled
        - autoProgressToMasteredEnabled
        - treatmentPlanId
        - type
        - status
        - title
        - numberOfInstances
        - numberOfChildGoals
    IntervalGoalListSchema:
      type: object
      properties:
        publicId:
          type: string
        goalStatement:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        progressSummary:
          type: string
          nullable: true
        createdAt:
          $ref: '#/components/schemas/dateToString'
        updatedAt:
          $ref: '#/components/schemas/dateToString'
        addedToTreatmentPlanAt:
          $ref: '#/components/schemas/dateToString'
        targetAchievementDate:
          $ref: '#/components/schemas/nullableDateToString'
        autoProgressToMaintenanceEnabled:
          type: boolean
        autoProgressToMasteredEnabled:
          type: boolean
        treatmentPlanId:
          type: string
        type:
          type: string
        status:
          $ref: '#/components/schemas/GoalStatus'
        title:
          type: string
        description:
          type: string
          nullable: true
        intervalDuration:
          type: integer
          nullable: true
        intervalQuantity:
          type: integer
          nullable: true
        sets:
          type: integer
          nullable: true
        intervalRecordingType:
          $ref: '#/components/schemas/IntervalRecordingType'
          nullable: true
        window:
          type: integer
          nullable: true
        numberOfIntervalSets:
          type: number
          minimum: 0
      required:
        - publicId
        - createdAt
        - updatedAt
        - addedToTreatmentPlanAt
        - targetAchievementDate
        - autoProgressToMaintenanceEnabled
        - autoProgressToMasteredEnabled
        - treatmentPlanId
        - type
        - status
        - title
        - numberOfIntervalSets
    dateToString:
      type: string
      format: date-time
    nullableDateToString:
      type: string
      format: date-time
    BehaviorGoalStatus:
      type: string
      enum:
        - BASELINE
        - IN_MAINTENANCE
        - MASTERED
        - ARCHIVED
        - IN_PROGRESS
        - DISCONTINUED
        - FUTURE
        - ON_HOLD
    SkillAcquisitionGoalStatus:
      type: string
      enum:
        - IN_PROGRESS
        - IN_MAINTENANCE
        - MASTERED
        - DISCONTINUED
        - FUTURE
        - ON_HOLD
        - BASELINE
        - ARCHIVED
    SkillAcquisitionGoalType:
      type: string
      enum:
        - SINGLE_TARGET_GOAL
        - MULTI_TARGET_GOAL
        - CHAINED_GOAL
        - MULTI_TARGET_GOAL_TARGET
        - CHAINED_GOAL_TARGET
    TrialOutcomes:
      type: string
      enum:
        - SUCCESS
        - FAILURE
        - PROMPTED
        - FULL_PHYSICAL_PROMPT
        - PARTIAL_PHYSICAL_PROMPT
        - MODEL_PROMPT
        - GESTURE_PROMPT
        - VERBAL_PROMPT
        - VISUAL_PROMPT
        - ENVIRONMENTAL_PROMPT
        - SHAPING_PROMPT
        - TACTILE_PROMPT
        - TIME_DELAY_PROMPT
        - WITHIN_STIMULUS_POSITION_PROMPT
        - WITHIN_STIMULUS_FADING_CUE_PROMPT
        - VERBAL_FULL_MODEL_PROMPT
        - VERBAL_PARTIAL_MODEL_PROMPT
        - VERBAL_PHONEMIC_CUE_PROMPT
        - VERBAL_CONTEXTUAL_CUE_PROMPT
        - VERBAL_SIMULTANEOUS_IMITATION_PROMPT
        - VERBAL_ABA_ONLY_INDIRECT_PROMPT
        - PHYSICAL_PARTIAL_PROMPT
        - PHYSICAL_TOUCH_CUE_PROMPT
        - PHYSICAL_IMPLIED_TOUCH_PROMPT
        - PHYSICAL_SHADOW_PROMPT
        - PHYSICAL_HAND_OVER_HAND_PROMPT
        - PHYSICAL_MINIMAL_ASSIST_PROMPT
        - PHYSICAL_MODERATE_ASSIST_PROMPT
        - PHYSICAL_MAX_ASSIST_PROMPT
        - PHYSICAL_CONTACT_GUARD_PROMPT
        - ENVIRONMENTAL_STANDBY_ASSIST_PROMPT
        - ENVIRONMENTAL_MODIFICATION_PROMPT
        - ENVIRONMENTAL_LOSS_OF_BALANCE_PROMPT
        - ENVIRONMENTAL_INCREASED_COMPLETION_TIME_PROMPT
        - GESTURAL_POINTING_PROMPT
        - GESTURAL_MOTIONING_PROMPT
        - GESTURAL_PARTIAL_MODEL_PROMPT
        - GESTURAL_FULL_MODEL_PROMPT
        - VISUAL_POINTING_PROMPT
        - VISUAL_MOTIONING_PROMPT
        - VISUAL_CUE_PROMPT
        - WITHIN_STIMULUS_POSITION_5_PROMPT
        - WITHIN_STIMULUS_POSITION_4_PROMPT
        - WITHIN_STIMULUS_POSITION_3_PROMPT
        - WITHIN_STIMULUS_POSITION_2_PROMPT
        - WITHIN_STIMULUS_POSITION_1_PROMPT
        - WITHIN_STIMULUS_POSITION_EQUIDISTANT_MATERIALS_PROMPT
        - WITHIN_STIMULUS_FADING_DASHED_LINES_PROMPT
        - WITHIN_STIMULUS_FADING_TOUCH_POINTS_PROMPT
        - WITHIN_STIMULUS_FADING_COLOR_PROMPT
        - WITHIN_STIMULUS_FADING_TEXTUAL_PROMPT
        - WITHIN_STIMULUS_FADING_BORDERS_PROMPT
        - WITHIN_STIMULUS_FADING_HIGHLIGHTER_PROMPT
        - TIME_DELAY_5_SECONDS_PROMPT
        - TIME_DELAY_4_SECONDS_PROMPT
        - TIME_DELAY_3_SECONDS_PROMPT
        - TIME_DELAY_2_SECONDS_PROMPT
        - TIME_DELAY_1_SECOND_PROMPT
        - TIME_DELAY_0_SECONDS_PROMPT
        - SHAPING_TIME_PROMPT
        - SHAPING_RESPONSE_PROMPT
        - ORAL_POSTURAL_PROMPT
        - TACTILE_KINESTHETIC_PROMPT
        - INDEPENDENT_PROMPT
        - SUPERVISION_PROMPT
        - CONTACT_GUARD
        - MINIMAL_ASSISTANCE_PROMPT
        - MODERATE_ASSISTANCE_PROMPT
        - MAXIMAL_ASSISTANCE_PROMPT
        - TOTAL_ASSISTANCE_PROMPT
        - MINIMAL_VERBAL_PROMPTS_OR_ASSISTANCE_PROMPT
        - MODERATE_VERBAL_PROMPTS_OR_ASSISTANCE_PROMPT
        - MAXIMAL_VERBAL_PROMPTS_OR_ASSISTANCE_PROMPT
        - EXPECTANT_PAUSE_PROMPT
        - INDIRECT_NONVERBAL_PROMPT
        - INDIRECT_VERBAL_PROMPT
        - REQUEST_A_RESPONSE_PROMPT
        - PARTIAL_VERBAL_PROMPT
        - DIRECT_MODEL_PROMPT
        - PARTIAL_PHYSICAL_ASSISTANCE_PROMPT
        - PHYSICAL_PROMPT
    GoalStatus:
      type: string
      enum:
        - IN_PROGRESS
        - BASELINE
        - IN_MAINTENANCE
        - MASTERED
        - ON_HOLD
        - DISCONTINUED
        - FUTURE
        - ARCHIVED
    IntervalRecordingType:
      type: string
      enum:
        - PARTIAL
        - MOMENTARY
        - WHOLE
  responses:
    '400':
      description: Bad Request - Validation Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: An unexpected error occurred

````