An AtoN, or aid to navigation, is a device or signal used in maritime operations to assist navigators in determining their position, safe course, or to warn of dangers and obstructions. Common examples include buoys, lighthouses, and day beacons.
This article will explain how to interact with the Gatehouse Maritime API to create, read, update, or delete AtoNs, with concrete code examples of how to do it.
Content overview:
The base URL for the following endpoints is:
https://mdmdemo.gatehousemaritime.com/api/config/aton
The creation of a physical- and virtual AtoN is done through the same endpoint, however the payload defines whether the AtoN is physical or virtual. The <virtual> field defines whether the AtoN is virtual or physical, if it is set to 1, then it is virtual and physical if set to 0.
The following list depicts the fields and a small description of it.
import requests
url = "https://mdmdemo.gatehousemaritime.com/api/config/aton"
headers = {
'Authorization': 'Basic <credentials>',
'accept': 'application/json',
'Content-Type': 'application/json',
}
json_data = {
"broadcast_interval": 360,
"description": "",
"failure_timeout": 780,
"groups": [],
"mmsi": 992111939,
"name": "test1",
"owner": "",
"position": {
"coordinates": [
6.3643,
54.6808,
],
"type": "Point",
},
"size_a": 0,
"size_b": 0,
"size_c": 0,
"size_d": 0,
"off_pos_alarm": 0,
"virtual": 0,
"alarm_setup": [],
"warning_timeout": 420,
}
response = requests.post(
url=url,
headers=headers,
json=json_data,
)
print(response.status_code)
print(response.json())
import requests
url = "https://mdmdemo.gatehousemaritime.com/api/config/aton"
headers = {
'Authorization': 'Basic <credentials>',
'accept': 'application/json',
'Content-Type': 'application/json',
}
json_data = json_data = {
'chainedaton': 'feed6b6f-1d0e-4487-ab6b-e2a0ec3ad6bf',
'broadcast_interval': 360,
'description': '',
'enabled': True,
'failure_timeout': 780,
'groups': [
'50922b3b-565e-4a5c-8183-9a10b9c57aeb',
],
'mmsi': 123456,
'name': 'Test123',
'owner': '',
'position': {
'coordinates': [
9.89167,
53.54222,
],
'type': 'Point',
},
'pss': [
'feed6b6f-1d0e-4487-ab6b-e2a0ec3ad6bf',
],
'schedule': [
{
'start': '2026-02-25T12:00:00.000Z',
'end': '2026-02-28T12:00:00.000Z',
},
],
'size_a': 2,
'size_b': 2,
'size_c': 2,
'size_d': 2,
'type': 2,
'virtual': 1,
'warning_timeout': 420,
'uuid': '',
}
response = requests.post(
url=url,
headers=headers,
json=json_data,
)
print(response.status_code)
print(response.json())
200
{'uuid': '984fe7c1-7086-4bff-86ef-3942511a1b73'}