API Appuntamenti
Gestisci gli appuntamenti tramite API REST.
Endpoints
| Metodo | Endpoint | Descrizione |
|---|---|---|
| GET | /appointments | Lista appuntamenti |
| POST | /appointments | Crea appuntamento |
| GET | /appointments/{id} | Dettaglio |
| PUT | /appointments/{id} | Aggiorna |
| DELETE | /appointments/{id} | Elimina |
| POST | /appointments/{id}/status | Cambia stato |
Creare Appuntamento
http
POST /api/v1/appointmentsBody
json
{
"title": "Call commerciale",
"type": "video",
"start_at": "2025-01-20T10:00:00Z",
"end_at": "2025-01-20T10:30:00Z",
"contact_id": 5,
"deal_id": 3,
"description": "Demo prodotto",
"location": "https://meet.google.com/xxx"
}Campi
| Campo | Tipo | Obbligatorio |
|---|---|---|
title | string | ✅ |
start_at | datetime | ✅ |
end_at | datetime | ✅ |
type | string | |
contact_id | int | |
deal_id | int | |
description | string | |
location | string |
Tipi
| Tipo | Codice |
|---|---|
| Telefonata | phone |
| Video Call | video |
| In presenza | in_person |
Cambiare Stato
http
POST /api/v1/appointments/{id}/statusBody
json
{
"status": "completed",
"notes": "Meeting andato bene"
}Stati
| Stato | Codice |
|---|---|
| Programmato | scheduled |
| Confermato | confirmed |
| Completato | completed |
| Annullato | cancelled |
| No-show | no_show |
Esempi
bash
# Crea appuntamento
curl -X POST "https://bladecrm.it/api/v1/appointments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Demo prodotto",
"type": "video",
"start_at": "2025-01-20T10:00:00Z",
"end_at": "2025-01-20T10:30:00Z",
"contact_id": 10
}'