EA Store Locator APIBugs / Todo
The EA store locator API is a RESTful web service that allows you to lookup Elizabeth Arden stores in a particular area
The URI to access the API is http://learnmore.elizabetharden.com/ws/locator/
Given certain parameters (via query string) a document is returned containing the store locations matching the request
Parameters
Only a location is required. All other parameters will be set to default values if they aren't included
- location (Required): The location to look up
- table (Options=ea,prevage Default=ea): Table to query.
- radius (Optional default=45): Radius (in chosen units) to look for locations
- country (Optional default=All Countries): Country to return locations from in ISO 639 alpha-2 format
- units (Optional default=metric): Units of return distances and google map/directions (si, metric)
- lang (Optional default=en): Language of the return messages and the google map/directions in ISO 639 alpha-2 format
- format (Optional default=xml): Format of the returned data (xml, json)
- remove_fields (Optional): Comma separated list of fields to remove from the returned data
Responses
Responses are wrapped in an easl status node
<easl status="$status">
...
</easl>
$status will be either ok or error. If the status is error you will get an error code and message
Examples
Find all locations within 30 km of Pretoria, South Africa. Do not include directions, state, or address2 fields
http://learnmore.elizabetharden.com/ws/locator/index.php?location=Pretoria,+ZA&radius=45&units=km&removefields=directions,state_province,address2
<easl status="ok">
<start_location>Pretoria, ZA</start_location>
<radius>45</radius>
<units>km</units>
<location_count>19</location_count>
<locations>
<location>
<co_name>FOSCHINI SUNNY PARK</co_name>
<address1>ESSELEN STREET</address1>
<city>SUNNYSIDE, PRETORIA</city>
<country>ZA</country>
<distance>2.8</distance>
<units>km</units>
<map_link>http://maps.google.com/maps?q=Esselen...</map_link>
</location>
<location>
<co_name>FOSCHINI LEWIS</co_name>
<address1>259 CHURCH STREET</address1>
<city>PRETORIA</city>
<country>ZA</country>
<distance>3.1</distance>
<units>km</units>
<map_link>http://maps.google.com/maps?q=259+Church...</map_link>
</location>
...
</locations>
</easl>
Find all locations near Auckland, NZ. Supplying only a location assumes defaults for the rest of the parameters
http://learnmore.elizabetharden.com/ws/locator/?location=Auckland,+NZ
<easl status="ok">
<start_location>Auckland, NZ</start_location>
<radius>45</radius>
<units>km</units>
<location_count>32</location_count>
<locations>
<location>
<co_name>Macy's</co_name>
<address1>5065 Main St</address1>
<address2>Trumbull Shopping Center</address2>
<city>Trumbull</city>
<state_province>Connecticut</state_province>
<country>US</country>
<distance>8.3</distance>
<units>mi</units>
<directions_link>http://maps.google.com/maps?saddr=41.3013830,-73.1344580...</directions_link>
<map_link>http://maps.google.com/maps?q=5065+Main+St+Trumbull%2C+(Macy%27...</map_link>
</location>
</locations>
</easl>
JSON
JSON output is formatted similar to xml except there is no top-level status. It's located with the rest of the data
{
"status":"ok",
"start_location":"Auckland, NZ",
"radius":45,
"units":"km",
"location_count":32,
"locations":
[
{
"co_name":"Radius Pharmacy Queen Street",
"address1":"104 Queen Street",
"address2":"",
"city":"Auckland",
"state_province":"",
"country":"NZ",
"distance":0.1,
...
}
]
}
Errors
Errors are returned with a code and a message
<easl status="error">
<error code="1">You must supply a location</error>
</easl>
{
"status":"error",
"error_code":1,
"error":"You must supply a location"
}
Error Codes
1: No location given
2: Error connecting to database
3: Cannot geocode location
4: Language was specificed that is not currently supported by the service
5: Invalid format was passed
Error Messages will be in the language chosen via request (default en)
Bugs
None at the moment
Todo
- Add ability to see ungeocoded stores