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_comments
optional

Comments

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 events 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

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_state_id
optional

State to search for

Validations:

  • Must be a String

by_machine_group_id
optional

Machine Group to search for

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

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_is_stern_army
optional

Send only locations labeled as Stern Army

Validations:

  • Must be a Integer

no_details
optional

Omit lmx/condition data from pull

Validations:

  • Must be a Integer

with_lmx
optional

Include location machine details such as comments

Validations:

  • Must be a Integer

regionless_only
optional

Show only regionless locations

Validations:

  • Must be a Integer


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


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

by_machine_id
optional

Machine ID to find in locations

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

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


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.

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

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_operator_id
optional

Operator ID to search by

Validations:

  • Must be a Integer

user_faved
optional

User ID of Faved Locations

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

no_details
optional

Omit data that app does not need from pull

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

manufacturer
optional

Locations with machines from this manufacturer

Validations:

  • Must be a String

by_machine_group_id
optional

Machine Group to search for

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

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