Legacy API

The Meridian API is commonly used by web apps running in the Meridian App Sandbox, but it can be consumed by anyone. Currently, it is read-only and anonymous, but we may require an API key in the future.

If you want to use the API with Beacons, you'll need to use the new Meridian REST API.

Format

All requests to the API take the form:

http://edit.meridianapps.com/api/[object]?appid=[appid]&callback=[jsonpcallback]

Where the arguments in brackets are:

  • object: The API call in question (each call is documented below)

  • appid [required]: Each API call must specify the unique identifier for a location. This is sometimes called an "app code". See the section "Finding your app code" in this Help Document.

  • callback [optional]: API calls support JSONP for cross-domain queries.

Placemarks

Placemarks represent points in space on a map. They could be a point of interest visible to the user on a map or they could be hidden and exist only for organizational purposes. Placemarks are created using the Meridian Editor.

Get All Placemarks

This Get All Placemarks API request:

http://edit.meridianapps.com/api/placemarks?appid=1234

will return all the Placemarks associated with a specific appid in STUB form:

[
    {
        "id": "8_5002",
        "name": "Customer Service Desk",
        "type": "customer_service",
        "map_id": "8",
        "x": 187.0,
        "y": 431.0,
        "categories": ["Services"],
    },
    {
        "id": "8_1001",
        "name": "Panera Bread",
        "type": "restaurant",
        "map_id": "8",
        "x": 502.0,
        "y": 99.0
        "description": "Panera Bread bakery-cafes bring the tradition of freshly baked",
        "categories": ["Food"],
    },
    ...
]
NOTE: In the future, this call may return a truncated set of Placemarks for locations with many Placemarks, along with a link to fetch more.

Get a Single Placemark with Details

In the Get All Placemarks API request, the description field will be truncated after about 120 characters. To get the full Placemark description text, you'll need to fetch a specific Placemark separately.

This Single Placemark API request:

http://edit.meridianapps.com/api/placemarks/8_1001?appid=1234

will return the Placemark with the identifier 8_1001, along with the full description, and other metadata:

{
    "id": "8_1001",
    "name": "Panera Bread",
    "type": "restaurant",
    "map_id": "8",
    "x": 502.0,
    "y": 99.0
    "description": "<p>Panera Bread bakery-cafes bring the tradition of freshly baked artisan bread to neighborhoods in cities throughout the country. We use only the highest-quality ingredients and bake fresh every day.</p>",
    "categories": ["Food"],
}

The description field may contain basic HTML.

Pages

Pages are customizable informational content created by locations in the Editor. Pages can contain any information that a location would like to share with its visitors. Pages can be organized into Categories and displayed as items in a list. Pages can also be associated with a specific Placemark.

Get All Pages

This Get All Pages API request:

http://edit.meridianapps.com/api/pages?appid=1234

will return all Pages for a location in STUB form:

[
  {
    "id": "6",
    "name": "Home Page",
    "type": "home"
  },
  {
    "id": "34001",
    "name": "About Us",
    "type": "default",
    "description": "We're one of the nation's leading locations, open for business sin",
    "categories": ["Informational"]
  },
  ...
]
NOTE: In the future, this call may return a truncated set of Pages for locations with many pages, along with a link to fetch more.

Get a Single Page with Details

In the Get All Pages API request, the description field is truncated. To get the full Page description text, you'll need to fetch a specific Page separately.

This single Page API request:

http://edit.meridianapps.com/api/pages/34001?appid=1234

will return the Page with the identifier 34001 along with its full description and other metadata:

{
  "id": "34001",
  "name": "About Us",
  "type": "default",
  "description": "<p>We're one of the nation's leading locations, open for business since 2002. We enjoy long walks on the beach, candlelit dinners, and snuggling with kittens. You will really enjoy your stay here, we guarantee it!</p>",
  "categories": ["Informational"],
  "layout": "page_layout_1"
}

The description field may contain basic HTML.

Events

Events are pieces of information that are tied to specific moments in time. Events can be created individually or imported using the Meridian Editor. Events can be associated with a Placemark, so that your visitors will get information about the Event when your visitors arrive at location at a specific time. Events started before today are never included in any Event API response. The Event API response takes into account the appid location's timezone.

Get All Events

This Get All Events API request:

http://edit.meridianapps.com/api/events?appid=1234

will return all Events for a location in STUB form:

[
  {
    "allday": false,
    "description": "The Canby Wine, Food & Brew Fest has been delighting the Portland-Metro area for over 20 years with its wide variety of p",
    "placemark_id": "3002_3096",
    "dtend": "2012-06-01T21:00:00-07:00",
    "dtstart": "2012-06-01T17:00:00-07:00",
    "id": "1015",
    "name": "Canby Wine, Food & Brew 3 Day Event"
  },
  {
    "allday": true,
    "description": "A two-day celebration of the Arts brought to Wilsonville by WACCJuried Visual Art Show features the work professional art",
    "dtstart": "2012-06-02T10:00:00-07:00",
    "id": "1009",
    "dtend": "2012-06-02T18:00:00-07:00",
    "name": "Wilsonville Festival of Arts"
    },
  ...
]

Events with start (dtstart) dates older than today's date are excluded from the API results. Events with start and end (dtend) dates are excluded if the end date is older than today's date.

Notice that the descriptions are truncated. You'll need to fetch the Event details separately to get the full description and other properties like url, placemark_id, and contact info.

NOTE: In the future, this call may return a truncated set of Events (for locations with many events), along with a link to fetch more.

Get a Single Event with Details

In the Get All Events API request, the description field is truncated. To get the full Event description text, you'll to fetch a specific Event.

This single Event request:

http://edit.meridianapps.com/api/events/1015?appid=1234

will return the Event with the identifier 1015, along with its full description and other properties:

{
  "allday": false,
  "uid": "dotCal-0a419090-3fa8-012f-957a-002421a2359e",
  "url": "www.clackamascountyeventcenter.com",
  "placemark": "3002_3096",
  "placemark_id": "3002_3096",
  "name": "Canby Wine, Food & Brew 3 Day Event",
  "location": "694 NE 4th Ave.",
  "dtend": "2012-06-01T21:00:00-07:00",
  "dtstart": "2012-06-01T17:00:00-07:00",
  "id": "1015",
  "placemark_name": "694 NE 4th Ave.",
  "description": "The Canby Wine, Food & Brew Fest has been delighting the Portland-Metro area for over 20 years with its wide variety of pleasures. Wine and Beer tasting are just the beginning. Wonderful gourmet food offerings, talented artisans, cooking demos, shopping for treasures in the vintage marketplace and continual free entertainment under the trees on the beautiful mai9n lawn make this an event for the couples and families alike. The reasonable $5 entry fee for adults and free parking are also a bonus. Meet us at the Clackamas County Event Center to join in the fun at this Portland Rose Festival Sanctioned Event."
}

The description field may contain basic HTML.

Although location and placemark_name seem to have redundant data, it is possible for an Event to have a location without a matching placemark_id and placemark_name in the Meridian Editor. Both parameters are included for consistency.

Deprecated: The 'placemark' property is deprecated and will be removed in a future release.

Get All Events by Placemark

If a placemark_id is added to the Events API, it will return all the Events associated with that placemark.

http://edit.meridianapps.com/api/events?appid=1234&placemark_id=3002_3096