List plan templates
curl --request GET \
--url https://api.halth.com/v1/organisations/{organisationId}/plans/templatesimport requests
url = "https://api.halth.com/v1/organisations/{organisationId}/plans/templates"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.halth.com/v1/organisations/{organisationId}/plans/templates', 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://api.halth.com/v1/organisations/{organisationId}/plans/templates",
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://api.halth.com/v1/organisations/{organisationId}/plans/templates"
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://api.halth.com/v1/organisations/{organisationId}/plans/templates")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halth.com/v1/organisations/{organisationId}/plans/templates")
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{
"items": [
{
"discountRate": 0.1,
"discountAmount": 10000,
"billingType": "recurring",
"popularityRank": 123,
"id": "<string>",
"createdAt": "<string>",
"name": "<string>",
"price": 123,
"currency": "<string>",
"deleted": true,
"items": [
{
"id": "<string>",
"createdAt": "<string>",
"planTemplateId": "<string>",
"sortOrder": 123,
"appointmentTypeId": "<string>",
"providerId": "<string>",
"billableItemId": "<string>",
"basePrice": 123,
"price": 123
}
],
"description": "<string>"
}
],
"page": 1,
"limit": 10,
"totalItems": 100,
"totalPages": 10
}Plan Template
List plan templates
Get a paged list of plan templates for an organisation.
GET
/
v1
/
organisations
/
{organisationId}
/
plans
/
templates
List plan templates
curl --request GET \
--url https://api.halth.com/v1/organisations/{organisationId}/plans/templatesimport requests
url = "https://api.halth.com/v1/organisations/{organisationId}/plans/templates"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.halth.com/v1/organisations/{organisationId}/plans/templates', 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://api.halth.com/v1/organisations/{organisationId}/plans/templates",
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://api.halth.com/v1/organisations/{organisationId}/plans/templates"
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://api.halth.com/v1/organisations/{organisationId}/plans/templates")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halth.com/v1/organisations/{organisationId}/plans/templates")
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{
"items": [
{
"discountRate": 0.1,
"discountAmount": 10000,
"billingType": "recurring",
"popularityRank": 123,
"id": "<string>",
"createdAt": "<string>",
"name": "<string>",
"price": 123,
"currency": "<string>",
"deleted": true,
"items": [
{
"id": "<string>",
"createdAt": "<string>",
"planTemplateId": "<string>",
"sortOrder": 123,
"appointmentTypeId": "<string>",
"providerId": "<string>",
"billableItemId": "<string>",
"basePrice": 123,
"price": 123
}
],
"description": "<string>"
}
],
"page": 1,
"limit": 10,
"totalItems": 100,
"totalPages": 10
}Path Parameters
Query Parameters
Page number
Required range:
1 <= x <= 9007199254740991Example:
1
Number of items per page
Required range:
1 <= x <= 200Example:
10
Field to sort plans by
Available options:
createdAt, popularity Sort direction
Available options:
asc, desc ⌘I
