Get treatment plans
curl --request GET \
--url https://app.hipp.health/api/v1/treatment-plansimport requests
url = "https://app.hipp.health/api/v1/treatment-plans"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.hipp.health/api/v1/treatment-plans', 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/treatment-plans",
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/treatment-plans"
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/treatment-plans")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hipp.health/api/v1/treatment-plans")
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": "<string>",
"updatedAt": "<string>",
"patient": {
"publicId": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"name": "<string>",
"practiceArea": "ABA"
}
],
"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
}Treatment Plans
Get All Treatment Plans
Get paginated list of treatment plans for the authenticated organization
GET
/
v1
/
treatment-plans
Get treatment plans
curl --request GET \
--url https://app.hipp.health/api/v1/treatment-plansimport requests
url = "https://app.hipp.health/api/v1/treatment-plans"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.hipp.health/api/v1/treatment-plans', 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/treatment-plans",
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/treatment-plans"
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/treatment-plans")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hipp.health/api/v1/treatment-plans")
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": "<string>",
"updatedAt": "<string>",
"patient": {
"publicId": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"name": "<string>",
"practiceArea": "ABA"
}
],
"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 Treatment Plans
Retrieve a paginated list of treatment plans for your organization.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:100patientId(optional): Filter treatment plans by patient public ID
Success Response (200)
{
"data": [
{
"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"
}
}
],
"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 treatment plans
curl -X GET "https://app.hipp.health/api/v1/treatment-plans?page=1&pageSize=25" \
-H "Authorization: Bearer your-api-key"
# Get treatment plans for a specific patient
curl -X GET "https://app.hipp.health/api/v1/treatment-plans?patientId=usr_patient123" \
-H "Authorization: Bearer your-api-key"
JavaScript Example
const getTreatmentPlans = async (params = {}) => {
const queryParams = new URLSearchParams(params);
const response = await fetch(
`https://app.hipp.health/api/v1/treatment-plans?${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 treatment plans");
}
return response.json();
};
// Usage
try {
const result = await getTreatmentPlans({
page: 1,
pageSize: 25,
patientId: "usr_patient123",
});
console.log("Treatment Plans:", result.data);
console.log("Pagination:", result.pagination);
} catch (error) {
console.error("Error fetching treatment plans:", error.message);
}
Query Parameters
Page number (1-indexed)
Required range:
x >= 1Number of items per page
Required range:
1 <= x <= 100Filter by patient public ID