POST /api/v1/locations/suggest.json
Suggest a new location to add to the map

This doesn’t actually create a new location, it just sends location information to region admins. Please send a region or lat/lon combo to get suggestions to the right people.

Supported Formats

json

Params

Param name Description
location_name
required

Name of new location

Validations:

  • Must be a String

region_id
optional

ID of the region that the location belongs in

Validations:

  • Must be a Integer

lat
optional

Latitude

Validations:

  • Must be a String

lon
optional

Longitude

Validations:

  • Must be a String

location_street
optional

Street address of new location

Validations:

  • Must be a String

location_city
optional

City of new location

Validations:

  • Must be a String

location_state
optional

State of new location

Validations:

  • Must be a String

location_zip
optional

Zip code of new location

Validations:

  • Must be a String

location_phone
optional

Phone number of new location

Validations:

  • Must be a String

location_website
optional

Website of new location

Validations:

  • Must be a String

location_type
optional

Type of location

Validations:

  • Must be a String

location_operator
optional

Machine operator of new location

Validations:

  • Must be a String

location_zone
optional

Machine operator of new location

Validations:

  • Must be a String

location_all_ages
optional

Whether the location is all ages. One of ‘Yes’, ‘At Times’, and ‘No’

Validations:

  • Must be a String

location_payment_type
optional

Whether the location is free to play. The only accepted value is ‘Free Play’

Validations:

  • Must be a String

location_comments
optional

Comments

Validations:

  • Must be a String

place_id
optional

Google Maps Place ID

Validations:

  • Must be a String

location_machines
optional

List of machines at new location

Validations:

  • Must be a String

location_machines_ids
optional

List of machine ids at new location

Validations:

  • Must be a String


GET /api/v1/locations.json
Fetch locations for all regions

GET /api/v1/region/:region/locations.json
Fetch locations for a single region

This will also return a list of machines at each location

Supported Formats

json

Params

Param name Description
region
required

Name of the Region you want to see locations for

Validations:

  • Must be a String

by_location_name
optional

Name of location to search for

Validations:

  • Must be a String

by_location_id
optional

Location ID to search for

Validations:

  • Must be a Integer

by_machine_id
optional

Machine ID to find in locations. Returns locations with all variant models of the machine

Validations:

  • Must be a Integer

by_machine_single_id
optional

Machine ID to find in locations, returns only exact version

Validations:

  • Must be a Integer

by_machine_group_id
optional

Machine Group to search for

Validations:

  • Must be a String

by_machine_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with all variant models of the machine.

Validations:

  • Must be a Integer

by_machine_single_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with exact model of the machine.

Validations:

  • Must be a Integer

manufacturer
optional

Locations with machines from this manufacturer. Additional filtering required for this endpoint.

Validations:

  • Must be a String

by_machine_year
optional

Locations with at least one machine manufacturered in this year. Additional filtering required for this endpoint.

Validations:

  • Must be a Integer

by_machine_year_gte
optional

Locations with at least one machine manufactured in this year or later

Validations:

  • Must be a Integer

by_machine_year_lte
optional

Locations with at least one machine manufactured in this year or earlier

Validations:

  • Must be a Integer

by_ipdb_id
optional

IPDB ID to find in locations

Validations:

  • Must be a Integer

by_opdb_id
optional

OPDB ID to find in locations

Validations:

  • Must be a Integer

by_machine_name
optional

Find machine name in locations

Validations:

  • Must be a String

by_city_id
optional

City to search for

Validations:

  • Must be a String

by_city_no_state
optional

City to search for when that city is in a country that does not have state/provinces in the data

Validations:

  • Must be a String

by_state_id
optional

State to search for. Matches location state field (often an abbreviation). Additional filtering required for this endpoint.

Validations:

  • Must be a String

by_country
optional

Country to search for. Matches location country code, in all caps, such as ‘US’. Additional filtering required for this endpoint.

Validations:

  • Must be a String

by_zone_id
optional

Zone ID to search by

Validations:

  • Must be a Integer

by_operator_id
optional

Operator ID to search by

Validations:

  • Must be a Integer

by_type_id
optional

Location type ID to search by

Validations:

  • Must be a Integer

place_id
optional

Google Maps Place ID for helping app to identify whether location exists

Validations:

  • Must be a String

by_at_least_n_machines
optional

Only locations with N or more machines. Additional filtering required for this endpoint.

Validations:

  • Must be a Integer

by_at_least_n_machines_type
optional

Only locations with N or more machines. Additional filtering required for this endpoint.

Validations:

  • Must be a Integer

by_is_stern_army
optional

Send only locations labeled as Stern Army

Validations:

  • Must be a Integer

by_ic_active
optional

Send only locations that have at least one machine that is tagged as Stern Insider Connected. Additional filtering required for this endpoint.

Validations:

  • Must be one of: true, false, 1, 0.

by_machine_type
optional

Locations with machines of this type (em, ss, me). Additional filtering required for this endpoint.

Validations:

  • Must be a String

by_machine_display
optional

Locations with machines with this display (alphanumeric, lcd, dmd, reels, lights). Additional filtering required for this endpoint.

Validations:

  • Must be a String

no_details
optional

Omit lmx/condition data from pull. Additional filtering required for this endpoint.

Validations:

  • Must be a Integer

with_lmx
optional

Include location machine details such as comments. Additional filtering required for this endpoint.

Validations:

  • Must be a Integer

regionless_only
optional

Show only regionless locations

Validations:

  • Must be a Integer

by_all_ages
optional

Send only all ages locations. Locations tagged ‘Yes’ or ‘At Times’ are both included. ‘No’ for not all ages. Additional filtering required for this endpoint.

Validations:

  • Must be a String

by_payment_type
optional

Send only free play locations. Accepted values are ‘Free Play’ and ‘No’ (meaning not Free Play). Additional filtering required for this endpoint.

Validations:

  • Must be a String


PUT /api/v1/locations/:id.json
Update attributes on a location

Supported Formats

json

Params

Param name Description
id
required

ID of location

Validations:

  • Must be a Integer

description
optional

Description of location

Validations:

  • Must be a String

website
optional

Website of location

Validations:

  • Must be a String

phone
optional

Phone number of location

Validations:

  • Must be a String

location_type
optional

ID of location type

Validations:

  • Must be a Integer

operator_id
optional

ID of the operator

Validations:

  • Must be a Integer

all_ages
optional

Whether the location is all ages. One of ‘Yes’, ‘At Times’

Validations:

  • Must be a String

payment_type
optional

Whether the location is free to play. The only accepted value is ‘Free Play’

Validations:

  • Must be a String


GET /api/v1/locations/closest_by_lat_lon.json
Returns the closest location to transmitted lat/lon

This sends you the closest location to your lat/lon (defaults to within 50 miles). It includes a list of machines at the location.

Supported Formats

json

Params

Param name Description
lat
required

Latitude

Validations:

  • Must be a String

lon
required

Longitude

Validations:

  • Must be a String

by_type_id
optional

Location type ID to search by

Validations:

  • Must be a Integer

manufacturer
optional

Locations with machines from this manufacturer

Validations:

  • Must be a String

by_machine_id
optional

Machine ID to find in locations

Validations:

  • Must be a Integer

by_machine_single_id
optional

Machine ID to find in locations, returns only exact version

Validations:

  • Must be a Integer

by_machine_group_id
optional

Machine Group to search for

Validations:

  • Must be a String

by_machine_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with all variant models of the machine

Validations:

  • Must be a Integer

by_machine_single_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with exact model of the machine

Validations:

  • Must be a Integer

by_machine_year
optional

Locations with at least one machine manufacturered in this year

Validations:

  • Must be a Integer

by_machine_year_gte
optional

Locations with at least one machine manufactured in this year or later

Validations:

  • Must be a Integer

by_machine_year_lte
optional

Locations with at least one machine manufactured in this year or earlier

Validations:

  • Must be a Integer

by_operator_id
optional

Operator ID to search by

Validations:

  • Must be a Integer

by_at_least_n_machines
optional

Only locations with N or more machines

Validations:

  • Must be a Integer

by_at_least_n_machines_type
optional

Only locations with N or more machines

Validations:

  • Must be a Integer

by_machine_type
optional

Locations with machines of this type (em, ss, me)

Validations:

  • Must be a String

by_machine_display
optional

Locations with machines with this display (alphanumeric, lcd, dmd, reels, lights)

Validations:

  • Must be a String

max_distance
optional

Closest location within “max_distance” miles, with a max of 500

Validations:

  • Must be a String

no_details
optional

Omit data that app does not need from pull

Validations:

  • Must be a Integer

send_all_within_distance
optional

Send all locations within max_distance param, or 50 miles.

Validations:

  • Must be a String

by_all_ages
optional

Send only all ages locations. Locations tagged ‘Yes’ or ‘At Times’ are both included. ‘No’ for not all ages.

Validations:

  • Must be a String

by_payment_type
optional

Send only free play locations. Accepted values are ‘Free Play’ and ‘No’ (meaning not Free Play).

Validations:

  • Must be a String


GET /api/v1/locations/within_bounding_box(.:format)
Returns locations within transmitted bounding box

This sends locations within the sw_corner and ne_corner bounding box. It includes a list of machines at the location. If the bounding box diagonal exceeds 500 miles and no limit param and no_details != 2 is sent, results are capped at 50 and pagination metadata is included in the response.

Supported Formats

json, geojson

Params

Param name Description
swlat
required

SW_Latitude

Validations:

  • Must be a String

swlon
required

SW_Longitude

Validations:

  • Must be a String

nelat
required

NE_Latitude

Validations:

  • Must be a String

nelon
required

NE_Longitude

Validations:

  • Must be a String

by_type_id
optional

Location type ID to search by

Validations:

  • Must be a Integer

manufacturer
optional

Locations with machines from this manufacturer. Multiple manufacturers can be chained together like manufacturer[]=Stern&manufacturer[]=Bally etc.

Validations:

  • Must be a String

by_machine_id
optional

Machine ID to find in locations, returns all versions in group. Multiple IDs can be chained together like by_machine_id[]=111&by_machine_id[]=222 etc.

Validations:

  • Must be a Integer

by_machine_single_id
optional

Machine ID to find in locations, returns only exact version. Multiple IDs can be chained together like by_machine_single_id[]=111&by_machine_single_id[]=22.

Validations:

  • Must be a Integer

by_machine_group_id
optional

Machine Group ID to find in locations. Multiple IDs can be chained together like by_machine_group_id[]=111&by_machine_group_id[]=22.

Validations:

  • Must be a String

by_machine_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with any variant models of the machine. Multiple IDs can be chained together like by_machine_id_ic[]=111&by_machine_id_ic[]=22.

Validations:

  • Must be a Integer

by_machine_single_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with exact model of the machine. Multiple IDs can be chained together like by_machine_single_id_ic[]=111&by_machine_single_id_ic[]=22.

Validations:

  • Must be a Integer

by_machine_year
optional

Locations with at least one machine manufacturered in this year. Multiple years can be chained together by_machine_year[]=1980&by_machine_year[]=1982.

Validations:

  • Must be a Integer

by_machine_year_gte
optional

Locations with at least one machine manufactured in this year or later

Validations:

  • Must be a Integer

by_machine_year_lte
optional

Locations with at least one machine manufactured in this year or earlier

Validations:

  • Must be a Integer

by_operator_id
optional

Operator ID to search by

Validations:

  • Must be a Integer

by_ic_active
optional

Send only locations that have at least one machine that is tagged as Stern Insider Connected

Validations:

  • Must be one of: true, false, 1, 0.

user_faved
optional

User ID of Faved Locations

Validations:

  • Must be a Integer

by_ipdb_id
optional

IPDB ID to find in locations. Multiple IDs can be chained together like by_ipdb_id[]=4565&by_ipdb_id[]=2345.

Validations:

  • Must be a Integer

by_opdb_id
optional

OPDB ID to find in locations. Multiple IDs can be chained together like by_opdb_id[]=4565&by_opdb_id[]=2345.

Validations:

  • Must be a Integer

by_at_least_n_machines
optional

Only locations with N or more machines

Validations:

  • Must be a Integer

by_at_least_n_machines_type
optional

Only locations with N or more machines

Validations:

  • Must be a Integer

by_machine_type
optional

Locations with machines of this type (em, ss, me). Multiple types can be chained together like by_machine_type[]=ss&by_machine_type[]=em.

Validations:

  • Must be a String

by_machine_display
optional

Locations with machines with this display (alphanumeric, lcd, dmd, reels, lights). Multiple display types can be chained together like by_machine_display[]=dmd&by_machine_display[]=reels.

Validations:

  • Must be a String

no_details
optional

Omit data that app does not need from pull (options include ‘1’ or ‘2’)

Validations:

  • Must be a Integer

by_all_ages
optional

Send only all ages locations. Locations tagged ‘Yes’ or ‘At Times’ are both included. ‘No’ for not all ages.

Validations:

  • Must be a String

by_payment_type
optional

Send only free play locations. Accepted values are ‘Free Play’ and ‘No’ (meaning not Free Play).

Validations:

  • Must be a String

limit
optional

Limit results to a quantity and include pagination metadata in response

Validations:

  • Must be a Integer

order_by
optional

Order results descending by a field in the locations scope. Allowed fields are updated_at, name, machine_count, distance. Otherwise, sorts by location ID. Using distance requires user_lat and user_lon params

Validations:

  • Must be a String

machines_only
optional

When set to ‘1’, returns only a flat list of unique machine_ids found across all matching locations. No location data is included.

Validations:

  • Must be a Integer


GET /api/v1/locations/closest_by_address.json
Returns the closest location to transmitted address

This sends you the closest location to your address (defaults to within 50 miles). It includes a list of machines at the location.

Supported Formats

json

Params

Param name Description
address
required

Address

Validations:

  • Must be a String

max_distance
optional

Closest location within “max_distance” miles, max 500

Validations:

  • Must be a String

send_all_within_distance
optional

Send all locations within max_distance param, or 50 miles.

Validations:

  • Must be a String

no_details
optional

Omit data that app does not need from pull

Validations:

  • Must be a Integer

by_ic_active
optional

Send only locations that have at least one machine that is tagged as Stern Insider Connected

Validations:

  • Must be one of: true, false, 1, 0.

manufacturer
optional

Locations with machines from this manufacturer

Validations:

  • Must be a String

by_machine_type
optional

Locations with machines of this type (em, ss, me)

Validations:

  • Must be a String

by_machine_display
optional

Locations with machines with this display (alphanumeric, lcd, dmd, reels, lights)

Validations:

  • Must be a String

by_machine_id
optional

Machine ID to find in locations, returns all versions in group

Validations:

  • Must be a Integer

by_machine_single_id
optional

Machine ID to find in locations, returns only exact version

Validations:

  • Must be a Integer

by_machine_group_id
optional

Machine Group to search for

Validations:

  • Must be a String

by_machine_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with all variant models of the machine

Validations:

  • Must be a Integer

by_machine_single_id_ic
optional

Machine ID to find in locations, when Stern Insider Connected is enabled for that machine at that location. Returns locations with exact model of the machine

Validations:

  • Must be a Integer

by_machine_year
optional

Locations with at least one machine manufacturered in this year

Validations:

  • Must be a Integer

by_machine_year_gte
optional

Locations with at least one machine manufactured in this year or later

Validations:

  • Must be a Integer

by_machine_year_lte
optional

Locations with at least one machine manufactured in this year or earlier

Validations:

  • Must be a Integer

by_all_ages
optional

Send only all ages locations. Locations tagged ‘Yes’ or ‘At Times’ are both included. ‘No’ for not all ages.

Validations:

  • Must be a String

by_payment_type
optional

Send only free play locations. Accepted values are ‘Free Play’ and ‘No’ (meaning not Free Play).

Validations:

  • Must be a String


GET /api/v1/locations/:id.json
Display the details of this location

Supported Formats

json

Params

Param name Description
id
required

ID of location

Validations:

  • Must be a Integer

no_details
optional

Omit lmx/condition data from pull. When no_details=1 and user_id is included, each lmx includes an in_life_list boolean; no_details=2 includes the first 5 machines and a count of machine - optimized for when you click a map marker on the app and it displays in the bottom sheet

Validations:

  • Must be a Integer

metadata_only
optional

Omit entire lmx list from pull - optimized for the app in order to refetch a small subset of location data after a particular update

Validations:

  • Must be a Integer

user_id
optional

When included with no_details=1, each lmx includes an in_life_list boolean for this user

Validations:

  • Must be a Integer


GET /api/v1/locations/:id/picture_details.json
Get info about all pictures at a location

Supported Formats

json

Params

Param name Description
id
required

Location id

Validations:

  • Must be a Integer

thumbnail
optional

Return 200x200 thumbnail variants instead of full-size

Validations:

  • Must be a Integer


GET /api/v1/locations/:id/machine_details.json
Display the details of the machines at this location

Supported Formats

json

Params

Param name Description
id
required

ID of location

Validations:

  • Must be a Integer

machines_only
optional

Simple list of only machine names

Validations:

  • Must be a Integer


PUT /api/v1/locations/:id/confirm.json
Confirm location information

Supported Formats

json

GET /api/v1/locations/autocomplete_city.json
Send back a list of cities in the DB that fit your search criteria

Supported Formats

json

Params

Param name Description
name
required

city/state name part

Validations:

  • Must be a String


GET /api/v1/locations/autocomplete.json
Send back fuzzy search results of search params

Supported Formats

json

Params

Param name Description
name
required

name to fuzzy search with

Validations:

  • Must be a String


GET /api/v1/locations/top_cities.json
Fetch top 10 cities by number of locations

Fetch top 10 cities by number of locations

Supported Formats

json

GET /api/v1/locations/top_cities_by_machine.json
Fetch top 10 cities by number of machines

Fetch top 10 cities by number of machines

Supported Formats

json

GET /api/v1/locations/type_count.json
Fetch a count of each location type

Fetch a count of each location type

Supported Formats

json

GET /api/v1/locations/countries.json
Fetch countries by number of locations

Fetch countries by number of locations

Supported Formats

json

GET /api/v1/locations/top_locations.json
Fetch biggest locations by number of number

Fetch biggest locations by number of number

Supported Formats

json

GET /api/v1/locations/geocode_lat_lon
Geocode address to lat/lon

Geocode address to lat/lon. Requires an api_token (param or X-Api-Token header).

Supported Formats

json

Params

Param name Description
address
required

Address

Validations:

  • Must be a String

api_token
optional

API token (or send the X-Api-Token header)

Validations:

  • Must be a String