Locations
Hierarchical taxonomy used to assign events to physical locations.
Get a collection
GET /locations HTTP/1.1
Query string parameters
All query string parameters are optional.
-
callback
string -
Wraps the response in a callback function of the given name. Use this parameter to facilitate JSONP requests.
-
excluded_ids
comma-separated list of IDs -
Returns locations, except those with the given IDs.
-
ids
comma-separated list of IDs -
Return locations with the given IDs.
-
order_by
comma-separated list -
Sort locations by one or more
ORDER_BY
andORDER
parameter pairs. Options:Format:
ORDER_BY|ORDER[,ORDER_BY|ORDER,...]
Default value:
name|asc
-
page
integer -
Return locations from a specific page of a collection.
Default value:
1
-
per_page
integer -
Number of locations to return per page of a collection. Maximum:
100
Default value:
5
-
slug
comma-separated list -
Return locations matching the given slug(s).
Response
In the example response, embedded locations are truncated for illustrative purposes. In the real-world version of the response, "...location object..."
is an entire location resource.
{
"_embedded": {
"locations": [
"...location object...",
"...location object...",
"...location object...",
"...location object...",
"...location object..."
]
},
"_links": {
"find": {
"href": "/locations/{?id}",
"templated": true
},
"next": {
"href": "/locations?page=3"
},
"prev": {
"href": "/locations?page=1"
},
"self": {
"href": "/locations?page=2"
}
},
"page": 1,
"per_page": 5,
"return_count": 5,
"total_available": 100
}
Attributes
-
_links
hash -
Links to resources associated with the location collection.
-
_links.find
link object -
A templated link that can be used to find a specific resource in the collection.
-
_links.find.href
string -
URI of the link.
-
_links.find.templated
boolean -
Identifies the href as a templated URI.
-
_links.next
link object -
A link to the next set of resources in the collection. If there is not a next page, this link will not be present.
-
_links.next.href
string -
URI of the link.
-
_links.prev
link object -
A link to the previous set of resources in the collection. If there is not a previous page, this link will not be present.
-
_links.prev.href
string -
URI of the link.
-
_links.self
link object -
A link that identifies the current resource.
-
_links.self.href
string -
URI of the link.
-
page
integer -
The page number of the returned collection.
-
per_page
integer -
The number of locations requested per page.
-
return_count
integer -
Number of locations returned.
-
total_available
integer -
Total number of locations available in the collection.
Get one
GET /locations/:id HTTP/1.1
Endpoint parameters
-
id
integer required -
The unique identifier of the location.
Response
GET /locations/712
{
"_embedded": {},
"_links": {
"self": {
"href": "/locations/712"
}
},
"address": "3400 North Charles Street",
"city": "Baltimore",
"email": null,
"id": 712,
"latitude": 39.329094,
"longitude": -76.618792,
"name": "The Beach",
"parent": {
"id": 668,
"name": "Homewood Campus",
"slug": "homewood-campus"
},
"phone": null,
"slug": "beach",
"state": "Maryland",
"type": "location",
"url": null,
"website": null,
"zipcode": 21218
}
Attributes
-
_embedded
hash -
Embedded resources.
-
_links
hash -
Links to resources associated with the location.
-
_links.self
link object -
A link that identifies the current resource.
-
_links.self.href
string -
URI of the link.
-
address
string -
city
string -
email
string -
id
integer -
Unique identifier of the location.
-
latitude
float -
longitude
float -
name
string -
The nice name of the location.
-
parent
hash|null -
The parent location, if there is one.
-
parent.id
integer -
Unique identifier of the parent location.
-
parent.name
string -
The nice name of the parent location.
-
parent.slug
string -
The name of the parent location used in URLs.
-
phone
string -
slug
string -
The name of the location used in URLs.
-
state
string -
type
string -
Type of resource.
-
url
hash -
URLs that point to collections of content in this location on the Hub website.
-
website
string -
URL of the location’s website, if it has one.
-
zipcode
integer
Get a subcollection
A subcollection is a collection of objects contained within a location.
GET /locations/:id/:subcollection HTTP/1.1
Endpoint parameters
-
id
integer - The unique identifier of the location.
-
subcollection
string -
The name of the subcollection to retrieve. Options:
events
Query string parameters
To filter the subcollection, see the list of available parameters associated with the chosen subcollection:
Response
See the response associated with the chosen subcollection: