{"openapi":"3.0.3","info":{"title":"SportsCert Cloud API","version":"1.0.0","description":"REST API for issuing and managing digital sports certificates. Authenticate with an API key created in the Association dashboard, sent as `Authorization: Bearer <key>`."},"servers":[{"url":"/api/v1"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Certificate":{"type":"object","properties":{"id":{"type":"string"},"certificateNumber":{"type":"string"},"playerName":{"type":"string"},"eventName":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PENDING_APPROVAL","ISSUED","REVOKED","REISSUED","EXPIRED"]},"issuedAt":{"type":"string","format":"date-time","nullable":true},"verificationUrl":{"type":"string","nullable":true}}},"Player":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sport":{"type":"string","nullable":true},"verificationStatus":{"type":"string"}}},"Event":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sport":{"type":"string"},"status":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time","nullable":true}}}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/certificates":{"get":{"summary":"List certificates","responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create a draft certificate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["athleteId","templateId","playerName","eventName"],"properties":{"athleteId":{"type":"string"},"templateId":{"type":"string"},"eventId":{"type":"string"},"playerName":{"type":"string"},"eventName":{"type":"string"},"position":{"type":"string"},"venue":{"type":"string"},"eventDate":{"type":"string","format":"date"}}}}}},"responses":{"201":{"description":"Created"},"401":{"description":"Unauthorized"}}}},"/certificates/{id}":{"get":{"summary":"Get a certificate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}},"patch":{"summary":"Issue or revoke a certificate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["issue","revoke"]},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad request"}}}},"/players":{"get":{"summary":"List players","responses":{"200":{"description":"OK"}}}},"/events":{"get":{"summary":"List events","responses":{"200":{"description":"OK"}}}}}}