Skip to main content
GET
/
v1
/
treatment-plans
/
{planId}
Get treatment plan by ID
curl --request GET \
  --url https://app.hipp.health/api/v1/treatment-plans/{planId}
{
  "publicId": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "patient": {
    "publicId": "<string>",
    "firstName": "<string>",
    "lastName": "<string>"
  },
  "goals": [
    "<string>"
  ],
  "name": "<string>"
}

Get Treatment Plan By Id

Retrieve a single treatment plan by its planId, including associated goals.

Headers

Authorization: Bearer <your-api-key>

Path Parameters

  • planId (required): Treatment plan public identifier

Success Response (200)

{
  "publicId": "tp_abc123def456",
  "name": "Physical Therapy Treatment Plan",
  "practiceArea": "Physical Therapy",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:45:00Z",
  "patient": {
    "publicId": "usr_patient123",
    "firstName": "John",
    "lastName": "Doe"
  },
  "goals": ["goal_123", "goal_456"]
}

Error Responses

400 - Validation Error

{
  "error": "Validation error",
  "details": [
    {
      "code": "invalid_string",
      "message": "Invalid planId format",
      "path": ["planId"]
    }
  ]
}

500 - Internal Server Error

{
  "error": "An unexpected error occurred"
}

Examples

cURL Example

# Get treatment plan by planId
curl -X GET "https://app.hipp.health/api/v1/treatment-plans/tp_abc123def456" \
  -H "Authorization: Bearer your-api-key"

JavaScript Example

const getTreatmentPlanById = async (planId) => {
  const response = await fetch(
    `https://app.hipp.health/api/v1/treatment-plans/${planId}`,
    {
      method: "GET",
      headers: {
        Authorization: "Bearer your-api-key",
      },
    }
  );

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.error || "Failed to fetch treatment plan");
  }

  return response.json();
};

// Usage
try {
  const treatmentPlan = await getTreatmentPlanById("tp_abc123def456");
  console.log("Treatment Plan:", treatmentPlan);
  console.log("Goals:", treatmentPlan.goals);
} catch (error) {
  console.error("Error fetching treatment plan:", error.message);
}

Path Parameters

planId
string
required

Response

Successful response

publicId
string
required
createdAt
string
required
updatedAt
string
required
patient
object
required
goals
string[]
required
name
string | null
practiceArea
enum<string> | null

Clinical practice area of the treatment plan

Available options:
ABA,
ACADEMY,
DIR_FLOORTIME,
FEEDING_THERAPY,
NURSING,
OCCUPATIONAL_THERAPY,
PHYSICAL_THERAPY,
SCHOOL_BASED_ABA,
SPEECH_LANGUAGE_PATHOLOGY,
FACILITY