Listar agendamentos
curl --request GET \
--url https://api.bydoctor.com.br/api/public/v1/appointments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bydoctor.com.br/api/public/v1/appointments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bydoctor.com.br/api/public/v1/appointments', 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.bydoctor.com.br/api/public/v1/appointments",
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.bydoctor.com.br/api/public/v1/appointments"
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.bydoctor.com.br/api/public/v1/appointments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bydoctor.com.br/api/public/v1/appointments")
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{
"results": [
{
"appointment_type": {
"id": 123,
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modality": "in_person",
"origin": "staff",
"patient": {
"id": 123,
"name": "<string>",
"phone": "<string>"
},
"professional": {
"id": 123,
"name": "<string>",
"specialty": "<string>"
},
"room": {
"id": 123,
"name": "<string>"
},
"start_at": "2023-11-07T05:31:56Z",
"status": "requested",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"next": "https://api.bydoctor.com.br/api/public/v1/appointments?cursor=cD00ODY%3D",
"previous": "https://api.bydoctor.com.br/api/public/v1/appointments?cursor=cj0xJnA9NDg3"
}appointments
Listar agendamentos
Retorna os agendamentos da clínica em ordem crescente de atualização (updated_at mais antigo primeiro), com paginação por cursor — siga next até o fim para obter tudo. Use updated_since para sincronizar apenas o que mudou desde a última consulta: agendamentos cancelados continuam aparecendo com status: "cancelled" em vez de desaparecerem da lista.
GET
/
api
/
public
/
v1
/
appointments
Listar agendamentos
curl --request GET \
--url https://api.bydoctor.com.br/api/public/v1/appointments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bydoctor.com.br/api/public/v1/appointments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bydoctor.com.br/api/public/v1/appointments', 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.bydoctor.com.br/api/public/v1/appointments",
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.bydoctor.com.br/api/public/v1/appointments"
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.bydoctor.com.br/api/public/v1/appointments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bydoctor.com.br/api/public/v1/appointments")
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{
"results": [
{
"appointment_type": {
"id": 123,
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modality": "in_person",
"origin": "staff",
"patient": {
"id": 123,
"name": "<string>",
"phone": "<string>"
},
"professional": {
"id": 123,
"name": "<string>",
"specialty": "<string>"
},
"room": {
"id": 123,
"name": "<string>"
},
"start_at": "2023-11-07T05:31:56Z",
"status": "requested",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"next": "https://api.bydoctor.com.br/api/public/v1/appointments?cursor=cD00ODY%3D",
"previous": "https://api.bydoctor.com.br/api/public/v1/appointments?cursor=cj0xJnA9NDg3"
}Authorizations
Chave de API no formato bd_live_xxxxxxxx.xxxx...
Query Parameters
Cursor de paginação retornado em next/previous.
in_person- Presencialtelehealth- Teleconsulta
Available options:
in_person, telehealth Resultados por página (padrão 50, máximo 100).
One of: requested, scheduled, confirmed, checked_in, completed, no_show, cancelled.
Available options:
cancelled, checked_in, completed, confirmed, no_show, requested, scheduled