
Returns a resource for the parent of a place. A place has only one parent. The resource is the short representation of the parent (unless a long representation is requested).
The following query parameters are supported
for this collection:
lang, format, callback,
select, and appid.
The lang parameter allows a user to choose the
language used in the response.
The format parameter allows a user to choose the
content type of the response (XML, JSON, GeoJSON).
The callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call.
The select parameter allows a user to choose the
representation of the response (short, long).
The appid parameter grants authorization to use the Web service,
and is required.
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
The following errors can be returned:
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
URI has no match in the display map
Be sure that you have spelled the resource correctly.
Could not find the resource xxx
Be sure to provide a valid woeid in requests for the /place resource.
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
Example 14. Retrieving a Resource for the Parent of a Given WOEID, as a Long Representation
The request:
http://where.yahooapis.com/v1/place/638242/parent?select=long&appid=[yourappidhere]
produces the following:
<?xml version="1.0" encoding="UTF-8"?>
<place yahoo:uri="http://where.yahooapis.com/v1/place/12596838" xml:lang="en">
<woeid>12596838</woeid>
<placeTypeName code="9">County</placeTypeName>
<name>Stadtkreis Berlin</name>
<country type="Country" code="DE">Germany</country>
<admin1 type="State" code="BE">Berlin</admin1>
<admin2 type="District" code="">Stadtkreis Berlin</admin2>
<admin3/>
<locality1/>
<locality2/>
<postal/>
<centroid>
<latitude>52.506699</latitude>
<longitude>13.42461</longitude>
</centroid>
<boundingBox>
<southWest>
<latitude>52.338081</latitude>
<longitude>13.0883</longitude>
</southWest>
<northEast>
<latitude>52.67532</latitude>
<longitude>13.76091</longitude>
</northEast>
</boundingBox>
</place>