Documentation

Demarrage rapide

De zero a votre premier appel API en 5 minutes.

1

Creer un compte

Inscrivez-vous sur SalonHub pour obtenir un compte. Vous beneficiez automatiquement de 14 jours d'essai gratuit avec acces complet a l'API.

cURL
curl -X POST https://api.salonhub.app/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "salon_name": "Mon Salon",
    "salon_email": "contact@monsalon.fr",
    "first_name": "Marie",
    "last_name": "Dupont",
    "email": "marie@monsalon.fr",
    "password": "motdepasse123"
  }'
Reponse : Vous recevrez un token JWT et les informations de votre salon (tenant).
2

Obtenir une cle API

Les cles API sont disponibles pendant la periode d'essai (14 jours), puis necessitent un plan Developer (14,99/mois) ou Custom.

cURL
# Utilisez votre token JWT pour creer une cle API
curl -X POST https://api.salonhub.app/api/api-keys \
  -H "Authorization: Bearer VOTRE_TOKEN_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mon integration",
    "scopes": ["clients:read", "appointments:read", "appointments:write"]
  }'
Important : La cle complete (sk_live_...) n'est affichee qu'une seule fois. Copiez-la immediatement !
3

Premier appel API

Utilisez votre cle API pour interroger l'API SalonHub.

cURL
curl https://api.salonhub.app/api/clients \
  -H "Authorization: Bearer sk_live_votre_cle_api"
JSON Response
{
  "success": true,
  "data": [
    {
      "id": 1,
      "first_name": "Sophie",
      "last_name": "Martin",
      "email": "sophie@email.com",
      "phone": "+33612345678"
    }
  ],
  "pagination": {
    "total": 42,
    "limit": 50,
    "offset": 0,
    "hasMore": false
  }
}
4

Authentification

SalonHub supporte deux methodes d'authentification :

Header : Les deux methodes utilisent le meme header Authorization: Bearer <token>. Le backend detecte automatiquement le type.
5

Concepts cles