Créer un rendez-vous
curl --request POST \
--url https://api.treats.vet/api/v1/appointments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"patientId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"vetId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"appointmentTypeId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"scheduledAt": "2026-02-15T10:00:00Z",
"reason": "Vaccination annuelle"
}
'import requests
url = "https://api.treats.vet/api/v1/appointments"
payload = {
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"patientId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"vetId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"appointmentTypeId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"scheduledAt": "2026-02-15T10:00:00Z",
"reason": "Vaccination annuelle"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '550e8400-e29b-41d4-a716-446655440000',
patientId: '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
vetId: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
appointmentTypeId: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
scheduledAt: '2026-02-15T10:00:00Z',
reason: 'Vaccination annuelle'
})
};
fetch('https://api.treats.vet/api/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.treats.vet/api/v1/appointments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientId' => '550e8400-e29b-41d4-a716-446655440000',
'patientId' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
'vetId' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',
'appointmentTypeId' => 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
'scheduledAt' => '2026-02-15T10:00:00Z',
'reason' => 'Vaccination annuelle'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.treats.vet/api/v1/appointments"
payload := strings.NewReader("{\n \"clientId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"patientId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"vetId\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"appointmentTypeId\": \"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11\",\n \"scheduledAt\": \"2026-02-15T10:00:00Z\",\n \"reason\": \"Vaccination annuelle\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.treats.vet/api/v1/appointments")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"patientId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"vetId\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"appointmentTypeId\": \"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11\",\n \"scheduledAt\": \"2026-02-15T10:00:00Z\",\n \"reason\": \"Vaccination annuelle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treats.vet/api/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"patientId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"vetId\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"appointmentTypeId\": \"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11\",\n \"scheduledAt\": \"2026-02-15T10:00:00Z\",\n \"reason\": \"Vaccination annuelle\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appointmentTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduledAt": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"reason": "<string>",
"isUrgent": true,
"status": "<string>",
"displayStatus": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"message": "Invalid or expired API key"
}{
"message": "Rate limit exceeded. Please try again later.",
"retryAfter": 123
}Rendez-vous
Créer un rendez-vous
Crée un nouveau rendez-vous pour un patient.
Utilisez d’abord /appointments/available-slots pour vérifier la disponibilité.
Permission requise : APPOINTMENT_CREATE
POST
/
appointments
Créer un rendez-vous
curl --request POST \
--url https://api.treats.vet/api/v1/appointments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"patientId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"vetId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"appointmentTypeId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"scheduledAt": "2026-02-15T10:00:00Z",
"reason": "Vaccination annuelle"
}
'import requests
url = "https://api.treats.vet/api/v1/appointments"
payload = {
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"patientId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"vetId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"appointmentTypeId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"scheduledAt": "2026-02-15T10:00:00Z",
"reason": "Vaccination annuelle"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '550e8400-e29b-41d4-a716-446655440000',
patientId: '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
vetId: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
appointmentTypeId: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
scheduledAt: '2026-02-15T10:00:00Z',
reason: 'Vaccination annuelle'
})
};
fetch('https://api.treats.vet/api/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.treats.vet/api/v1/appointments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientId' => '550e8400-e29b-41d4-a716-446655440000',
'patientId' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
'vetId' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',
'appointmentTypeId' => 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
'scheduledAt' => '2026-02-15T10:00:00Z',
'reason' => 'Vaccination annuelle'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.treats.vet/api/v1/appointments"
payload := strings.NewReader("{\n \"clientId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"patientId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"vetId\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"appointmentTypeId\": \"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11\",\n \"scheduledAt\": \"2026-02-15T10:00:00Z\",\n \"reason\": \"Vaccination annuelle\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.treats.vet/api/v1/appointments")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"patientId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"vetId\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"appointmentTypeId\": \"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11\",\n \"scheduledAt\": \"2026-02-15T10:00:00Z\",\n \"reason\": \"Vaccination annuelle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treats.vet/api/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"patientId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"vetId\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"appointmentTypeId\": \"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11\",\n \"scheduledAt\": \"2026-02-15T10:00:00Z\",\n \"reason\": \"Vaccination annuelle\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appointmentTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduledAt": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"reason": "<string>",
"isUrgent": true,
"status": "<string>",
"displayStatus": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"message": "Invalid or expired API key"
}{
"message": "Rate limit exceeded. Please try again later.",
"retryAfter": 123
}Authorizations
Clé API fournie par l'administrateur de la clinique.
Format : vk_...
Body
application/json
Identifiant du propriétaire
Identifiant de l'animal
Vétérinaire souhaité
Date et heure souhaitées (vérifier via /appointments/available-slots)
Type de rendez-vous (obtenu via /appointments/types)
Motif de la visite
Rendez-vous urgent
Response
Rendez-vous créé
Rendez-vous à la clinique
Propriétaire
Animal concerné
Type de rendez-vous
Vétérinaire assigné
Date et heure prévues
Heure de fin prévue
Motif du rendez-vous
Statut actuel du rendez-vous
Statut affiché (libellé)
⌘I