Get a bulk reschedule batch with the appointments it shifted
curl --request GET \
--url https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Tenant: <x-tenant>'import requests
url = "https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}"
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Tenant': '<x-tenant>', Authorization: 'Bearer <token>'}
};
fetch('https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}', 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.flextell.ai/api/v1/appointments/reschedule/history/{batchId}",
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>",
"X-Tenant: <x-tenant>"
],
]);
$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.flextell.ai/api/v1/appointments/reschedule/history/{batchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tenant", "<x-tenant>")
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://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": "<string>",
"data": {
"batch_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"total": 123,
"confirmed_count": 123,
"in_flight_count": 123,
"expired_count": 123,
"status": {
"value": "<string>",
"label": "Devam ediyor"
},
"doctor": {
"id": 123,
"name": "<string>",
"avatar_url": "<string>"
},
"triggered_by": {
"id": 123,
"name": "<string>",
"avatar_url": "<string>"
},
"appointments": [
{
"appointment_id": 123,
"is_appointment_deleted": "<string>",
"customer": {
"id": 123,
"record_state": {
"is_read_only": true,
"reason_code": "<string>"
},
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"email": "<string>",
"is_masked": true,
"is_lead_stage": true,
"lead_id": 123
},
"original_scheduled_at": "2023-11-07T05:31:56Z",
"proposed_scheduled_at": "2023-11-07T05:31:56Z",
"status": {
"value": "<string>",
"label": "Onaylandı"
}
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"success": true,
"error_code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"errors": null,
"data": null
}{
"message": "<string>",
"errors": {}
}{
"success": false,
"error_code": "SETUP_REQUIRED",
"message": "Complete the required setup steps to continue.",
"data": {
"next_step": "clinic_info"
}
}Appointment
Get a bulk reschedule batch with the appointments it shifted
The batch summary of GET /appointments/reschedule/history followed by one row per shifted
appointment (patient, original and proposed time, the patient’s answer), oldest original
time first. Without ViewAllAppointments:Appointment only the user’s own appointments are
listed and counted; a batch with none of them is 404.
GET
/
v1
/
appointments
/
reschedule
/
history
/
{batchId}
Get a bulk reschedule batch with the appointments it shifted
curl --request GET \
--url https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Tenant: <x-tenant>'import requests
url = "https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}"
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Tenant': '<x-tenant>', Authorization: 'Bearer <token>'}
};
fetch('https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}', 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.flextell.ai/api/v1/appointments/reschedule/history/{batchId}",
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>",
"X-Tenant: <x-tenant>"
],
]);
$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.flextell.ai/api/v1/appointments/reschedule/history/{batchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tenant", "<x-tenant>")
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://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/appointments/reschedule/history/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": "<string>",
"data": {
"batch_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"total": 123,
"confirmed_count": 123,
"in_flight_count": 123,
"expired_count": 123,
"status": {
"value": "<string>",
"label": "Devam ediyor"
},
"doctor": {
"id": 123,
"name": "<string>",
"avatar_url": "<string>"
},
"triggered_by": {
"id": 123,
"name": "<string>",
"avatar_url": "<string>"
},
"appointments": [
{
"appointment_id": 123,
"is_appointment_deleted": "<string>",
"customer": {
"id": 123,
"record_state": {
"is_read_only": true,
"reason_code": "<string>"
},
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"email": "<string>",
"is_masked": true,
"is_lead_stage": true,
"lead_id": 123
},
"original_scheduled_at": "2023-11-07T05:31:56Z",
"proposed_scheduled_at": "2023-11-07T05:31:56Z",
"status": {
"value": "<string>",
"label": "Onaylandı"
}
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"success": true,
"error_code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"errors": null,
"data": null
}{
"message": "<string>",
"errors": {}
}{
"success": false,
"error_code": "SETUP_REQUIRED",
"message": "Complete the required setup steps to continue.",
"data": {
"next_step": "clinic_info"
}
}Yetkilendirmeler
oauth2bearer
The access token received from the authorization server in the OAuth 2.0 flow.
Başlıklar
Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.
Yol Parametreleri
The batch identifier (batch_id in the history list)