Get search for locations within an organization
get
/api/v1/search/locations
{basePath}/search/locations?orgShortName=tfoinc&latitude=40.763188&longitude=-73.914835&radius=50000&floor=1&count=2
The API returns a list of locations within an organization based on distance from the given geo-coordinate.Supported only for STS Gen2 cloud integrations.
Request
Supported Media Types
- application/json
Query Parameters
-
count(required): number
Minimum Value:
1Minimum Value:> falseMaximum Value:100Maximum Value:< falseTotal number of items in the collection for all pages.Default Value:5 -
floor: string
address floorDefault Value:
-
latitude(required): number
Minimum Value:
-90Minimum Value:> falseMaximum Value:90Maximum Value:< falseWGS84 latitude, in degrees -
longitude(required): number
Minimum Value:
-180Minimum Value:> falseMaximum Value:180Maximum Value:< falseWGS84 Longitude, in degrees -
orgShortName(required): string
Organization Identifier
-
radius: number
Minimum Value:
0Minimum Value:> falseMaximum Value:5000000Maximum Value:< falseThe search radius in metersDefault Value:5000
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : distanceLocation
Type:
objectRead Only:
trueA search results of locations.
Show Source
-
distance(required):
integer
The distance in meters between the location and the point defined in the request.
-
location(required):
array location
Array of Location objects.
Nested Schema : location
Type:
arrayArray of Location objects.
Show Source
-
Array of:
object Location
Title:
LocationA location represents the places of business within a customer's organization. A location can have one or more revenue centers.
Nested Schema : Location
Type:
objectTitle:
LocationA location represents the places of business within a customer's organization. A location can have one or more revenue centers.
Show Source
-
address:
object PostalAddress
Represents a postal address
-
consumerName:
string
consumer facing name
-
currency:
string
The currency of the location. Pricing displayed on menus from the location are in this currency, and all check operations are in this currency. Currency is presented inExample:
EUR -
extensions:
object ExtensionData
Additional Properties Allowed: additionalPropertiesContainer for extension data
-
geoLocation:
object GeoLocation
Coordinate of a location
-
languages:
array languages
Array of language culture reference strings configured for the location. First language listed is the default used if a request is made for an undefined language
-
locRef(required):
string
The location identifier.Example:
fdmnh144 -
name:
string
The location name.Example:
Fred Dome Stadium -
notes:
string
additional details
-
orgShortName(required):
string
The organization identifier.
-
phoneNumber:
string
Associated phone numberExample:
027410-22583 -
posPlatform:
object PosPlatform
Identifies the POS Platform running at the location.
-
timezone:
object Timezone
Represents the associated timezone
Example:
{
"orgShortName":"tfoinc",
"locRef":"fdmnh144",
"name":"Fred Dome Stadium",
"currency":"USD",
"languages":[
"en-GB",
"fr-FR",
"de-DE"
],
"timezone":{
"ianaName":"Europe/London",
"windowsName":"GMT Standard Time",
"tzIndex":85
},
"address":{
"addressLine1":"144 W 94th St",
"addressLine2":"Suite 11F",
"floor":"42A",
"locality":"New York",
"region":"NY",
"postalCode":"10019",
"country":"USA",
"notes":"West Entrance"
},
"phoneNumber":"(0030) 0456 343 234",
"geoLocation":{
"latitude":40.773188,
"longitude":-73.994835
},
"posPlatform":{
"name":"Oracle.Simphony",
"version":"19.2.0.1234"
}
}Nested Schema : PostalAddress
Type:
objectRepresents a postal address
Show Source
-
addressLine1:
string
First line of an address
-
addressLine2:
string
Second line of an address
-
addressLine3:
string
Third line of an address
-
country:
string
name of country, or country code
-
floor:
string
The floor in a building.
-
locality:
string
city/town/village
-
notes:
string
Additional address details
-
postalcode:
string
postal code, e.g. ZIP in the US
-
region:
string
state/county/province
Nested Schema : ExtensionData
Type:
objectAdditional Properties Allowed
Show Source
Container for extension data
Nested Schema : GeoLocation
Type:
objectCoordinate of a location
Show Source
-
latitude:
number
Minimum Value:
-90Maximum Value:90WGS84 latitude, in degrees -
longitude:
number
Minimum Value:
-180Maximum Value:180WGS84 Longitude, in degrees
Nested Schema : languages
Type:
arrayArray of language culture reference strings configured for the location. First language listed is the default used if a request is made for an undefined language
Show Source
Example:
[
"en-GB",
"fr-FR",
"de-DE"
]Nested Schema : PosPlatform
Type:
objectIdentifies the POS Platform running at the location.
Show Source
-
name(required):
string
Name of the platform
-
version(required):
string
Version of the platform
Nested Schema : Timezone
Type:
objectRepresents the associated timezone
Show Source
-
ianaName:
string
Name in linux OS system
-
tzIndex(required):
integer
The integer representation of the Index column from https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values
-
windowsName:
string
Name in windows OS system
400 Response
400 Bad Request
Root Schema : OrganizationApiProblemDetails
Type:
objectProblem details is used as standard model for reporting details when HTTP error status code is returned. This definition is defined by [RFC7807](https://tools.ietf.org/html/rfc7807).
Show Source
-
details:
string
A human-readable explanation specific to this occurrence of the problem.
-
instance:
string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
-
title:
string
A short, human-readable summary of the problem type.
-
type:
string
A URI reference [RFC3986](https://tools.ietf.org/html/rfc3986) that identifies the problem type. When this member is not present, its value is assumed to be "about:blank".
Example:
{
"type":"error:validation",
"title":"Required value not specified.",
"details":"The OrgShortName value is required.",
"instance":"required_value_missing"
}401 Response
401 Unauthorized
403 Response
403 Forbidden
404 Response
404 Requested resource not found
Examples
Example Request Body
Not applicable for this endpoint.
Example Response Body
The following example shows the contents of the response body in JSON format:
{
"items": [
{
"distance": 0,
"location": {
"orgShortName": "tfoinc",
"locRef": "fdmnh144",
"name": "The Food Organization Inc",
"currency": "USD",
"languages": [
"en-GB",
"fr-FR",
"de-DE"
],
"timezone": {
"ianaName": "America/New_York",
"windowsName": "Eastern Standard Time",
"tzIndex": 23
},
"address": {
"addressLine1": "144 W 54th St",
"addressLine2": "Suite 11B",
"floor": "42A",
"locality": "New York",
"region": "NY",
"postalCode": "10019",
"country": "USA",
"notes": "West Entrance"
},
"phoneNumber": "(0030) 0453 343 234",
"geoLocation": {
"latitude": 40.763188,
"longitude": -73.914835
},
"posPlatform": {
"name": "Oracle.Simphony",
"version": "19.2.0.1234"
}
}
}
]
}