Scheduling
L'API timum gère les disponibilités (Timeslots), les rendez-vous (Appointments), les participations et les clients – le cœur de la planification des rendez-vous.
Aperçu des concepts
Timeslots (Disponibilités)
Un Timeslot définit qu'une ressource est disponible pendant une période donnée. Cette période est divisée en créneaux réservables par une grille.
Concept de grille
Create Timeslots
Crée un ou plusieurs Timeslots pour une ressource.
curl -X POST "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/timeslots" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"timeslots": [
{
"reference": "tsl-2024-01-15@yourCrm",
"resourceReference": "res-musterstr1@yourCrm",
"start": "2024-01-15T09:00",
"end": "2024-01-15T17:00",
"raster": 30,
"defaultCapacity": 1,
"defaultAcceptBookings": true,
"address": {
"city": "Berlin",
"zip": "10115",
"country": "DE",
"street": "Musterstraße",
"number": "1"
},
"state": "BOOKABLE"
}
]
}'
Request Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
timeslots | array | Oui | Tableau d'objets Timeslot |
Champs de l'objet Timeslot
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
reference | string | Non | Référence Timeslot unique (générée si non indiquée) |
resourceReference | string | Oui | Référence de la ressource associée |
start | datetime | Non | Début du Timeslot (ISO 8601) |
end | datetime | Oui | Fin du Timeslot (ISO 8601) |
raster | number | Oui | Durée d'un créneau de réservation en minutes. Divise le Timeslot en unités réservables. |
defaultCapacity | number | Oui | Nombre maximal de participants par Appointment créé |
defaultAcceptBookings | boolean | Oui | true : réservable publiquement. false : l'Appointment devient privé (réservations supplémentaires uniquement par le fournisseur). |
address | object | string | Non | Adresse pour les Appointments. Peut être un objet ou une chaîne (par ex. "Zoom: https://zoom.us/j/123") |
state | string | Oui | CREATED : masqué (phase de planification). BOOKABLE : visible publiquement et réservable. |
{
"address": "Zoom-Meeting: https://zoom.us/j/123456789"
}
Get Timeslots
Récupère tous les Timeslots d'une ressource sur une période donnée.
curl -X GET "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/resource/res-musterstr1@yourCrm/timeslots?from=2024-01-15T00:00&to=2024-01-22T00:00" \
-H "X-TIMUM-CLIENT-ID: your-api-key"
Paramètres de requête
| Paramètre | Type | Obligatoire | Description |
|---|---|---|---|
from | datetime | Oui | Date de début (ISO 8601) |
to | datetime | Oui | Date de fin (ISO 8601) |
Appointments inclus
Update Timeslot
Met à jour un Timeslot existant. Seuls les champs transmis sont modifiés.
curl -X PUT "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/timeslots/tsl-2024-01-15@yourCrm" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"start": "2024-01-15T10:00",
"end": "2024-01-15T16:00",
"raster": 30,
"defaultCapacity": 2,
"defaultAcceptBookings": true,
"state": "BOOKABLE"
}'
Delete Timeslot
Supprime un Timeslot.
curl -X DELETE "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/timeslots/tsl-2024-01-15@yourCrm" \
-H "X-TIMUM-CLIENT-ID: your-api-key"
Condition préalable
Appointments (Rendez-vous)
Les Appointments sont des rendez-vous réservés. Ils peuvent être créés individuellement, sous forme de séquence ou de série sur plusieurs jours.
Get Appointments
Récupère les Appointments d'un fournisseur. Inclut les rendez-vous actifs et annulés.
curl -X GET "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/appointments?productRef=prod-besichtigung@yourCrm&resourceRef=res-musterstr1@yourCrm&includeArchived=false" \
-H "X-TIMUM-CLIENT-ID: your-api-key"
Paramètres de requête
| Paramètre | Type | Description |
|---|---|---|
productRef | string | Filtrage par produit (facultatif) |
resourceRef | string | Filtrage par ressource (facultatif) |
includeArchived | boolean | Inclure les Appointments archivés (par défaut : false) |
Response
[
{
"reference": "apt-001@yourCrm",
"acceptBookings": true,
"address": {
"city": "Berlin",
"countryCode": "DE",
"street": "Musterstraße",
"number": "1",
"zip": "10115"
},
"archived": false,
"capacity": 1,
"contactReference": "user-123@yourCrm",
"description": "Besichtigung",
"start": "2024-01-15T10:00:00Z",
"end": "2024-01-15T10:30:00Z",
"notes": null,
"participations": [
{
"reference": "part-001@yourCrm",
"email": "kunde@example.com",
"mobile": "+49 170 9876543",
"name": "Max Kunde",
"note": "",
"state": "BOOKED",
"messages": null
}
],
"price": null,
"productReference": "prod-besichtigung@yourCrm",
"resourceReference": "res-musterstr1@yourCrm",
"seriesId": null,
"state": "ACTIVE"
}
]
Create Appointments
Crée des Appointments. Prend en charge les rendez-vous individuels, les séquences et les séries.
curl -X POST "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/appointments" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"reference": "apt-001@yourCrm",
"start": "2024-01-15T10:00",
"end": "2024-01-15T11:00",
"capacity": 1,
"acceptBookings": true,
"resourceReference": "res-musterstr1@yourCrm",
"productReference": "prod-besichtigung@yourCrm",
"productName": "Besichtigung",
"contactReference": "user-123@yourCrm",
"address": {
"city": "Berlin",
"zip": "10115",
"country": "DE",
"street": "Musterstraße",
"number": "1"
},
"participations": [
{
"reference": "part-001@yourCrm",
"name": "Max Kunde",
"email": "kunde@example.com",
"mobile": "+49 170 9876543",
"note": "Interessiert an 3-Zimmer-Wohnung",
"state": "BOOKED"
}
],
"price": {
"value": 0.00,
"currency": "EUR"
}
}'
Request Body (Rendez-vous unique)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
reference | string | Oui* | *Obligatoire pour un rendez-vous unique, ignoré pour une série |
start | datetime | Oui | Début (ISO 8601) |
end | datetime | Oui | Fin (ISO 8601) |
capacity | number | Non | Nombre max. de participants (par défaut : 0) |
acceptBookings | boolean | Non | Réservable publiquement (par défaut : false) |
resourceReference | string | Oui | Référence de la ressource |
productReference | string | Oui | Référence du produit |
productName | string | Non | Remplace le nom du produit |
contactReference | string | Non | Staff responsable |
address | object | string | Non | Adresse (par défaut : adresse de la ressource) |
participations | array | Non | Participants de l'Appointment |
price | object | Non | Prix (value, currency : EUR/CHF) |
Objet Participation
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
reference | string | Oui* | *Obligatoire pour un rendez-vous unique |
name | string | Oui | Nom du participant |
email | string | Oui | E-mail du participant |
mobile | string | Non | Numéro de mobile |
note | string | Non | Note sur le participant |
state | string | Oui | RESERVED, REQUESTED, BOOKED, CANCELED, DELETED |
Statut RESERVED
Créer une série
curl -X POST "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/appointments" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"from": "2024-01-15T09:00",
"to": "2024-01-15T17:00",
"capacity": 1,
"acceptBookings": true,
"resourceReference": "res-musterstr1@yourCrm",
"productReference": "prod-besichtigung@yourCrm",
"series_data": {
"from": "2024-01-15T09:00",
"to": "2024-01-19T17:00",
"raster": 30,
"weekdays": ["1", "2", "3", "4", "5"]
}
}'
Objet series_data
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
from | datetime | Oui | Début de la série (ISO 8601) |
to | datetime | Oui | Fin de la série (ISO 8601) |
raster | number | Oui | Durée du créneau en minutes |
weekdays | string[] | Non* | *Obligatoire pour plus d'un jour. Tableau de jours de la semaine : "1"=lun. à "7"=dim. |
Delete Appointments (sans notification)
Supprime des Appointments sans notifier les participants. Pour les corrections administratives.
curl -X DELETE "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/appointments/withoutNotification" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"appointmentReference": "apt-001@yourCrm"
}'
Request Body
| Champ | Type | Description |
|---|---|---|
appointmentReference | string | Référence de l'Appointment à supprimer |
seriesId | string | OU : ID d'une série (supprime tous les Appointments de la série) |
Aucune notification
Cancel Appointments
Annule les Appointments et notifie tous les participants par e-mail.
curl -X DELETE "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/appointments?message=Der%20Termin%20muss%20leider%20abgesagt%20werden" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"appointmentReference": "apt-001@yourCrm"
}'
Paramètres de requête
| Paramètre | Type | Description |
|---|---|---|
message | string | Message aux participants (dans l'e-mail d'annulation) |
Comportement
- Définit l'état de l'Appointment sur CANCELLED
- Définit tous les états de Participation sur CANCELLED
- Envoie des e-mails d'annulation à tous les participants
- L'Appointment n'est plus réservable
Participations
Les Participations relient les Customers aux Appointments. Chaque Participation a un statut qui reflète le processus de réservation.
Participation States
| État | Description |
|---|---|
RESERVED | Réservé temporairement. Supprimé automatiquement après 3 minutes. |
REQUESTED | Demande effectuée, en attente de confirmation par le fournisseur. |
BOOKED | Confirmé et réservé. |
CANCELED | Annulé par le Customer ou le fournisseur. |
DELETED | Supprimé administrativement (sans notification). |
Create Participation
Ajoute un Customer à un Appointment.
curl -X POST "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/participations?ignoreCapacity=false&onDuplicateRaise=false&sendMails=true" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"reference": "part-002@yourCrm",
"appointmentReference": "apt-001@yourCrm",
"customerReference": "cust-001@yourCrm",
"state": "BOOKED",
"message": "Bestätigung Ihrer Terminbuchung"
}'
Paramètres de requête
| Paramètre | Type | Par défaut | Description |
|---|---|---|---|
ignoreCapacity | boolean | false | Ajouter la Participation même en cas de capacité complète |
onDuplicateRaise | boolean | false | Pour une référence existante : true=erreur, false=mise à jour |
sendMails | boolean | true | Envoyer des e-mails de notification |
Request Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
reference | string | Oui | Référence Participation unique |
appointmentReference | string | Oui | Référence de l'Appointment |
customerReference | string | Oui | Référence du Customer |
state | string | Oui | RESERVED, REQUESTED, BOOKED, CANCELED, DELETED |
message | string | Non | Message dans l'e-mail au Customer |
Update Participation
Modifie le statut d'une Participation.
curl -X POST "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/participations/part-002@yourCrm?sendMails=true" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"state": "CANCELED",
"message": "Leider müssen wir Ihren Termin stornieren."
}'
Transitions d'état avec envoi d'e-mail
| Transition | E-mail ? |
|---|---|
| RESERVED → BOOKED | ✓ Oui |
| REQUESTED → BOOKED | ✓ Oui |
| REQUESTED → CANCELED | ✓ Oui |
| BOOKED → CANCELED | ✓ Oui |
| RESERVED → CANCELED | ✗ Non |
| DELETED → CANCELED | ✗ Non |
| BOOKED → DELETED | ✗ Non (!) |
Transitions non prises en charge
Customers (Clients)
Les Customers sont des personnes qui réservent des rendez-vous. Ils appartiennent à un fournisseur et peuvent participer à plusieurs Appointments.
Get Customer
Récupère un Customer à partir de sa référence.
curl -X GET "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/customers/cust-001@yourCrm" \
-H "X-TIMUM-CLIENT-ID: your-api-key"
Response
{
"api-info": {
"version": "1"
},
"customer": {
"customerReference": "cust-001@yourCrm",
"email": "kunde@example.com",
"note": "Interessiert an 3-Zimmer-Wohnungen",
"userName": "Max Kunde",
"mobile": "+49 170 9876543",
"language": "de",
"providerReference": "prov-001@yourCrm"
}
}
Status Codes
| Code | Signification |
|---|---|
200 | Customer trouvé |
204 | Aucun Customer trouvé avec cette référence |
Create Customer
Crée un nouveau Customer pour un fournisseur.
curl -X POST "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/customers" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"customerReference": "cust-001@yourCrm",
"providerReference": "prov-001@yourCrm",
"userName": "Max Kunde",
"email": "kunde@example.com",
"mobile": "+49 170 9876543",
"note": "Interessiert an 3-Zimmer-Wohnungen",
"language": "de"
}'
Request Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
customerReference | string | Oui | Référence Customer unique |
providerReference | string | Oui | Référence du fournisseur |
userName | string | Oui | Nom du client |
email | string | Non | Adresse e-mail |
mobile | string | Non | Numéro de mobile (avec indicatif du pays) |
note | string | Non | Note interne (1023 caractères max.) |
language | string | Non | Code de langue (de, en, etc.) |
Status Codes
| Code | Signification |
|---|---|
201 | Nouveau Customer créé |
200 | Le Customer existe déjà |
Update Customer
Met à jour un Customer existant.
curl -X PUT "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/customers/cust-001@yourCrm" \
-H "X-TIMUM-CLIENT-ID: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"customerReference": "cust-001-new@yourCrm",
"email": "neue-email@example.com",
"userName": "Max Neukunde",
"mobile": "+49 170 1111111",
"note": "Aktualisierte Notiz"
}'
Modifier la référence
Delete Customer
Supprime un Customer.
curl -X DELETE "https://www.timum.de/crms/{crmId}/provider/prov-001@yourCrm/customers/cust-001@yourCrm?ignoreFutureAppointments" \
-H "X-TIMUM-CLIENT-ID: your-api-key"
Paramètres de requête
| Paramètre | Description |
|---|---|
ignoreFutureAppointments | Si défini : supprime le Customer de tous les Appointments à venir. Le Customer est notifié par e-mail (si configuré). |
Appointments à venir
RGPD
Étapes suivantes
- Booking Flow - Endpoints orientés consommateur pour les réservations
