{"source":"kystdatahuset","operation":"get_ais_positions","description":"Historical AIS positions for one ship on a single UTC day, from Kystverket's\nAIS archive. Signature: get_ais_positions(vessel_id: integer, required; date: string, required; max_points: integer, optional, default 500; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"get_ais_positions(vessel_id: integer, required; date: string, required; max_points: integer, optional, default 500; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"vessel_id","type":"integer","schema":{"maximum":999999999,"minimum":100000000,"type":"integer"},"required":true,"default":null,"description":"The ship's MMSI (from search_ships / get_ship).","unit":null},{"name":"date","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"The UTC calendar day, ISO date (\"2026-06-01\").","unit":null},{"name":"max_points","type":"integer","schema":{"type":"integer"},"required":false,"default":500,"description":"Max positions to return, 10-5000 (default 500).","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"display_type":"integer","required":false,"default":25,"description":"Maximum list items returned by the gateway (default 25, maximum 100).","unit":"items"},{"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.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ais_positions?vessel_id={vessel_id}&date={date}&max_points=500&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ais_positions?vessel_id=257182000&date=2026-06-01","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"vessel_id":{"type":"integer"},"date":{"type":"string"},"count":{"type":"integer"},"returned":{"type":"integer"},"downsampled":{"type":"boolean"},"positions":{"type":"array","items":{"type":"object","properties":{"time":{"type":["string","null"],"format":"date-time"},"lat":{"type":"number"},"lon":{"type":"number"},"sog":{"type":"number"},"cog":{"type":"number"},"heading":{"type":"number"},"nav_status":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["vessel_id","date","count","returned","downsampled","positions"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"projected","entity_types":["port"],"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","ENDPOINT_NOT_FOUND"],"retryable":false},"405":{"codes":["METHOD_NOT_ALLOWED"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":false}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ais_positions/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ais_positions","source":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["vessel_id","date","count","returned","downsampled","positions","positions[].time","positions[].lat","positions[].lon","positions[].sog","positions[].cog","positions[].heading","positions[].nav_status"],"output_fields_truncated":false,"canonical_field_aliases":{"date":["date"],"timestamp":["positions[].time"],"latitude":["positions[].lat"],"longitude":["positions[].lon"],"name":["positions[].heading"]},"temporal_conventions":{"timezone":"explicit_offset","join_guidance":"date-time fields are RFC 3339 with an explicit offset (Z, +00:00 or the Europe/Oslo offset); compare absolute instants, not clock text. date fields are calendar dates without a time zone.","datetime_fields":["positions[].time"]},"response_example":{"source":"kystdatahuset","operation":"get_ais_positions","parameters":{"vessel_id":257182000,"date":"2026-06-01","limit":25,"offset":0},"data":{"vessel_id":1,"date":"2026-01-15","count":1,"returned":1,"downsampled":true,"positions":[{"time":"2026-01-15T12:00:00Z","lat":59.91,"lon":10.75,"sog":1.0,"cog":1.0,"heading":1.0,"nav_status":"example value"}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"kystdatahuset","name":"Kystdatahuset","description":"Norwegian ports, quays, maritime locations and reported port connections from the Coastal Administration.","publisher":"Kystverket","license":"https://data.norge.no/nlod/en/2.0/","cache_ttl_seconds":60}]},"_provenance":{"data":{"source":"kystdatahuset","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset"},"entities":{"source":"kystdatahuset","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ais_positions","source":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","wiki":"https://allemannsdata.com/wiki/kilder/kystdatahuset/get_ais_positions/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
