Locations Placemarks API Endpoint Follow
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.
The
x/y
values are used to generate latitude and longitude values for that placemark.
Create a New Placemark Using Latitude and Longitude
You can also create placemarks using latitude
and longitude
values in place of x
and y
.
Before using lat/long coordinates, make sure that your Map Anchor Points have been set.
The Meridian Editor will validate whether the lat/long values are valid coordinates, but won’t validate whether those coordinates are on the map or not.
Use decimal degree latitude and longitude coordinates.
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
Images are uploaded using a multi-part/form data stream.
When you PUT the image, please make sure the Key is set to “upload”.
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 by its UID:
https://edit.meridianapps.com/api/locations/{location ID}/placemarks?uid={UID value}
UID is meant to 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 |
Integer The placemark’s unique ID. |
map |
Integer (required) The placemark’s map’s ID. |
x and y |
Float The placemark’s coordinates on the map. The top left corner of the map is |
latitude and longitude |
Float The placemark’s latitude on the map. Can be used in place of the |
Integer 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 |
String The placemark’s name Placemarks of type "Facility" doesn’t use names. |
area |
String (Comma-separated floats) 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: |
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 |
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 |
String (required, see Placemark Types for options) The internal placemark type value. In the Meridian Editor UI, placemark type is chosen through the TYPE dropdown menu. |
type_category |
String (Calculated from type) The placemark type category. Automatically selected based on the placemark type. |
type_name |
String (Calculated from type) The placemark name shown to the user. Automatically selected based on the placemark type. |
color |
String (Calculated from type) 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 |
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. |
description |
String The placemark’s description. This field accepts simple HTML markup for |
keywords |
String (Comma-separated list of keywords) The placemark’s keywords are used to add search terms to make it easier for your visitor’s to find placemarks. |
phone |
String A phone number you’d like to add to the placemark. |
|
String An email you’d liked to add to the placemark. |
url |
String (Must include A website URL you’d like to add to the placemark. |
custom_1, custom_2, custom_3, custom_4 |
String Custom values to add to the placemark. In the Editor, these are the four CUSTOM fields. |
image_url |
String (Must include A hosted image you’d like to add to the placemark. |
is_facility |
Boolean Whether a placemark is a facility or a point of interest. Determined by the placemark type. |
hide_on_map |
Boolean (Default is Whether the placemark is shown or hidden on the map. |
is_disabled |
Boolean (Default is Whether the placemark is enabled or disabled. A disabled placemark won’t show up on the floor or in search results. |
is_searchable |
Boolean (Default is Whether the placemark will show up in search when using the SDKs
|
Placemark Types
ADA/Handicap Accessible | Currency Exchange | Lab | Restroom (Unisex) |
AED | Customer Service | Lost and Found | Restroom (Women's - ADA) |
Amusement Park | Department Label | Lounge | Restroom (Women's) |
ATM | Desk | Mailbox | Rewards |
Attraction | Device Charging | Museum | Security |
Baggage | Elevator | Nursing Station | Security Checkpoint |
Baggage Carts | Emergency Department | Operating Room | Shoe Shine |
Bank | Escalator | Outdoor Area | Shopping |
Bar | EV Charging Station | Paging Phone | Spa |
Bike | Exclusion Area | Parking | Stadium |
Box Office | Exhibit | Pay Phone | Stairs |
Building Label | Exit | Pet Relief | Swimming Pool |
Bus Stop | First Aid | Pharmacy | Taxi Stand |
Business Center | Fitness Center | Placemark | Theater |
Cafe | Fountain | Play Area | Tours |
Cafeteria | Gallery | Printer | Train Station |
Campus Label | Gaming | Registration | Training Room |
Cashier | Garden | Rental Cars | Valet |
Changing Room | Gate | Restaurant | Vending Machines |
Clinic | Global Entry Office | Restroom (Family) | Water Fountain |
Club | Infant Changing Station | Restroom (Men's - ADA) | Wedding |
Coat Check | Information | Restroom (Men's) | |
Conference Room | Kiosk | Restroom (Unisex - ADA) |
Comments
0 comments
Please sign in to leave a comment.