{"openapi":"3.1.0","info":{"title":"API Annuaire & Menu Pro","version":"1.0.0","description":"Documentation interactive (type Swagger) de l'API.\n\n**Annuaire** (grand public) : consultation, recherche, géolocalisation, avis, partage.\n\n**Menu Pro** (commerçant) : création de la fiche établissement en 6 étapes, soumission (validation 48h), statistiques.\n\nTous les champs, filtres et exemples sont calqués sur les écrans fournis (résultats « 395 », note « 4.5/5 », « De 8.500 à 30.000FCFA », « Ouvert jusqu'à 23:00 », etc.).\n\n\uD83D\uDD12 = authentification requise (jeton Bearer)."},"servers":[{"url":"https://api.exemple.com/api/v1","description":"Production (à adapter)"}],"tags":[{"name":"Référentiels","description":"Listes de référence : univers, catégories, villes, communes, paiements, services."},{"name":"Annuaire","description":"Côté grand public : trouver, consulter, noter, partager."},{"name":"Menu Pro · Compte","description":"Connexion et compte commerçant."},{"name":"Menu Pro · Établissement","description":"Création/édition de la fiche (wizard 6 étapes) + photos."},{"name":"Menu Pro · Statistiques","description":"Note globale et fréquentation."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"Le champ téléphone est requis."},"fields":{"type":"object","additionalProperties":{"type":"string"},"example":{"phone":"requis"}}}}}},"PaginationMeta":{"type":"object","description":"Métadonnées de pagination. `total` alimente le « 395 résultats ».","properties":{"page":{"type":"integer","example":1},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":395},"total_pages":{"type":"integer","example":20}}},"Universe":{"type":"object","description":"Onglet d'accueil (Manger / Shopping / Services / Santé).","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Manger"},"slug":{"type":"string","example":"manger"},"icon":{"type":"string","nullable":true,"example":"\uD83C\uDF7D️"},"position":{"type":"integer","example":0}}},"Category":{"type":"object","description":"Élément de la taxonomie. 4 niveaux : universe → domain → sector → type.","properties":{"id":{"type":"integer","example":12},"parent_id":{"type":"integer","nullable":true,"example":3},"level":{"type":"string","enum":["universe","domain","sector","type"],"example":"sector"},"name":{"type":"string","example":"Street-food"},"slug":{"type":"string","example":"street-food"},"description":{"type":"string","nullable":true,"example":"Restauration traditionnelle, Maquis & grillades, Fast-food, Pizzerias…"},"icon":{"type":"string","nullable":true,"example":"\uD83C\uDF2D"},"position":{"type":"integer","example":3}}},"City":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Abidjan"},"slug":{"type":"string","example":"abidjan"},"position":{"type":"integer","example":0}}},"Commune":{"type":"object","properties":{"id":{"type":"integer","example":4},"city_id":{"type":"integer","example":1},"name":{"type":"string","example":"Cocody"},"slug":{"type":"string","example":"cocody"},"position":{"type":"integer","example":3}}},"PaymentMethod":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Mobile Money","description":"Mobile Money | Carte bancaire | Espèces | Apple Pay"},"slug":{"type":"string","example":"mobile-money"},"icon":{"type":"string","nullable":true,"example":"\uD83D\uDCF1"}}},"Amenity":{"type":"object","description":"Service disponible (catalogue de la fenêtre « Services »).","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Wi-Fi gratuit","description":"Wi-Fi gratuit, Vente à emporter, Climatisation, Parking privé ou surveillé, Zone fumeur/non-fumeur, Télévision/retransmission de matchs, Jeux de société/espace détente, Organisation d'anniversaires, Réservations de groupe/privatisation, Service chauffeur/navette…"},"slug":{"type":"string","example":"wifi-gratuit"},"icon":{"type":"string","nullable":true,"example":"\uD83D\uDCF6"},"position":{"type":"integer","example":0}}},"Photo":{"type":"object","properties":{"id":{"type":"integer","example":1},"url":{"type":"string","format":"uri","example":"https://cdn.app.com/etab/7/principale.jpg"},"position":{"type":"integer","example":0,"description":"0 à 5"},"is_primary":{"type":"boolean","example":true}}},"EstablishmentListItem":{"type":"object","description":"Cellule de la liste de résultats (« Le Rivoli — Abidjan - Cocody - Riviera 3 »).","properties":{"id":{"type":"integer","example":12},"name":{"type":"string","example":"Le Rivoli"},"logo_url":{"type":"string","format":"uri","nullable":true},"cover_url":{"type":"string","format":"uri","nullable":true},"address_label":{"type":"string","example":"Abidjan - Cocody - Riviera 3"},"city":{"type":"string","example":"Abidjan"},"commune":{"type":"string","example":"Cocody"},"quartier":{"type":"string","nullable":true,"example":"Riviera 3"},"domain":{"type":"string","example":"Restaurants"},"avg_rating":{"type":"number","format":"float","example":4.5},"review_count":{"type":"integer","example":49},"distance_km":{"type":"number","format":"float","nullable":true,"example":3.2,"description":"Calculé. Affiché « 600m » / « 11,2 km »."},"is_open_now":{"type":"boolean","example":true},"open_until":{"type":"string","nullable":true,"example":"23:00"}}},"EstablishmentDetail":{"type":"object","description":"Fiche détail (écran « Privé de dessert »).","properties":{"id":{"type":"integer","example":7},"name":{"type":"string","example":"Privé de dessert"},"logo_url":{"type":"string","format":"uri","nullable":true},"domain":{"type":"string","example":"Restauration & Boissons"},"address_label":{"type":"string","example":"Cocody"},"city":{"type":"string","example":"Abidjan"},"commune":{"type":"string","example":"Cocody"},"quartier":{"type":"string","nullable":true,"example":"Riviera 3"},"latitude":{"type":"number","nullable":true,"example":5.3599},"longitude":{"type":"number","nullable":true,"example":-3.992},"distance_km":{"type":"number","format":"float","nullable":true,"example":11.2},"phone":{"type":"string","example":"+2250595768663","description":"Bouton « Appeler »."},"share_slug":{"type":"string","example":"TGxKkBC6L2k"},"avg_rating":{"type":"number","format":"float","example":4.0},"rating_count":{"type":"integer","example":9356},"review_count":{"type":"integer","example":49},"is_open_now":{"type":"boolean","example":true},"open_until":{"type":"string","nullable":true,"example":"23h"},"photos":{"type":"array","items":{"$ref":"#/components/schemas/Photo"}},"actions":{"type":"object","description":"Rail latéral droit de la fiche.","properties":{"has_horaires":{"type":"boolean","example":true},"has_tarifs":{"type":"boolean","example":true},"has_events":{"type":"boolean","example":true},"has_services":{"type":"boolean","example":true}}}}},"OpeningHourEntry":{"type":"object","properties":{"day_of_week":{"type":"integer","minimum":0,"maximum":6,"example":0,"description":"0 = Lundi … 6 = Dimanche"},"opens_at":{"type":"string","nullable":true,"example":"10:00"},"closes_at":{"type":"string","nullable":true,"example":"23:00"},"is_closed":{"type":"boolean","example":false}}},"SpecialNote":{"type":"object","description":"Carte jaune des horaires (« Happy hour », « Sur réservation les week-end »).","properties":{"id":{"type":"integer","example":1},"type":{"type":"string","enum":["happy_hour","reservation","promo","info"],"example":"happy_hour"},"title":{"type":"string","example":"Happy hour"},"time_start":{"type":"string","nullable":true,"example":"16:00"},"time_end":{"type":"string","nullable":true,"example":"19:00"},"day_scope":{"type":"string","nullable":true,"example":"week-end"},"icon":{"type":"string","nullable":true,"example":"☕"},"body":{"type":"string","nullable":true,"example":"Un soda acheté, un soda offert"}}},"OpeningHoursResponse":{"type":"object","description":"Fenêtre Horaires (calendrier + statut du jour + notes).","properties":{"today":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-05-21"},"weekday":{"type":"string","example":"Jeu"},"is_open":{"type":"boolean","example":true},"open_until":{"type":"string","nullable":true,"example":"23:00"},"status_label":{"type":"string","example":"Ouvert jusqu'à 23:00"}}},"week":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-05-18"},"weekday":{"type":"string","example":"Lun"},"is_closed":{"type":"boolean","example":false},"opens_at":{"type":"string","nullable":true,"example":"10:00"},"closes_at":{"type":"string","nullable":true,"example":"23:00"},"has_note":{"type":"boolean","example":false}}}},"regular":{"type":"array","items":{"$ref":"#/components/schemas/OpeningHourEntry"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/SpecialNote"}}}},"PricingResponse":{"type":"object","description":"Fenêtre Tarifs.","properties":{"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"price_min":{"type":"integer","nullable":true,"example":8500},"price_max":{"type":"integer","nullable":true,"example":30000},"currency":{"type":"string","example":"XOF"},"price_range_label":{"type":"string","example":"De 8.500 à 30.000FCFA"},"pricing_type":{"type":"string","nullable":true,"example":"À la carte"},"price_note":{"type":"string","nullable":true,"example":"Nos prix varient selon les plats, les portions et les formules choisies, notre carte de menus est renouvelée tous les mois."}}},"ServicesResponse":{"type":"object","description":"Fenêtre Services.","properties":{"reservation_policy":{"type":"string","nullable":true,"example":"Les réservations se font au moins 2 heures à l'avance. Un acompte de 20 % peut être demandé pour les groupes de plus de 6 personnes…"},"cancellation_policy":{"type":"string","nullable":true,"example":"Toute annulation effectuée plus de 2 heures avant l'heure de réservation est gratuite…"},"amenities":{"type":"array","items":{"$ref":"#/components/schemas/Amenity"}},"custom_services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1},"label":{"type":"string","example":"Conciergerie"}}}}}},"ReviewSummary":{"type":"object","properties":{"review_count":{"type":"integer","example":49},"avg_rating":{"type":"number","format":"float","example":4.5},"rating_count":{"type":"integer","example":9356}}},"Review":{"type":"object","properties":{"id":{"type":"integer","example":1},"author":{"type":"object","properties":{"name":{"type":"string","example":"Booba"},"avatar_url":{"type":"string","format":"uri","nullable":true}}},"rating":{"type":"integer","minimum":1,"maximum":5,"example":4},"comment":{"type":"string","nullable":true,"example":"Lorem ipsum dolor sit amet…"},"created_at":{"type":"string","format":"date-time"}}},"ReviewListResponse":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/ReviewSummary"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"ReviewCreate":{"type":"object","required":["rating"],"description":"Écran « Noter » : note sur 5 + commentaire facultatif.","properties":{"rating":{"type":"integer","minimum":1,"maximum":5,"example":3},"comment":{"type":"string","nullable":true,"example":"Très bonne ambiance."}}},"ReviewCreateResponse":{"type":"object","properties":{"id":{"type":"integer","example":50},"rating":{"type":"integer","example":3},"comment":{"type":"string","nullable":true},"summary":{"$ref":"#/components/schemas/ReviewSummary"}}},"ShareResponse":{"type":"object","description":"Fenêtre Partager.","properties":{"share_url":{"type":"string","format":"uri","example":"https://miqqie.com/TGxKkBC6L2k"},"share_slug":{"type":"string","example":"TGxKkBC6L2k"},"channels":{"type":"array","items":{"type":"string"},"example":["whatsapp","twitter","facebook","instagram","yahoo","tiktok","chat","wechat"]}}},"VtcEstimate":{"type":"object","description":"Bouton « Prix du trajet VTC ».","properties":{"distance_km":{"type":"number","example":11.2},"duration_min":{"type":"integer","example":22},"price_min":{"type":"integer","example":2500},"price_max":{"type":"integer","example":4000},"currency":{"type":"string","example":"XOF"},"provider":{"type":"string","nullable":true,"example":"Yango"}}},"Comparison":{"type":"object","properties":{"id":{"type":"integer","example":1},"establishment":{"$ref":"#/components/schemas/EstablishmentListItem"},"added_at":{"type":"string","format":"date-time"}}},"ComparisonCreate":{"type":"object","required":["establishment_id"],"properties":{"establishment_id":{"type":"integer","example":12}}},"Notification":{"type":"object","properties":{"id":{"type":"integer","example":1},"type":{"type":"string","example":"info"},"title":{"type":"string","example":"Nouvel avis sur votre établissement"},"body":{"type":"string","nullable":true},"read":{"type":"boolean","example":false},"created_at":{"type":"string","format":"date-time"}}},"LoginRequest":{"type":"object","required":["phone","password"],"properties":{"phone":{"type":"string","example":"0595768663"},"password":{"type":"string","format":"password","example":"••••••••"}}},"ProAccount":{"type":"object","description":"En-tête du menu Pro (« BÜCHERON »).","properties":{"id":{"type":"integer","example":1},"display_name":{"type":"string","example":"BÛCHERON"},"phone":{"type":"string","example":"05 95 768 663"},"logo_url":{"type":"string","format":"uri","nullable":true},"mode":{"type":"string","enum":["pro","particulier"],"example":"pro"}}},"LoginResponse":{"type":"object","properties":{"token":{"type":"string","example":"eyJhbGciOi..."},"account":{"$ref":"#/components/schemas/ProAccount"}}},"ModeUpdate":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["pro","particulier"],"example":"particulier"}}},"ProEstablishmentListItem":{"type":"object","properties":{"id":{"type":"integer","example":7},"name":{"type":"string","example":"BÛCHERON"},"logo_url":{"type":"string","format":"uri","nullable":true},"status":{"type":"string","enum":["draft","pending_validation","published","rejected","suspended"],"example":"draft"},"completion_percent":{"type":"integer","example":60},"published_at":{"type":"string","format":"date-time","nullable":true}}},"EstablishmentCreate":{"type":"object","required":["name"],"description":"Création du brouillon (au minimum le nom).","properties":{"name":{"type":"string","example":"BÛCHERON"}}},"ActivityUpdate":{"type":"object","required":["domain_id"],"description":"Étape 1 — Activité.","properties":{"domain_id":{"type":"integer","example":1,"description":"Domaine (Restauration & Boissons, Nightlife…)"},"sector_ids":{"type":"array","items":{"type":"integer"},"example":[12,15],"description":"Secteurs cochés (Street-food, Fast-food…)"},"type_ids":{"type":"array","items":{"type":"integer"},"example":[101,104],"description":"Types/spécialités (Porc braisé, Poulet braisé…)"}}},"InfoUpdate":{"type":"object","required":["name","city_id","commune_id","phone"],"description":"Étape 2 — Infos.","properties":{"name":{"type":"string","example":"BÛCHERON"},"latitude":{"type":"number","nullable":true,"example":5.3599},"longitude":{"type":"number","nullable":true,"example":-3.992},"city_id":{"type":"integer","example":1},"commune_id":{"type":"integer","example":4},"quartier":{"type":"string","nullable":true,"example":"Riviera 3"},"phone":{"type":"string","example":"+2250595768663","description":"Numéro de téléphone actif du commerce."}}},"PricingUpdate":{"type":"object","description":"Étape 3 — Tarifs (« Vos prix »).","properties":{"payment_method_ids":{"type":"array","items":{"type":"integer"},"example":[1,2,3,4]},"pricing_type":{"type":"string","nullable":true,"example":"À la carte"},"price_min":{"type":"integer","nullable":true,"example":8500},"price_max":{"type":"integer","nullable":true,"example":30000},"price_note":{"type":"string","nullable":true,"example":"Nos prix varient selon les plats…"}}},"OpeningHoursUpdate":{"type":"object","description":"Étape 4 — Horaires.","properties":{"hours":{"type":"array","items":{"$ref":"#/components/schemas/OpeningHourEntry"}},"closed_days":{"type":"array","items":{"type":"integer"},"example":[6],"description":"Jours de fermeture (0=Lun … 6=Dim)."},"notes":{"type":"array","items":{"$ref":"#/components/schemas/SpecialNote"},"description":"Notes particulières (facultatif)."}}},"ServicesUpdate":{"type":"object","description":"Étape 5 — Services.","properties":{"amenity_ids":{"type":"array","items":{"type":"integer"},"example":[1,3,5]},"custom_services":{"type":"array","items":{"type":"string"},"example":["Conciergerie","Parking voiturier"]},"reservation_policy":{"type":"string","nullable":true},"cancellation_policy":{"type":"string","nullable":true}}},"ContactUpdate":{"type":"object","required":["last_name","first_name","role","phone"],"description":"Étape 6 — Qui ? (Interlocuteur).","properties":{"last_name":{"type":"string","example":"Koffi"},"first_name":{"type":"string","example":"Jean"},"role":{"type":"string","enum":["owner","manager"],"example":"owner","description":"owner = Propriétaire, manager = Responsable"},"phone":{"type":"string","example":"+2250700000000"}}},"StepAck":{"type":"object","properties":{"id":{"type":"integer","example":7},"step":{"type":"string","example":"activity"},"completion_percent":{"type":"integer","example":17},"status":{"type":"string","example":"draft"}}},"SubmitResponse":{"type":"object","description":"Confirmation finale (« publiée après validation sous 48h »).","properties":{"status":{"type":"string","example":"pending_validation"},"message":{"type":"string","example":"Votre demande a été enregistrée. Publiée après validation sous 48h."},"submitted_at":{"type":"string","format":"date-time"}}},"Statistics":{"type":"object","description":"Écran Statistiques.","properties":{"global_score":{"type":"object","properties":{"value":{"type":"integer","example":7},"scale":{"type":"integer","example":10},"reviews_count":{"type":"integer","example":1958}}},"visits":{"type":"object","properties":{"period":{"type":"string","enum":["week","month"],"example":"week"},"current_label":{"type":"string","example":"1 106 visiteurs Lundi"},"total":{"type":"integer","example":50934},"series":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","example":"Lun"},"value":{"type":"integer","example":1106}}}},"y_axis":{"type":"array","items":{"type":"integer"},"example":[0,500,1000,5000,10000,20500,30000]}}},"locked_widgets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"demographics"},"status":{"type":"string","example":"coming_soon"}}}}}},"PhotoUpdate":{"type":"object","properties":{"position":{"type":"integer","example":2},"is_primary":{"type":"boolean","example":true}}}}},"paths":{"/universes":{"get":{"tags":["Référentiels"],"summary":"Lister les univers","description":"Onglets d'accueil : Manger, Shopping, Services, Santé.","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Universe"}}}}}}}},"/categories":{"get":{"tags":["Référentiels"],"summary":"Lister les catégories (taxonomie)","description":"Arbre Univers → Domaine → Secteur → Type. Alimente la feuille « Manger » (Garba, Alloco…), les chips « Secteur » et « Type ».","parameters":[{"name":"parent_id","in":"query","schema":{"type":"integer"}},{"name":"level","in":"query","schema":{"type":"string","enum":["universe","domain","sector","type"]}},{"name":"universe_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}}}}}}},"/cities":{"get":{"tags":["Référentiels"],"summary":"Lister les villes","description":"Abidjan, Bouaké, Yamoussoukro, San-pédro, Korhogo…","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/City"}}}}}}}},"/cities/{cityId}/communes":{"get":{"tags":["Référentiels"],"summary":"Lister les communes d'une ville","description":"Communes d'Abidjan : Abobo, Adjamé, Bingerville, Cocody, Koumassi, Marcory, Port-bouët, Treichville, Yopougon, Williamsville.","parameters":[{"name":"cityId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Commune"}}}}}}}},"/payment-methods":{"get":{"tags":["Référentiels"],"summary":"Lister les moyens de paiement","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}}}}}}}},"/amenities":{"get":{"tags":["Référentiels"],"summary":"Lister les services disponibles (catalogue)","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Amenity"}}}}}}}},"/establishments":{"get":{"tags":["Annuaire"],"summary":"Rechercher / lister les établissements","description":"Écran de résultats (« 395 résultats ») et listes filtrées. `meta.total` = nombre de résultats.","parameters":[{"name":"q","in":"query","description":"Mot recherché (barre « Versnissage »).","schema":{"type":"string"}},{"name":"universe_id","in":"query","schema":{"type":"integer"}},{"name":"domain_id","in":"query","schema":{"type":"integer"}},{"name":"sector_id","in":"query","schema":{"type":"integer"}},{"name":"type_id","in":"query","schema":{"type":"integer"}},{"name":"city_id","in":"query","schema":{"type":"integer"}},{"name":"commune_id","in":"query","schema":{"type":"integer"}},{"name":"distance_min_km","in":"query","description":"Curseur min (ex. 2).","schema":{"type":"number"}},{"name":"distance_max_km","in":"query","description":"Curseur max (ex. 16). Chips : 2-5, 5-10, 10-20 km.","schema":{"type":"number"}},{"name":"lat","in":"query","description":"Position utilisateur.","schema":{"type":"number"}},{"name":"lng","in":"query","schema":{"type":"number"}},{"name":"open_now","in":"query","description":"Toggle « Ouverts en ce moment ».","schema":{"type":"boolean"}},{"name":"around_me","in":"query","description":"Toggle « Autour de toi ».","schema":{"type":"boolean"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["distance","rating","popularity","recent"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EstablishmentListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}}},"/establishments/featured":{"get":{"tags":["Annuaire"],"summary":"Carrousel d'accueil (à la une)","description":"Grandes cartes du haut de l'accueil (« L'Hansel »).","parameters":[{"name":"universe_id","in":"query","schema":{"type":"integer"}},{"name":"lat","in":"query","schema":{"type":"number"}},{"name":"lng","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EstablishmentListItem"}}}}}}}},"/establishments/nearby":{"get":{"tags":["Annuaire"],"summary":"Établissements à proximité","description":"Section « Proches de ta position ».","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"}},{"name":"lng","in":"query","required":true,"schema":{"type":"number"}},{"name":"radius_km","in":"query","schema":{"type":"number","default":5}},{"name":"universe_id","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EstablishmentListItem"}}}}}}}},"/establishments/{id}":{"get":{"tags":["Annuaire"],"summary":"Fiche détail d'un établissement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDetail"}}}},"404":{"description":"Introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/establishments/by-slug/{shareSlug}":{"get":{"tags":["Annuaire"],"summary":"Résoudre un lien de partage","parameters":[{"name":"shareSlug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDetail"}}}},"404":{"description":"Lien invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/establishments/{id}/photos":{"get":{"tags":["Annuaire"],"summary":"Galerie photos","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Photo"}}}}}}}},"/establishments/{id}/opening-hours":{"get":{"tags":["Annuaire"],"summary":"Horaires (fenêtre Horaires)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"month","in":"query","schema":{"type":"string","example":"2026-05"}},{"name":"date","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHoursResponse"}}}}}}},"/establishments/{id}/notes":{"get":{"tags":["Annuaire"],"summary":"Notes spéciales (cartes jaunes)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpecialNote"}}}}}}}},"/establishments/{id}/pricing":{"get":{"tags":["Annuaire"],"summary":"Tarifs (fenêtre Tarifs)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}}}}},"/establishments/{id}/services":{"get":{"tags":["Annuaire"],"summary":"Services (fenêtre Services)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicesResponse"}}}}}}},"/establishments/{id}/reviews":{"get":{"tags":["Annuaire"],"summary":"Lister les avis (fenêtre Notes & avis)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["recent","top"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewListResponse"}}}}}},"post":{"tags":["Annuaire"],"summary":"Noter un établissement","security":[{"bearerAuth":[]}],"description":"Écran « Noter » → écran de remerciement.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCreate"}}}},"responses":{"201":{"description":"Avis créé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCreateResponse"}}}},"409":{"description":"L'utilisateur a déjà noté (utiliser PATCH)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reviews/{reviewId}":{"patch":{"tags":["Annuaire"],"summary":"Modifier son avis","security":[{"bearerAuth":[]}],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCreate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}}}},"delete":{"tags":["Annuaire"],"summary":"Supprimer son avis","security":[{"bearerAuth":[]}],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Supprimé"}}}},"/establishments/{id}/share":{"post":{"tags":["Annuaire"],"summary":"Générer / récupérer le lien de partage","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResponse"}}}}}}},"/establishments/{id}/vtc-estimate":{"get":{"tags":["Annuaire"],"summary":"Estimer le prix du trajet VTC","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"from_lat","in":"query","required":true,"schema":{"type":"number"}},{"name":"from_lng","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VtcEstimate"}}}}}}},"/comparisons":{"get":{"tags":["Annuaire"],"summary":"Lister les lieux comparés","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Comparison"}}}}}}},"post":{"tags":["Annuaire"],"summary":"Ajouter un lieu au comparatif","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonCreate"}}}},"responses":{"201":{"description":"Ajouté","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comparison"}}}}}}},"/comparisons/{establishmentId}":{"delete":{"tags":["Annuaire"],"summary":"Retirer un lieu du comparatif","security":[{"bearerAuth":[]}],"parameters":[{"name":"establishmentId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Retiré"}}}},"/notifications":{"get":{"tags":["Annuaire"],"summary":"Lister les notifications","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}}}}},"/pro/auth/login":{"post":{"tags":["Menu Pro · Compte"],"summary":"Se connecter","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"401":{"description":"Identifiants invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/auth/logout":{"post":{"tags":["Menu Pro · Compte"],"summary":"Se déconnecter","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Déconnecté"}}}},"/pro/me":{"get":{"tags":["Menu Pro · Compte"],"summary":"Voir son compte","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProAccount"}}}}}},"patch":{"tags":["Menu Pro · Compte"],"summary":"Modifier son compte","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProAccount"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProAccount"}}}}}}},"/pro/me/mode":{"patch":{"tags":["Menu Pro · Compte"],"summary":"Basculer Mode particulier","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModeUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModeUpdate"}}}}}}},"/pro/establishments":{"get":{"tags":["Menu Pro · Établissement"],"summary":"Lister ses établissements (« Mon établissement »)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProEstablishmentListItem"}}}}}}},"post":{"tags":["Menu Pro · Établissement"],"summary":"Créer une fiche (démarre le wizard)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentCreate"}}}},"responses":{"201":{"description":"Brouillon créé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProEstablishmentListItem"}}}}}}},"/pro/establishments/{id}":{"get":{"tags":["Menu Pro · Établissement"],"summary":"Récupérer une fiche en cours","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentDetail"}}}}}},"delete":{"tags":["Menu Pro · Établissement"],"summary":"Supprimer un brouillon","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Supprimé"}}}},"/pro/establishments/{id}/activity":{"put":{"tags":["Menu Pro · Établissement"],"summary":"Étape 1 — Activité","security":[{"bearerAuth":[]}],"description":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAck"}}}},"422":{"description":"Données invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/info":{"put":{"tags":["Menu Pro · Établissement"],"summary":"Étape 2 — Infos","security":[{"bearerAuth":[]}],"description":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAck"}}}},"422":{"description":"Données invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/pricing":{"put":{"tags":["Menu Pro · Établissement"],"summary":"Étape 3 — Tarifs","security":[{"bearerAuth":[]}],"description":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAck"}}}},"422":{"description":"Données invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/opening-hours":{"put":{"tags":["Menu Pro · Établissement"],"summary":"Étape 4 — Horaires","security":[{"bearerAuth":[]}],"description":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHoursUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAck"}}}},"422":{"description":"Données invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/services":{"put":{"tags":["Menu Pro · Établissement"],"summary":"Étape 5 — Services","security":[{"bearerAuth":[]}],"description":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicesUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAck"}}}},"422":{"description":"Données invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/contact":{"put":{"tags":["Menu Pro · Établissement"],"summary":"Étape 6 — Qui ? (Interlocuteur)","security":[{"bearerAuth":[]}],"description":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAck"}}}},"422":{"description":"Données invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/submit":{"post":{"tags":["Menu Pro · Établissement"],"summary":"Envoyer pour validation (48h)","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"422":{"description":"Étapes incomplètes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pro/establishments/{id}/photos":{"post":{"tags":["Menu Pro · Établissement"],"summary":"Ajouter une photo","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"is_primary":{"type":"boolean"},"position":{"type":"integer","description":"0 à 5"}}}}}},"responses":{"201":{"description":"Photo ajoutée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}}}}},"/pro/establishments/{id}/photos/{photoId}":{"patch":{"tags":["Menu Pro · Établissement"],"summary":"Réordonner / définir photo principale","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"photoId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}}}},"delete":{"tags":["Menu Pro · Établissement"],"summary":"Supprimer une photo","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"photoId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Supprimée"}}}},"/pro/establishments/{id}/statistics":{"get":{"tags":["Menu Pro · Statistiques"],"summary":"Statistiques de l'établissement","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"period","in":"query","schema":{"type":"string","enum":["week","month"],"default":"week"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statistics"}}}}}}}}}