Skip to content
Bruno Hautzenberger edited this page Nov 29, 2018 · 2 revisions
  • Type: spots
  • Path: /spots

Spot entities contain all information of a spot in xamoom. They either identify an object or a physical location. Objects do not contain geographical coordinates.

Attributes

  • name - (String) Localized name of this spot
  • description - (String) Localized description of this spot
  • image - (String, optional) Image url of this spot
  • category - (Int, optional) category of this spot. (see -> Supported Categories)
  • location - (Dict) Dictionary containing "lat" and "lon".
  • tags - (Array, optional) List of this spot's tags
  • custom-meta - (Array, optional) A language-independent list of Key-Value-Pairs with customer specific information about this object.
  • created-at - (String, iso8601) ISO8601 formated date at which this content was created
  • updated-at - (String, iso8601) ISO8601 formated date at which this content was updated

Relationships

  • system - (System) The realtionship to the system this spot belongs to.
  • content - (Content) The realtionship to the content attached to this spot. Only available if you query for spots using the query parameter include_content=true
  • markers - (Marker) A list of all markers attached to this spot. Only available if you query for spots using the query parameter include_markers=true

Query Filters

  • lat - Latitude of center point for geofence search. Only works if radius and lon are also set. Example: ../spots?filter[lat]=46.14
  • lon - Longitude of center point for geofence search. Only works if radius and lat are also set. Example: ../spots?filter[lon]=14.112
  • radius - Radius in meters for geofence search. Only works if lat and lon are also set. Example: ../spots?filter[radius]=500
  • name - Fulltext search in names and tags. Example: ../spots?filter[name]=Awesome
  • tags - Search spots having given tags. Example: ../spots?filter[tags]=['tag1','tag2']
  • moving - Search spots that are objects without a location. Example: ../spots?filter[moving]=true
  • content - Search spots that have a certain content attached to them. Example: ../spots?filter[content]=123
  • has-location - Search spots depending if they have a geo location or not. This is important if you try to show a map. In this case you only want spot that have a geo location Example: ../spots?filter[has-location]=true
  • created-from - Search for spots that were created after given date (as ISO8601 date UTC). Example: ../spots?filter[created-from]=2017-05-25T17:26:01Z
  • created-to - Search for spots that were created before given date (as ISO8601 date UTC). Example: ../spots?filter[created-to]=2017-05-25T17:26:01Z

Allowed Sort Expressions

  • name - Internal name of content entity. Example: ../spots?sort=name
  • distance - Distance in meters to the point given by filters lat and lon. Example: ../spots?sort=distance&filter[lat]=46.123&filter[lon]=14.567
  • created-at - Creation date. Example: ../spots?sort=created-at
  • updated-at - Last update date. Example: ../spots?sort=updated-at

Markers

A spot can have a list of markers attached to it. If you query for markers using the query parameter include_markers=true, you will get these as relationship and also the whole entities as part of the included objects of the response. There is no other way for you to get these. This can be used to save stuff offline to a device and still react to location identifiers of the markers.

Attributes

  • qr - (String) QR id of this marker.
  • nfc - (String) NFC id of this marker.
  • ibeacon-region-uid - (String) iBeacon Region UUID id of this marker.
  • ibeacon-major - (Int) iBeacon major of this marker.
  • ibeacon-minor - (Int) iBeacon minor of this marker.
  • eddystone-url - (String) Eddystone url of this marker.
  • custom-marker-id - (String, optional) Custom marker id of this marker.

Example Content Response

{
	"data": {
			"id": "2337", 
			"type": "spots", 
			"attributes": {
				"name": "Test Spot", 
				"description": "",
				"image" : "https://xamoom.com/wp-content/uploads/2017/03/x200.png",
				"category": 38, 
				"location": {
					"lat": 46.62396816134571, 
					"lon": 14.307915074241464
				},
				"tags": ["SOMETAG1", "ANOTHERTAG"], 
				"custom-meta": [
					{"key": "custome-field", "value": "custom value"},
					{"key": "custome-field-nr2", "value": "custom value number 2"}
				],
				"created-at": "2015-04-07T20:14:23Z", 
				"updated-at": "2018-10-14T17:40:34Z"
			}, 
			"relationships": {
				"content": {
					"data": {
						"type": "contents", 
						"id": "123"
					}
				}, 
				"markers": {
					"data": [
							{
								"type": "markers", 
								"id": "def12"
							}
						]
				},
				"system": {
					"data": {
						"type": "systems", 
						"id": "305"
					}
				}
			}
	},
	"included": [
			{
				"id": "def12", 
				"type": "markers", 
				"attributes": {
					"custom-marker-id": "something", 
					"eddystone-url": "abc123", 
					"ibeacon-major": 52414, 
					"ibeacon-minor": 9777, 
					"nfc": "tbxuk5r8wi4c", 
					"qr": "def12"
				}
			}
	]
}
You can’t perform that action at this time.