{"source":"kystdatahuset","operation":"get_ship","description":"Full record for one ship from Kystverket's combined registry, by MMSI or IMO. Signature: get_ship(vessel_id: integer, optional, default None; imo: integer, optional, default None).","signature":"get_ship(vessel_id: integer, optional, default None; imo: integer, optional, default None)","parameters":[{"name":"vessel_id","type":"integer","schema":{"anyOf":[{"type":"integer"},{"type":"null"}]},"required":false,"default":null,"description":"The ship's 9-digit MMSI.","unit":null},{"name":"imo","type":"integer","schema":{"anyOf":[{"type":"integer"},{"type":"null"}]},"required":false,"default":null,"description":"The ship's 7-digit IMO number.","unit":null}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ship?vessel_id={vessel_id}&imo={imo}","not_paged":"Returns a single record.","requires_one_of":{"alternatives":[["vessel_id"],["imo"]],"exactly_one":true,"description":"Give exactly one of: vessel_id; imo."},"example_url":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ship?imo=9278234","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"found":{"type":"boolean"},"ship":{"type":"object","properties":{"shipname":{"type":["string","null"]},"callsign":{"type":["string","array","null"],"items":{"type":"string"}},"vessel_id":{"type":["integer","array"],"items":{"type":"integer"}},"imo":{"type":["integer","array"],"items":{"type":"integer"}},"shiptype":{"type":["string","null"]},"cc3":{"type":["string","null"]},"loa":{"type":["number","null"]},"breadth":{"type":["number","null"]},"draught":{"type":["number","null"]},"gt":{"type":["number","null"]},"dwt":{"type":["number","null"]},"height":{"type":["number","null"]},"yearofbuild":{"type":["integer","null"]}}}},"additionalProperties":false,"required":["found","ship"]},"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/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset/get_ship","source":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["found","ship","ship.shipname","ship.callsign","ship.vessel_id","ship.imo","ship.shiptype","ship.cc3","ship.loa","ship.breadth","ship.draught","ship.gt","ship.dwt","ship.height","ship.yearofbuild"],"output_fields_truncated":false,"canonical_field_aliases":{},"response_example":{"source":"kystdatahuset","operation":"get_ship","parameters":{"imo":9278234},"data":{"found":true,"ship":{"shipname":"Example","callsign":"example value","vessel_id":1,"imo":1,"shiptype":"example value","cc3":"example value","loa":1.0,"breadth":1.0,"draught":1.0,"gt":1.0,"dwt":1.0,"height":1.0,"yearofbuild":1}},"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","source":"https://allemannsdata.com/wiki/api/v1/kilder/kystdatahuset","wiki":"https://allemannsdata.com/wiki/kilder/kystdatahuset/get_ship/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
