Placemarks API Endpoint

Using the Meridian API Placemarks endpoint, you can modify and add content to placemarks you've added in the Editor. You can also use the API to add new placemarks to a map.

The Placemarks API endpoint will return a 400 error for update (POST/PATCH/PUT) calls that include a language header, because it's unclear whether the placemark data should be replaced or its translation.

The Placemarks Endpoint

The Placemarks endpoint is tied to a specific Meridian Editor location.

    /api/locations/{location_id}/placemarks/{placemark_id}

Token Authentication

Before you can use the Meridian API's Placemarks endpoint, POST a valid token to:

https://edit.meridianapps.com/api/tokens

All of the following API requests will need to use token authentication. Read requests don't require a token.

To get a token, post a valid email and password to:

https://edit.meridianapps.com/api/login

Token Authentication

Upon receiving successful login credentials, the login API returns a token value. This token is available for use until it's deleted or a logout request is received.

For more information on token authentication, please see Token API.

Create a New Placemark

To create a placemark with the API, POST a request to:

https://edit.meridianapps.com/api/locations/{Location ID}/placemarks

Your POST request requires map, x, y, and type values. Please see below for more information on these placemark fields.

Edit a Placemark's Values

To edit an existing placemark's values, PATCH a request to:

https://edit.meridianapps.com/api/locations/{Location ID}/placemarks/{Placemark ID}

Delete a Placemark

To delete a placemark, DELETE a request to:

https://edit.meridianapps.com/api/locations/{Location ID}/placemarks/{Placemark ID}

Upload Placemark Images

Once you've created a placemark and have its ID, send a PUT request to the SVG endpoint to upload a file:

https://edit.meridianapps.com/api/locations/{Location ID}/placemarks/{Placemark ID}/image

Make sure your images are smaller than 2.5 megabytes.

Download Placemark Images

In order to download placemark's image, send a GET request to the placemarks endpoint for a specific location, map, and placemark ID:

https://edit.meridianapps.com/api/locations/{Location ID}/placemarks/{Placemark ID}

The image URL is in the image_url field.

Placemark Filters

Placemark filters provide you with more control when requesting placemarks through the API.

The following are supported placemark filters:

  • category_id
  • custom_1, custom_2, custom_3, custom_4
  • hide_on_map
  • is_facility
  • map
  • name
  • related_map
  • type
  • type_category
  • uid

Filter values are case sensitive and require exact matches.

When using multiple filters, comma separated values are evaluated as OR.

Use the UID Field

If you need to associate a placemark with a unique ID in a non-Meridian system, use the placemark UID field to do so.

Store the internal ID in the placemark's UID field.

Use this API call to get a placemark's UID:

`https://edit.meridianapps.com/api/locations/{location ID}/placemarks?uid={UID value}`

UID is meant to be relate placemarks to items in customer databases. Please note that the Editor doesn't warn about duplicate UIDs.

Placemark API Field Reference

Here are descriptions of the Placemark API endpoint fields.

id

The placemark's unique id.

map (required)

The placemark's map's id.

x (required)

The placemark's x coordinate on the map.

y (required)

The placemark's y coordinate on the map.

If the placemark is a portal, this is the map the placemark leads to.

In the Editor, this is the LEADS TO MAP dropdown menu.

name

The placemark's name.

The Facilities placemark type doesn't use names.

This field can be used as a filter.

area

If the placemark describes an area, the map coordinates describing the area.

The area is represented as a string array of points. It can be any polygon, such as a triangle or an octagon.

For example a 10x10 square at x=0 and y=0 would have the x/y coordinates of: '0.0,0.0,10.0,0.0,10.0,10.0,0.0,10.0

hint

If a placemark is tricky to find, you can add hint text to help people find it.

In the Editor, this is the HINT field.

Links to external webpages or a page within the app.

Add links in the format:

{
    "link": "https://edit.meridianapps.com",
    "title": "Meridian Editor"
}

You can also link to a page within the app.

{
    "link": "page/id123",
    "title": "Phone Numbers"
}

type (required)

The internal placemark type value.

Placemark types:

  • aed
  • amusement_park
  • atm
  • attraction
  • bar
  • bus
  • cafe
  • cafeteria
  • changing_station
  • club
  • coat_check
  • conference_room
  • customer_service
  • elevator
  • emergency_dept
  • escalator
  • exit
  • first_aid
  • fitness_center
  • fountain
  • gallery
  • gaming
  • gate
  • generic
  • handicap
  • information
  • laptop_lounge
  • lounge
  • museum
  • nursing_station
  • parking
  • pharmacy
  • phone
  • play_area
  • printer
  • restaurant
  • restroom
  • restroom_men
  • restroom_women
  • security_checkpoint
  • shop
  • spa
  • stadium
  • stairs
  • swimming_pool
  • taxi
  • theater
  • ticketing
  • train
  • training
  • vending_machines
  • water_fountain
  • wedding

In the Meridian Editor UI, placemark type is chosen through the TYPE dropdown menu.

Use the following endpoint to get a list of placemark types:

/api/placemarks/types

type_category

The placemark type category.

Automatically selected based on the placemark type.

This field can be used as a filter.

type_name

The placemark name shown to the user.

Automatically selected based on the placemark type.

color

The color of the placemark shown on the map.

Automatically selected based on the placemark type.

categories

A read-only field that shows the Category name.

This field can be used as a filter with multiple values.

category_id

The placemark's category.

In the Editor, this is the CATEGORY field.

In order to add a category value to a placemark, it must have already been added to the Editor.

This field can be used as a filter.

description

The placemark's description.

This field accepts simple HTML markup for strong, em, ul, p, and a tags.

keywords

The placemark's keywords are used to add search terms to make it easier for your visitor's to find placemarks.

Separate keyword values with commas.

In the Editor, this is the KEYWORDS field.

phone

A phone number you'd like to add to the placemark.

email

An email you'd liked to add to the placemark.

url

A website URL you'd like to add to the placemark.

The URL must include http:// or https://.

custom_1, custom_2, custom_3, custom_4

Custom values to add to the placemark.

In the Editor, these are the four CUSTOM fields.

These fields can be used as a filter.

image_url

A hosted image you'd like to add to the placemark.

The image URL must include http:// or https://.

is_facility

Whether a placemark is a facility or a point of interest. A true or false value.

Determined by the placemark type.

This field can be used as a Boolean filter.

hide_on_map

Whether the placemark is shown or hidden on the map. A true or false value.

Default is false

This field can be used as a Boolean filter.

landmark

Whether the placemark is a landmark. Placemarks can be used to orient a visitor toward a start or end point in a route. A true or false value.

Default is false

This field is only used in our legacy AppViewer 1.x. It isn't available in AppViewer 2.x.