Map Markers


All Map-markers

You can get a list of all the map-markers of a map by using the following endpoint.

{warning} Don't forget that all endpoints documented here need to be prefixed with api/1.0/campaigns/{campaign.id}/.

Method Endpoint Headers
GET/HEAD maps/{map.id}/map_markers Default

Results

{
    "data": [
        {
            "colour": "/en-US/docs/1.0/map_markers#008000",
            "created_at": "2020-07-25T10:10:30.000000Z",
            "created_by": null,
            "custom_icon": null,
            "custom_shape": "500,500 500,600, 600,600 600,500",
            "entity_id": null,
            "font_colour": null,
            "icon": "1",
            "id": 31,
            "is_draggable": false,
            "is_private": false,
            "latitude": "422.857",
            "longitude": "499.000",
            "map_id": 2,
            "name": "Shape",
            "opacity": 100,
            "shape_id": 5,
            "size_id": 1,
            "updated_at": "2020-07-25T10:10:30.000000Z",
            "updated_by": null,
            "visibility": "all"
        }
    ]
}

Create a Map Marker

To create a map marker, use the following endpoint.

Method Endpoint Headers
POST maps/{map.id}/map-markers Default

Body

Parameter Type Detail
name string (Required without entity_id) Name of the map marker
entity_id string (Required without name) Entity linked to the map marker
map_id integer (Required) The parent map
latitude float (Required) Latitude of the marker
longitude float (Required) Longitude of the marker
shape_id int (Required) Shape of the marker (1 for Marker, 2 for Label, 3 for Circle, 4 for Polygon)
icon int (Required) 1 for Marker, 2 for Exclamation, 3 for Interrogation, 4 for Entity
group_id int ID of the marker group
is_draggable boolean If the marker is draggable on the map
custom_shape string Polygon coordinates
custom_icon string HTML of the custom icon
size_id int 1 to 6 for size (used by circles)
opacity int 0 to 100 opacity
visibility string all, admin, admin-self or self
colour string Hex colour code with leading #
font_colour string Hex colour code with leading #

Results

{success} Code 200 with JSON body of the new map.

Update a Map

To update a map, use the following endpoint.

Method Endpoint Headers
PUT/PATCH maps/{map.id}/map-markers/{map.id} Default

Body

The same body parameters are available as for when creating a map.

Results

{success} Code 200 with JSON body of the updated map.

Delete a Map

To delete a map, use the following endpoint.

Method Endpoint Headers
DELETE maps/{map.id}/map-markers/{map.id} Default

Results

{success} Code 200 with JSON.