> For the complete documentation index, see [llms.txt](https://doc.born-to-web.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.born-to-web.com/api-integration.md).

# Api / Integration

## 🔌 Intégrations API

> Liste des API et services externes à intégrer pour garantir le paiement sécurisé, la géolocalisation, la communication automatisée et le support temps réel de la plateforme.

***

### 💳 Paiements sécurisés

#### 🎯 Objectif

Proposer plusieurs méthodes de paiement sécurisées (CB, Apple Pay, Google Pay, PayPal), multi-devise, conformes RGPD, favorisant la rapidité de règlement après intervention.

| API          | Utilisation                          | Description                 | Statut             |
| ------------ | ------------------------------------ | --------------------------- | ------------------ |
| **VISA API** | Transactions B2B                     | Optionnelle, phase 2        | Prioritaire        |
| **PayPal**   | Paiements internationaux             | Alternatif populaire        | Intégration prévue |
| **Stripe**   | Paiement CB / Apple Pay / Google Pay | Paiement sécurisé principal | Intégration prévue |

🧩 **Automatisations liées :**

* Génération de facture PDF automatique après paiement
* Archivage -> 24 mois max
* Email de confirmation via Gmail API

***

### 📍 Géolocalisation & Logistique

#### 📦 Objectif

Permettre la localisation précise des clients/pros, déterminer les zones d’intervention, évaluer temps/distance de déplacement.

| API                 | Utilisation                                                   |
| ------------------- | ------------------------------------------------------------- |
| **Google Maps API** | Calcul de distance, affichage plans/itinéraires en temps réel |

***

### ✉️ Communication et Emails

#### 📧 Objectif

Assurer une communication fluide, traçabilité des échanges et notifications réactives :

| API                   | Utilisation                                                 |
| --------------------- | ----------------------------------------------------------- |
| **Gmail API**         | Envoi d’emails transactionnels                              |
| **SMTP fallback**     | Sauvegarde mail standard                                    |
| Notifications clients | confirmation demande, suivi intervention, résolution litige |
| Notification pros     | nouvelle sollicitation, changement RDV                      |
| Support               | création ticket, retour enquête satisfaction                |

📬 **Cas d’usage :**

* Confirmation de commande
* Réinitialisation de mot de passe
* Notification pro (nouvelle commande, litige)
* Ticket support client

***

### 🧾 Facturation et Archivage

| API / Service  | Utilisation                    | Description                      |
| -------------- | ------------------------------ | -------------------------------- |
| **Make / n8n** | Automatisations documentaires  | Factures, bons, rapports         |
| **OVH?**       | Archivage des fichiers générés | Structure hiérarchique organisée |

📂 **Nommage standardisé :**&#x20;

```
CLIENT_TYPE_DATE.type
ex : ALLODEPANNE_FAC_2025-05-26.pdf
```

***

### 🤖 Automatisations IA

> Déploiement de modules IA pour le support et la gestion intelligente des demandes/interventions, en particulier pour le chatbot côté client comme côté pro :

| Domaine                  | Description                                                     | Outil / API           |
| ------------------------ | --------------------------------------------------------------- | --------------------- |
| **Support client**       | Chatbot IA + transfert humain                                   | Développement interne |
| **Analyse des demandes** | détection de commandes suspectes (fraude), gestion priorisation | Développement Interne |

***

### 🔐 Authentification et Sécurité

| API               | Utilisation             | Description              |
| ----------------- | ----------------------- | ------------------------ |
| **Google OAuth2** | Connexion rapide Google | Authentification sociale |
| **Apple Sign-In** | Connexion sécurisée iOS | Authentification sociale |
| **2FA (TOTP)**    | Double authentification | Sécurité renforcée       |

***

### 🔁 Diagramme Fonctionnel

```
[Client] → [Front ReactNative.js] → [API Django REST]
         ↘︎ Stripe/PayPal (paiement)
          ↘︎ Gmail API (emails)
           ↘︎ OVH (fichiers)
            ↘︎ Make (automatisations)
             ↘︎ Google Api (intervention)
```

| Catégorie      | Outils principaux      | Phase   |
| -------------- | ---------------------- | ------- |
| Paiement       | VISA / PayPal / Stripe | Phase 1 |
| Intervention   | ChronoPost             | Phase 1 |
| Emails         | Gmail API              | Phase 1 |
| Archivage      | OVH / Make             | Phase 1 |
| Support client | Chatbot interne / Make | Phase 2 |
