
GET HTTP is the recommended method for calling
searchContacts and getCategories.
POST is required for the write requests addContacts
and synchronize. The format of the POST body should match
the output format specified by the format parameter. That
is, it should be either a valid XML document or a valid JSON
structure, respectively. See Data Representation Formats below.
Developers can use the following URL request to resolve an email
address to the full name of a contact, including the YDN-specific
authentication parameters WSSID and
appid:
http://address.yahooapis.com/v1/searchContacts
?format=xml
&fields=name
&email.is=jsmith%40yahoo.com
&appid=88MnJ7R0pW1Z3Fl8JoIHwPvn3MWAbPQR
&WSSID=A.K87A8842r
The above query retrieves the name of a
contact with the specified email address. The actual email address
that matched is not returned in the Response, because the query only
requests that name fields be returned.
Sample Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE search-response SYSTEM "http://l.yimg.com/us.yimg.com/lib/pim/r/abook/xml/2/pheasant.dtd"> <search-response> <contact cid="74"> <name fid="75"> <first>James</first> <last>Smith</last> </name> <category catid="3">buddies</category> </contact> </search-response>