{"source":"entur","operation":"get_service_alerts","description":"Get current public-transport disruptions and service notices.","parameters":[{"name":"stop_place_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional NSR StopPlace id, e.g. NSR:StopPlace:59872."},{"name":"line_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional Entur line id, e.g. RUT:Line:1."},{"name":"codespace_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional operator/data codespace, e.g. RUT or VYG."},{"name":"mode","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional AIR, BUS, COACH, FERRY, METRO, TAXI, TRAM or RAIL."},{"name":"severity","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional unknown, verySlight, slight, normal, severe, verySevere, noImpact or undefined."},{"name":"limit","schema":{"type":"integer"},"required":false,"default":50,"description":"Maximum notices to return, 1-100."},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page."}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/entur/get_service_alerts?stop_place_id={stop_place_id}&line_id={line_id}&codespace_id={codespace_id}&mode={mode}&severity={severity}&limit=50&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"total":{"type":"integer"},"returned":{"type":"integer"},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"severity":{"type":["string","null"]},"report_type":{"type":["string","null"]},"planned":{"type":["boolean","null"]},"summary":{"type":["string","null"]},"description":{"type":["string","null"]},"advice":{"type":["string","null"]},"validity_periods":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":["string","null"],"format":"date-time"},"endTime":{"type":["string","null"],"format":"date-time"}},"additionalProperties":false}},"last_updated":{"type":["string","null"],"format":"date-time"},"codespace":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"lineRef":{"type":["string","null"]},"lineName":{"type":["string","null"]},"publicCode":{"type":["string","null"]}},"additionalProperties":false}},"stops":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"location":{"type":"object","properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]}},"additionalProperties":false}},"additionalProperties":false}},"modes":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":["string","null"],"format":"uri"},"label":{"type":["string","null"]}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["total","returned","alerts"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"projected","entity_types":["transit_stop"],"description":"Recognized records and stable operation identifiers are projected; an empty array means the successful payload contained no recognizable entity."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"502":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":true}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/entur/get_service_alerts/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/entur/get_service_alerts","source":"https://allemannsdata.com/wiki/api/v1/kilder/entur","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["total","returned","alerts","alerts[].id","alerts[].severity","alerts[].report_type","alerts[].planned","alerts[].summary","alerts[].description","alerts[].advice","alerts[].validity_periods","alerts[].validity_periods[].startTime","alerts[].validity_periods[].endTime","alerts[].last_updated","alerts[].codespace","alerts[].lines","alerts[].lines[].lineRef","alerts[].lines[].lineName","alerts[].lines[].publicCode","alerts[].stops","alerts[].stops[].id","alerts[].stops[].name","alerts[].stops[].location","alerts[].modes","alerts[].links","alerts[].links[].url","alerts[].links[].label"],"output_fields_truncated":false,"canonical_field_aliases":{"identifier":["alerts[].id","alerts[].stops[].id"],"name":["alerts[].stops[].name","alerts[].links[].label"]},"response_example":{"source":"entur","operation":"get_service_alerts","parameters":{"stop_place_id":"example-id","line_id":"example-id","codespace_id":"example-id","mode":"example value","severity":"example value","limit":50},"data":{"total":1,"returned":1,"alerts":[{"id":"example-id","severity":"example value","report_type":"example value","planned":true,"summary":"example value","description":"example value","advice":"example value","validity_periods":[{"startTime":"2026-01-15T12:00:00Z","endTime":"2026-01-15T12:00:00Z"}],"last_updated":"2026-01-15T12:00:00Z","codespace":"example value","lines":[{"lineRef":"example value","lineName":"Example","publicCode":"example value"}],"stops":[{"id":"example-id","name":"Example","location":{"latitude":59.91,"longitude":10.75}}],"modes":["example value"],"links":[{"url":"https://example.invalid/resource","label":"Example"}]}]},"entities":[{"type":"transit_stop","id":"example-id","source":"entur","description":"Transit stop used as the operation input."}],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"entur","name":"Entur","description":"National stop search, journey planning, departures, live vehicle positions and service alerts.","cache_ttl_seconds":30,"documentation":"https://developer.entur.org/pages-intro-getstarted/","rate_limit":"The gateway identifies the client to Entur; excessive traffic may be limited."}]},"_provenance":{"data":{"source":"entur","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/entur"},"entities":{"source":"entur","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/entur","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/entur/get_service_alerts","source":"https://allemannsdata.com/wiki/api/v1/kilder/entur","wiki":"https://allemannsdata.com/wiki/kilder/entur/get_service_alerts/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
