# I run a hotel

_Yes: booking confirmed, room ready, room service by list with the room number, and "order on its way", with the API._

Keywords: hotel, room booking, room ready, room service, front desk, stay, hotel guest, check-in, guesthouse

## What you can automate

| Need | How | Recipe |
|---|---|---|
| Booking confirmed | Outside 24 h (booked by phone or at the desk): `reservation_confirmee` template. Within 24 h: free text. | [Write the first message](https://console.geskap.com/docs/ecrire-premier-message?lang=en) · [Reply in free text](https://console.geskap.com/docs/repondre-texte-libre?lang=en) |
| Room ready | `chambre_prete` template with two buttons (Room service, Practical info): the guest often arrives more than 24 h after booking. | [Template buttons](https://console.geskap.com/docs/boutons-template-reponse-rapide?lang=en) · [On-site arrival notification](https://console.geskap.com/docs/notification-arrivee-sur-place?lang=en) |
| Room service: dishes and room number | Within 24 h: a list of dishes (10 rows), then the room number asked as free text, then confirmation. | [List menu](https://console.geskap.com/docs/menu-liste?lang=en) · [Step-by-step form](https://console.geskap.com/docs/formulaire-pas-a-pas?lang=en) · [Reply in free text](https://console.geskap.com/docs/repondre-texte-libre?lang=en) |
| Order on its way | Within 24 h, free text. If the order was taken by phone: `commande_en_route` template. | [Reply in free text](https://console.geskap.com/docs/repondre-texte-libre?lang=en) · [Delivery status](https://console.geskap.com/docs/statut-livraison-backoffice?lang=en) |
| Practical questions (Wi-Fi, hours, pool) | FAQ first, then AI, then the front desk as a last resort. | [FAQ, AI, human](https://console.geskap.com/docs/faq-ia-humain?lang=en) |

Outside the 24 h that follow the customer's last message, only a Meta-approved template can be sent. Within 24 h you compose freely: buttons (3, 20 characters at most), a list (10 rows of 24 characters at most) or free text.

## Templates to create

| Name | Category | Text | Buttons |
|---|---|---|---|
| `reservation_confirmee` | UTILITY | Hello {{1}}, your booking {{2}} at Hotel Exemple is confirmed: {{3}} room, arrival on {{4}} from 2 pm. Total: {{5}}, payable on site. | quick reply: « Practical info » |
| `chambre_prete` | UTILITY | Hello {{1}}, your room no. {{2}} is ready. Please come to the front desk with your ID. We wish you a pleasant stay. | quick reply: « Room service », « Practical info » |
| `commande_en_route` | UTILITY | Hello, your order {{1}} is on its way to room {{2}}. Enjoy your meal! | — |

## Full example

"Room ready" notification, with two quick-reply buttons. Creation, once.

```bash
# curl
curl -X POST "https://wa-api.geskap.com/v1/templates" \
  -H "Authorization: Bearer $GESKAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "chambre_prete",
  "language": "en",
  "category": "UTILITY",
  "body_text": "Hello {{1}}, your room no. {{2}} is ready. Please come to the front desk with your ID. We wish you a pleasant stay.",
  "example_values": ["Awa", "204"],
  "buttons": [
    { "kind": "quick_reply", "text": "Room service" },
    { "kind": "quick_reply", "text": "Practical info" }
  ]
}'
```

```js
// Node.js
const res = await fetch("https://wa-api.geskap.com/v1/templates", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.GESKAP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "chambre_prete",
    "language": "en",
    "category": "UTILITY",
    "body_text": "Hello {{1}}, your room no. {{2}} is ready. Please come to the front desk with your ID. We wish you a pleasant stay.",
    "example_values": ["Awa", "204"],
    "buttons": [
      { "kind": "quick_reply", "text": "Room service" },
      { "kind": "quick_reply", "text": "Practical info" }
    ]
  }),
});
console.log(res.status, await res.json());
```

```php
// PHP
$ch = curl_init("https://wa-api.geskap.com/v1/templates");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("GESKAP_API_KEY"),
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "name" => "chambre_prete",
    "language" => "en",
    "category" => "UTILITY",
    "body_text" => "Hello {{1}}, your room no. {{2}} is ready. Please come to the front desk with your ID. We wish you a pleasant stay.",
    "example_values" => ["Awa", "204"],
    "buttons" => [
      ["kind" => "quick_reply", "text" => "Room service"],
      ["kind" => "quick_reply", "text" => "Practical info"],
    ],
  ]),
]);
$res = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $res;
```

```python
# Python
import os, requests

res = requests.request(
    "POST",
    "https://wa-api.geskap.com/v1/templates",
    headers={"Authorization": f"Bearer {os.environ['GESKAP_API_KEY']}"},
    json={
        "name": "chambre_prete",
        "language": "en",
        "category": "UTILITY",
        "body_text": "Hello {{1}}, your room no. {{2}} is ready. Please come to the front desk with your ID. We wish you a pleasant stay.",
        "example_values": ["Awa", "204"],
        "buttons": [
            {"kind": "quick_reply", "text": "Room service"},
            {"kind": "quick_reply", "text": "Practical info"},
        ],
    },
    timeout=15,
)
print(res.status_code, res.json())
```

Send it when the front desk releases the room, even if the guest has not written to you for days.

```bash
# curl
curl -X POST "https://wa-api.geskap.com/v1/messages" \
  -H "Authorization: Bearer $GESKAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "+237690000012",
  "template": {
    "name": "chambre_prete",
    "language": "en",
    "variables": ["Awa", "204"]
  }
}'
```

```js
// Node.js
const res = await fetch("https://wa-api.geskap.com/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.GESKAP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "+237690000012",
    "template": {
      "name": "chambre_prete",
      "language": "en",
      "variables": ["Awa", "204"]
    }
  }),
});
console.log(res.status, await res.json());
```

```php
// PHP
$ch = curl_init("https://wa-api.geskap.com/v1/messages");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("GESKAP_API_KEY"),
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "to" => "+237690000012",
    "template" => [
      "name" => "chambre_prete",
      "language" => "en",
      "variables" => ["Awa", "204"],
    ],
  ]),
]);
$res = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $res;
```

```python
# Python
import os, requests

res = requests.request(
    "POST",
    "https://wa-api.geskap.com/v1/messages",
    headers={"Authorization": f"Bearer {os.environ['GESKAP_API_KEY']}"},
    json={
        "to": "+237690000012",
        "template": {
            "name": "chambre_prete",
            "language": "en",
            "variables": ["Awa", "204"],
        },
    },
    timeout=15,
)
print(res.status_code, res.json())
```

## Conversation

```text
Guest  : Hello, I'd like to order food
Hotel  : Which dish would you like?  [ See the menu ]  (list: Chicken DG, Ndolé, Club sandwich…)
Guest  : (picks "Chicken DG")
Webhook: message.inbound  type=text  text="Chicken DG"  button_id="plat:poulet_dg"
Hotel  : What is your room number?
Guest  : 204
Hotel  : Order CMD-0031: Chicken DG, room 204. The kitchen is preparing your order.
         [ Menu ]
```

See [List menu](https://console.geskap.com/docs/menu-liste?lang=en) for the list, [Quick-reply buttons](https://console.geskap.com/docs/boutons-reponse-rapide?lang=en) for the confirmation and [Get the tap](https://console.geskap.com/docs/recuperer-le-clic?lang=en) to read the chosen dish.

> **Pitfall:** A guest who orders has written to you: within 24 h, no template. But "room ready" almost always comes after the window: plan the template, or the send returns `400`.

> **Pitfall:** A list holds 10 rows of 24 characters: put the price in the row description, not in its title, and split a menu of more than 10 dishes into several lists (starters, mains, drinks).

_Proof — verified in the API source: api_schemas.py ; applied by the WhatsApp demo: hotel._

---

# Je suis un hôtel

_Oui : réservation confirmée, chambre prête, room service par liste avec numéro de chambre et « commande en route », avec l'API._

Mots-clés: hôtel, réservation chambre, chambre prête, room service, réception, séjour, client hôtel, check-in, auberge

## Ce que vous pouvez automatiser

| Besoin | Comment | Recette |
|---|---|---|
| Réservation confirmée | Hors 24 h (réservation faite par téléphone ou sur place) : template `reservation_confirmee`. Dans les 24 h : texte libre. | [Écrire le premier message](https://console.geskap.com/docs/ecrire-premier-message) · [Répondre en texte libre](https://console.geskap.com/docs/repondre-texte-libre) |
| Chambre prête | Template `chambre_prete` avec deux boutons (Room service, Infos pratiques) : le client arrive souvent plus de 24 h après sa réservation. | [Boutons de template](https://console.geskap.com/docs/boutons-template-reponse-rapide) · [Notification d'arrivée sur place](https://console.geskap.com/docs/notification-arrivee-sur-place) |
| Room service : plats et numéro de chambre | Dans les 24 h : liste des plats (10 lignes), puis question du numéro de chambre en texte libre, puis confirmation. | [Menu en liste](https://console.geskap.com/docs/menu-liste) · [Formulaire pas à pas](https://console.geskap.com/docs/formulaire-pas-a-pas) · [Répondre en texte libre](https://console.geskap.com/docs/repondre-texte-libre) |
| Commande en route | Dans les 24 h, texte libre. Si la commande a été prise par téléphone : template `commande_en_route`. | [Répondre en texte libre](https://console.geskap.com/docs/repondre-texte-libre) · [Statut de livraison](https://console.geskap.com/docs/statut-livraison-backoffice) |
| Questions pratiques (Wi-Fi, horaires, piscine) | FAQ d'abord, IA ensuite, réception en dernier recours. | [FAQ, IA, humain](https://console.geskap.com/docs/faq-ia-humain) |

Hors des 24 h qui suivent le dernier message du client, seul un template approuvé par Meta peut partir. Dans les 24 h, vous composez librement : boutons (3 de 20 caractères au plus), liste (10 lignes de 24 caractères au plus) ou texte libre.

## Les templates à créer

| Nom | Catégorie | Texte | Boutons |
|---|---|---|---|
| `reservation_confirmee` | UTILITY | Bonjour {{1}}, votre réservation {{2}} à l'Hôtel Exemple est confirmée : chambre {{3}}, arrivée le {{4}} dès 14h. Total : {{5}}, payable sur place. | réponse rapide : « Infos pratiques » |
| `chambre_prete` | UTILITY | Bonjour {{1}}, votre chambre n° {{2}} est prête. Présentez-vous à la réception avec votre pièce d'identité. Nous vous souhaitons un agréable séjour. | réponse rapide : « Room service », « Infos pratiques » |
| `commande_en_route` | UTILITY | Bonjour, votre commande {{1}} est en route vers la chambre {{2}}. Bon appétit ! | — |

## Exemple complet

Notification « chambre prête », avec deux boutons de réponse rapide. Création, une seule fois.

```bash
# curl
curl -X POST "https://wa-api.geskap.com/v1/templates" \
  -H "Authorization: Bearer $GESKAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "chambre_prete",
  "language": "fr",
  "category": "UTILITY",
  "body_text": "Bonjour {{1}}, votre chambre n° {{2}} est prête. Présentez-vous à la réception avec votre pièce d'\''identité. Nous vous souhaitons un agréable séjour.",
  "example_values": ["Awa", "204"],
  "buttons": [
    { "kind": "quick_reply", "text": "Room service" },
    { "kind": "quick_reply", "text": "Infos pratiques" }
  ]
}'
```

```js
// Node.js
const res = await fetch("https://wa-api.geskap.com/v1/templates", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.GESKAP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "chambre_prete",
    "language": "fr",
    "category": "UTILITY",
    "body_text": "Bonjour {{1}}, votre chambre n° {{2}} est prête. Présentez-vous à la réception avec votre pièce d'identité. Nous vous souhaitons un agréable séjour.",
    "example_values": ["Awa", "204"],
    "buttons": [
      { "kind": "quick_reply", "text": "Room service" },
      { "kind": "quick_reply", "text": "Infos pratiques" }
    ]
  }),
});
console.log(res.status, await res.json());
```

```php
// PHP
$ch = curl_init("https://wa-api.geskap.com/v1/templates");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("GESKAP_API_KEY"),
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "name" => "chambre_prete",
    "language" => "fr",
    "category" => "UTILITY",
    "body_text" => "Bonjour {{1}}, votre chambre n° {{2}} est prête. Présentez-vous à la réception avec votre pièce d'identité. Nous vous souhaitons un agréable séjour.",
    "example_values" => ["Awa", "204"],
    "buttons" => [
      ["kind" => "quick_reply", "text" => "Room service"],
      ["kind" => "quick_reply", "text" => "Infos pratiques"],
    ],
  ]),
]);
$res = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $res;
```

```python
# Python
import os, requests

res = requests.request(
    "POST",
    "https://wa-api.geskap.com/v1/templates",
    headers={"Authorization": f"Bearer {os.environ['GESKAP_API_KEY']}"},
    json={
        "name": "chambre_prete",
        "language": "fr",
        "category": "UTILITY",
        "body_text": "Bonjour {{1}}, votre chambre n° {{2}} est prête. Présentez-vous à la réception avec votre pièce d'identité. Nous vous souhaitons un agréable séjour.",
        "example_values": ["Awa", "204"],
        "buttons": [
            {"kind": "quick_reply", "text": "Room service"},
            {"kind": "quick_reply", "text": "Infos pratiques"},
        ],
    },
    timeout=15,
)
print(res.status_code, res.json())
```

Envoi quand la réception libère la chambre, même si le client ne vous a pas écrit depuis des jours.

```bash
# curl
curl -X POST "https://wa-api.geskap.com/v1/messages" \
  -H "Authorization: Bearer $GESKAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "+237690000012",
  "template": {
    "name": "chambre_prete",
    "language": "fr",
    "variables": ["Awa", "204"]
  }
}'
```

```js
// Node.js
const res = await fetch("https://wa-api.geskap.com/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.GESKAP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "+237690000012",
    "template": {
      "name": "chambre_prete",
      "language": "fr",
      "variables": ["Awa", "204"]
    }
  }),
});
console.log(res.status, await res.json());
```

```php
// PHP
$ch = curl_init("https://wa-api.geskap.com/v1/messages");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("GESKAP_API_KEY"),
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "to" => "+237690000012",
    "template" => [
      "name" => "chambre_prete",
      "language" => "fr",
      "variables" => ["Awa", "204"],
    ],
  ]),
]);
$res = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $res;
```

```python
# Python
import os, requests

res = requests.request(
    "POST",
    "https://wa-api.geskap.com/v1/messages",
    headers={"Authorization": f"Bearer {os.environ['GESKAP_API_KEY']}"},
    json={
        "to": "+237690000012",
        "template": {
            "name": "chambre_prete",
            "language": "fr",
            "variables": ["Awa", "204"],
        },
    },
    timeout=15,
)
print(res.status_code, res.json())
```

## Conversation

```text
Client  : Bonjour, je voudrais commander à manger
Hôtel   : Quel plat souhaitez-vous ?  [ Voir le menu ]  (liste : Poulet DG, Ndolé, Club sandwich…)
Client  : (choisit « Poulet DG »)
Webhook : message.inbound  type=text  text="Poulet DG"  button_id="plat:poulet_dg"
Hôtel   : Quel est votre numéro de chambre ?
Client  : 204
Hôtel   : Commande CMD-0031 : Poulet DG, chambre 204. La cuisine prépare votre commande.
          [ Menu ]
```

Voir [Menu en liste](https://console.geskap.com/docs/menu-liste) pour la liste, [Boutons de réponse rapide](https://console.geskap.com/docs/boutons-reponse-rapide) pour la confirmation et [Récupérer le clic](https://console.geskap.com/docs/recuperer-le-clic) pour lire le plat choisi.

> **Piège :** Le client qui commande vous a écrit : dans les 24 h, aucun template. Mais « chambre prête » arrive presque toujours après la fenêtre : prévoyez le template, sinon l'envoi répond `400`.

> **Piège :** Une liste tient 10 lignes de 24 caractères : mettez le prix dans la description de la ligne, pas dans son titre, et découpez une carte de plus de 10 plats en plusieurs listes (entrées, plats, boissons).

_Preuve — vérifié dans le code de l'API : api_schemas.py ; appliqué par la démo WhatsApp : hotel._

Support: WhatsApp +237 6 56 09 88 31 · All recipes: https://wa-api.geskap.com/llms.txt
