Get company appointment type
curl --request GET \
--url https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}', 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.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 27,
"tenant_id": 12,
"company_id": 6,
"appointment_category_id": 2,
"first_role_id": 5,
"second_role_id": null,
"third_role_id": null,
"description": "Initial Consultation",
"comment": null,
"subject": "Initial Consultation Call",
"time": "09:00:00",
"duration": 60,
"is_active": true,
"is_default": true
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Appointment Types
Get company appointment type
Returns a single appointment type definition by id.
GET
/
companies
/
{companyId}
/
appointment-types
/
{appointmentTypeId}
Get company appointment type
curl --request GET \
--url https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}', 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.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/companies/{companyId}/appointment-types/{appointmentTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 27,
"tenant_id": 12,
"company_id": 6,
"appointment_category_id": 2,
"first_role_id": 5,
"second_role_id": null,
"third_role_id": null,
"description": "Initial Consultation",
"comment": null,
"subject": "Initial Consultation Call",
"time": "09:00:00",
"duration": 60,
"is_active": true,
"is_default": true
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Authorizations
Path Parameters
Query Parameters
Response
The requested appointment type.
The id of the company role assigned to the first attendee position for appointments of this type. Null if not set. See List company roles. Include first_role to embed the full object.
Example:
5
The id of the company role assigned to the second attendee position for appointments of this type. Null if not set. See List company roles. Include second_role to embed the full object.
The id of the company role assigned to the third attendee position for appointments of this type. Null if not set. See List company roles. Include third_role to embed the full object.