{"openapi":"3.1.0","info":{"title":"Smart Event Network — Public API","version":"1.0.0","description":"API REST publique permettant à toute plateforme d'utiliser la Smart Event Card comme système universel d'identité événementielle. Authentification par clé Bearer `sen_live_...` générée depuis Smart Event Studio.","contact":{"name":"Smart Event Network","url":"https://smarteventnetwork.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://smarteventnetwork.com/api/public/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Events","description":"Catalogue d'événements de l'organisation"},{"name":"Cards","description":"Vérification de la Smart Event Card"},{"name":"Scan","description":"Activation d'un billet sur un événement"}],"paths":{"/events":{"get":{"tags":["Events"],"summary":"Lister les événements publiés","responses":{"200":{"description":"Liste paginée des événements (max 100)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/events/{id}":{"get":{"tags":["Events"],"summary":"Récupérer un événement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Détail de l'événement","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Event"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/card/verify":{"get":{"tags":["Cards"],"summary":"Vérifier un token SEN1 (sans activer de billet)","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Résultat de vérification","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"expired":{"type":"boolean"},"status":{"type":"string","enum":["active","suspended","revoked"]},"card_number":{"type":"string"},"issued_at":{"type":"string","format":"date-time"}}}}}}}}},"/scan":{"post":{"tags":["Scan"],"summary":"Activer un billet pour un porteur de carte","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["event_id"],"properties":{"event_id":{"type":"string","format":"uuid"},"card_number":{"type":"string","description":"Numéro de carte brut (saisie manuelle)."},"token":{"type":"string","description":"Token SEN1.* signé (scanné depuis l'app participant)."}}}}}},"responses":{"200":{"description":"Billet activé","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"tier":{"type":"string"},"category_name":{"type":"string"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sen_live_"}},"schemas":{"Event":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"venue":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"cover_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["draft","published","cancelled","ended"]},"ticket_categories":{"type":"array","items":{"$ref":"#/components/schemas/TicketCategory"}}}},"TicketCategory":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"price":{"type":"number"},"currency":{"type":"string"},"quantity_total":{"type":"integer"},"quantity_sold":{"type":"integer"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Clé manquante, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Ressource introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"Requête invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}