{"source":"kystdatahuset","operation":"get_ship_voyages","description":"Voyages (port-call legs) reported to SafeSeaNet for one ship, newest first. Signature: get_ship_voyages(vessel_id: integer, required; start_date: string, required; end_date: string, required; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"get_ship_voyages(vessel_id: integer, required; start_date: string, required; end_date: string, required; 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":"start_date","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"ISO date or datetime, inclusive lower bound (e.g. \"2025-01-01\").","unit":null},{"name":"end_date","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"ISO date or datetime, exclusive upper bound.","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"default":25,"description":"Max voyages to return. Sorted by ETA descending; `count` is the true total. Unit: items. Through this API: default 25, maximum 100.","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer"},"required":false,"default":0,"description":"Skip this many voyages (for pagination). Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ship_voyages?vessel_id={vessel_id}&start_date={start_date}&end_date={end_date}&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ship_voyages?vessel_id=257182000&start_date=2026-09-01&end_date=2026-10-01","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"vessel_id":{"type":"integer"},"ship":{"type":"object","properties":{"shipname":{"type":"string"},"shiptype":{"type":"string"},"gt":{"type":"number"},"length":{"type":"number"},"breadth":{"type":"number"}},"additionalProperties":false},"count":{"type":"integer"},"returned":{"type":"integer"},"offset":{"type":"integer"},"voyages":{"type":"array","items":{"type":"object","properties":{"origin":{"type":"string"},"destination":{"type":"string"},"etd":{"type":["string","null"],"format":"date-time"},"eta":{"type":["string","null"],"format":"date-time"},"direction":{"type":["string","integer"]},"hazmat":{"type":["string","boolean"]},"draft":{"type":"number"},"cargo_gross":{"type":"number"},"cargo_net":{"type":"number"}},"additionalProperties":false}}},"additionalProperties":false,"required":["vessel_id","ship","count","returned","offset","voyages"]},"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_ship_voyages/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ship_voyages","source":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["vessel_id","ship","ship.shipname","ship.shiptype","ship.gt","ship.length","ship.breadth","count","returned","offset","voyages","voyages[].origin","voyages[].destination","voyages[].etd","voyages[].eta","voyages[].direction","voyages[].hazmat","voyages[].draft","voyages[].cargo_gross","voyages[].cargo_net"],"output_fields_truncated":false,"canonical_field_aliases":{},"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":["voyages[].etd","voyages[].eta"]},"response_example":{"source":"kystdatahuset","operation":"get_ship_voyages","parameters":{"vessel_id":257182000,"start_date":"2026-09-01","end_date":"2026-10-01","limit":25,"offset":0},"data":{"vessel_id":1,"ship":{"shipname":"Example","shiptype":"example value","gt":1.0,"length":1.0,"breadth":1.0},"count":1,"returned":1,"offset":1,"voyages":[{"origin":"example value","destination":"example value","etd":"2026-01-15T12:00:00Z","eta":"2026-01-15T12:00:00Z","direction":"example value","hazmat":"example value","draft":1.0,"cargo_gross":1.0,"cargo_net":1.0}]},"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_ship_voyages","source":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","wiki":"https://allemannsdata.com/wiki/kilder/kystdatahuset/get_ship_voyages/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
