{"openapi":"3.1.0","info":{"title":"sidelined.ch API","version":"1.0.0","summary":"Who is out in the Swiss National League: injured, ill, suspended and other unavailable players of all 14 clubs, with sources.","description":"Read-only and free, no key needed. Limit: 60 requests a minute per IP address; responses carry an ETag and are cached for a minute (the data changes about every 15 minutes).\n\nEvery response includes an `attribution`, which must be shown with the data. Reasons are as the source published them; sidelined.ch adds no medical details of its own.\n\nGuides, widgets and terms: https://developers.sidelined.ch","contact":{"email":"hello@sidelined.ch","url":"https://developers.sidelined.ch"},"termsOfService":"https://developers.sidelined.ch/terms"},"servers":[{"url":"https://api.sidelined.ch/v1"}],"externalDocs":{"url":"https://developers.sidelined.ch/api","description":"Guides and concepts"},"paths":{"/teams":{"get":{"operationId":"listTeams","summary":"The 14 clubs with their current counts","responses":{"200":{"description":"All teams.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it as If-None-Match to get a 304 when nothing changed."}},"content":{"application/json":{"schema":{"type":"object","required":["data","attribution"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Team"}},"attribution":{"$ref":"#/components/schemas/Attribution"}}}}}},"403":{"description":"Before the public launch: not open yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit: 60 requests a minute per IP address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/teams/{slug}":{"get":{"operationId":"getTeam","summary":"One club with all its current entries (every category, marked)","parameters":[{"name":"slug","in":"path","required":true,"description":"Team slug, from GET /v1/teams.","schema":{"type":"string","example":"zug"}}],"responses":{"200":{"description":"The team.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it as If-None-Match to get a 304 when nothing changed."}},"content":{"application/json":{"schema":{"type":"object","required":["data","attribution"],"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Team"},{"type":"object","required":["absences"],"properties":{"absences":{"type":"array","items":{"$ref":"#/components/schemas/Absence"}}}}]},"attribution":{"$ref":"#/components/schemas/Attribution"}}}}}},"403":{"description":"Before the public launch: not open yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown team slug.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit: 60 requests a minute per IP address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/teams/{slug}/absences":{"get":{"operationId":"listTeamAbsences","summary":"A club's current entries, as on its team page","parameters":[{"name":"slug","in":"path","required":true,"description":"Team slug, from GET /v1/teams.","schema":{"type":"string","example":"zug"}},{"name":"category","in":"query","required":false,"description":"Which entries: `out` (default, as the site counts), `scratch`, `loan`, several comma-separated (`out,loan`), or `all`.","schema":{"type":"string","default":"out","example":"out,loan"}}],"responses":{"200":{"description":"The entries.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it as If-None-Match to get a 304 when nothing changed."}},"content":{"application/json":{"schema":{"type":"object","required":["data","attribution"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Absence"}},"attribution":{"$ref":"#/components/schemas/Attribution"}}}}}},"400":{"description":"Invalid parameter.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Before the public launch: not open yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown team slug.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit: 60 requests a minute per IP address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/absences":{"get":{"operationId":"listAbsences","summary":"Current entries across the league, filterable","parameters":[{"name":"team","in":"query","required":false,"description":"Team slug.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Absence type.","schema":{"type":"string","enum":["injury","illness","suspension","loan","national_team","personal","healthy_scratch","import_limit","unknown"]}},{"name":"confidence","in":"query","required":false,"description":"Confidence.","schema":{"type":"string","enum":["official","league","media","inferred"]}},{"name":"category","in":"query","required":false,"description":"Which entries: `out` (default, as the site counts), `scratch`, `loan`, several comma-separated (`out,loan`), or `all`.","schema":{"type":"string","default":"out","example":"out,loan"}}],"responses":{"200":{"description":"The entries.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it as If-None-Match to get a 304 when nothing changed."}},"content":{"application/json":{"schema":{"type":"object","required":["data","attribution"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Absence"}},"attribution":{"$ref":"#/components/schemas/Attribution"}}}}}},"400":{"description":"Invalid parameter.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Before the public launch: not open yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown team slug.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit: 60 requests a minute per IP address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/changes":{"get":{"operationId":"listChanges","summary":"Recent changes: players newly out, updated, back, or no longer listed (last 14 days)","parameters":[{"name":"since","in":"query","required":false,"description":"Only changes after this ISO 8601 date or timestamp (at most 14 days back).","schema":{"type":"string"}},{"name":"team","in":"query","required":false,"description":"Team slug.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1–100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"`next_cursor` from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Newest first. A page can hold fewer than `limit` changes; follow `next_cursor` until it is null.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it as If-None-Match to get a 304 when nothing changed."}},"content":{"application/json":{"schema":{"type":"object","required":["data","attribution","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Change"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."},"attribution":{"$ref":"#/components/schemas/Attribution"}}}}}},"400":{"description":"Invalid parameter or cursor.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Before the public launch: not open yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit: 60 requests a minute per IP address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/openapi.json":{"get":{"operationId":"getSpec","summary":"This document","responses":{"200":{"description":"OpenAPI 3.1 document."}}}}},"components":{"schemas":{"Attribution":{"type":"object","description":"Must be shown wherever the data is shown (terms of use).","required":["text","url"],"properties":{"text":{"type":"string","description":"Credit line to display."},"url":{"type":"string","description":"Link the credit points to.","format":"uri"}}},"Team":{"type":"object","required":["slug","name","short_name","logo_url","url","out","scratches","loans","checked_at","next_game"],"properties":{"slug":{"type":"string","description":"Stable identifier used in URLs and filters.","example":"zug"},"name":{"type":"string","description":"Full club name.","example":"EV Zug"},"short_name":{"type":"string","description":"Short name for tight spaces.","example":"Zug"},"logo_url":{"type":"string","description":"Club logo (256 px WebP). The logos are the clubs' trademarks; use them only to identify the club.","format":"uri"},"url":{"type":"string","description":"The team page on sidelined.ch.","format":"uri"},"out":{"type":"integer","description":"Players currently unavailable (category `out`): scratches and loans are not counted.","example":4},"scratches":{"type":"integer","description":"Fit players left out of the last game (healthy scratch, import limit; category `scratch`).","example":2},"loans":{"type":"integer","description":"Players with the farm team or another club (category `loan`).","example":2},"checked_at":{"type":["string","null"],"description":"When one of the club's own sources was last read successfully (UTC).","format":"date-time"},"next_game":{"type":["object","null"],"description":"The club's next National League game, or today's until it's over, from the league's schedule (no cup or Champions Hockey League games). Null when none is scheduled.","required":["starts_at","home","opponent"],"properties":{"starts_at":{"type":"string","description":"Puck drop, Swiss local time with its offset.","format":"date-time","example":"2026-11-28T19:45:00+01:00"},"home":{"type":"boolean","description":"Whether the club plays at home."},"opponent":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string","description":"The opponent's slug.","example":"davos"},"name":{"type":"string","description":"The opponent's full name.","example":"HC Davos"}}}}}}},"Player":{"type":"object","required":["id","name","jersey"],"properties":{"id":{"type":"integer","description":"Stable player ID."},"name":{"type":"string","description":"Display name, \"First Last\".","example":"Lino Martschini"},"jersey":{"type":["integer","null"],"description":"Jersey number, when known.","example":46}}},"Source":{"type":"object","required":["kind","label","url"],"properties":{"kind":{"type":"string","description":"Where the entry comes from.","enum":["medical_report","manual","news","league_news","lineup","lineup_sheet","media"]},"label":{"type":"string","description":"Human-readable source name.","example":"club medical report"},"url":{"type":["string","null"],"description":"The page or document it comes from: the club's report, the article, the lineup sheet. Null for lineup data.","format":"uri"}}},"Absence":{"type":"object","description":"A player currently unavailable. Reasons are given as the source published them; sidelined.ch adds no medical details of its own.","required":["id","team","player","type","category","confidence","reason_text","body_region","since","since_kind","return","detail","sources","off_club_report","expected_back","updated_at"],"properties":{"id":{"type":"integer","description":"Stable ID of this absence."},"team":{"type":"string","description":"Team slug.","example":"zug"},"player":{"$ref":"#/components/schemas/Player"},"type":{"type":"string","description":"Why the player is unavailable.","enum":["injury","illness","suspension","loan","national_team","personal","healthy_scratch","import_limit","unknown"]},"category":{"type":"string","description":"out: counted as unavailable. scratch: fit, left out by the coach (healthy scratch, import limit). loan: with the farm team or another club. Only `out` counts in `Team.out`.","enum":["out","scratch","loan"]},"confidence":{"type":"string","description":"How the information is known: official (the club), league (National League, SIHF), media, inferred (only missing from lineups; reason unknown).","enum":["official","league","media","inferred"]},"reason_text":{"type":["string","null"],"description":"The reason as the source published it, in its language.","example":"knee"},"body_region":{"type":["string","null"],"description":"Body region, when the source names one.","enum":["upper_body","lower_body","head",null]},"since":{"type":"string","description":"Date the absence started or was first reported (see `since_kind`).","format":"date","example":"2026-10-17"},"since_kind":{"type":"string","description":"What `since` is: reported (a date the source published), article (the article's date), first_seen (when sidelined.ch first saw it), lineup (the first game missed).","enum":["reported","article","first_seen","lineup"]},"return":{"type":"object","description":"Expected return: the source's wording and sidelined.ch's reading of it. An estimate, not a club statement.","required":["text","text_by","kind","min","max"],"properties":{"text":{"type":["string","null"],"description":"The source's wording, or sidelined.ch's where `text_by` says so.","example":"mid-November"},"text_by":{"type":["string","null"],"description":"Whose words `text` is: `source` (as published, quote it as the source's) or `sidelined` (our own summary, e.g. \"für 3 Spiele gesperrt\" for a league suspension: don't quote it as the source's).","enum":["source","sidelined",null]},"kind":{"type":["string","null"],"description":"How the wording was read.","enum":["day_to_day","week_to_week","duration","calendar","games","season","unknown",null]},"min":{"type":["string","null"],"description":"Earliest expected return. For a suspension (`kind` = `games`): the date of the first game he may play again; he misses the games before it.","format":"date","example":"2026-10-17"},"max":{"type":["string","null"],"description":"Latest expected return; null when open-ended.","format":"date","example":"2026-10-17"}}},"detail":{"type":["string","null"],"description":"Extra context, e.g. \"Not dressed for the last 3 games\" on inferred entries."},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"off_club_report":{"type":["object","null"],"description":"The club's medical report no longer lists him, but another source (usually SIHF's lineup sheet of his team's last game) keeps the entry open. `return` is then the club's last estimate, from before it dropped him. Null otherwise.","required":["since","url"],"properties":{"since":{"type":"string","description":"When the club's report stopped listing him (UTC).","format":"date-time"},"url":{"type":["string","null"],"description":"The club's report.","format":"uri"}}},"expected_back":{"type":["object","null"],"description":"The club says he plays a named upcoming game (a game preview or club news, read by a language model and checked against the article): the game and the article. The entry stays open until he's dressed. Null once that game has started, or when no club says so.","required":["game","url","said_on"],"properties":{"game":{"type":"object","required":["starts_at","home","opponent"],"properties":{"starts_at":{"type":"string","description":"Puck drop, with the local offset.","format":"date-time"},"home":{"type":"boolean","description":"Whether it's a home game for his club."},"opponent":{"type":"string","description":"The opponent's slug."}}},"url":{"type":["string","null"],"description":"The article.","format":"uri"},"said_on":{"type":"string","description":"The article's date.","format":"date"}}},"updated_at":{"type":"string","description":"Last change to this entry (UTC).","format":"date-time"}}},"Change":{"type":"object","required":["id","kind","closed_reason","changed","suspension","club_report","at","team","absence_id","player","type","confidence","reason_text"],"properties":{"id":{"type":"integer","description":"Event ID, increasing."},"kind":{"type":"string","description":"opened: a player became unavailable. updated: an open entry has a new type, a new reason or a new suspension length (reworded return estimates are left out), or the club's medical report dropped him or lists him again while another source keeps the entry open. closed: no longer listed.","enum":["opened","updated","closed"]},"closed_reason":{"type":["string","null"],"description":"returned: dressed for a game again. cleared: the sources no longer list him. moved: dressed for another club (a loan to another National League club, a transfer).","enum":["returned","cleared","moved",null]},"changed":{"type":["array","null"],"items":{"type":"string","enum":["type","reason","suspension","club_report"]},"description":"For `updated`: what is new. Null otherwise."},"club_report":{"type":["object","null"],"description":"For `updated` with `changed: [\"club_report\"]`: whether the club's medical report lists him now. False: it dropped him, but another source (usually SIHF's lineup sheet) keeps the entry open. Null otherwise.","required":["listed"],"properties":{"listed":{"type":"boolean"}}},"suspension":{"type":["object","null"],"description":"For `updated` with a new suspension length (a decision after a provisional suspension, an appeal). Null otherwise.","required":["games","was","eligible_from"],"properties":{"games":{"type":"integer","description":"Games of the suspension now."},"was":{"type":["integer","null"],"description":"Games before, if known."},"eligible_from":{"type":["string","null"],"description":"Date of the first game he may play again (the entry's `return.min`); he misses the games before it.","format":"date"}}},"at":{"type":"string","description":"When sidelined.ch recorded it (UTC).","format":"date-time"},"team":{"type":"string","description":"Team slug."},"absence_id":{"type":"integer"},"player":{"$ref":"#/components/schemas/Player"},"type":{"type":"string","description":"Absence type.","enum":["injury","illness","suspension","loan","national_team","personal","healthy_scratch","import_limit","unknown"]},"confidence":{"type":"string","description":"Confidence of the absence.","enum":["official","league","media","inferred"]},"reason_text":{"type":["string","null"],"description":"The reason as published."}}},"Problem":{"type":"object","description":"RFC 9457 problem details. `type` links to a page explaining what to do.","required":["type","title","status","detail"],"properties":{"type":{"type":"string","description":"Docs page for this error.","format":"uri"},"title":{"type":"string","description":""},"status":{"type":"integer"},"detail":{"type":"string","description":""}}}}}}