You can use the following URIs to obtain a collection of field resources or add a single field for a
particular contact. Call HTTP GET on these URIs to access a narrowly-defined collection of contact's
resources. Call HTTP POST on thse URIs to add a a specific field for a contact.
For example, you may have developed a relationship with John. Now, you may want to know all
of his phone numbers, but you don't need any other information. To do this, you call the HTTP
GET operation on the addresses URI and use your GUID and John's CID. To obtain
John's CID, you can use the HTTP GET operation to obtain the Contacts resource.
Suppose John has a new address that you would like to add to your address book. To do this, you call the HTTP POST operation on the addresses URI and send an Address Field Object containing his new address.
For an example of how to make the call and see the response, see Example JSON Response Body for GET Plural Fields.
If you need to get only a specific field for a contact rather than the entire collection of fields accessed by these URIs, see the Single Fieldsection.GETPOSTformatNot available.
GET: Read Yahoo! Contacts
POST: Write Yahoo! Contacts
The following list of values is an enumeration, so the listed values have no other data type associated with them.
The Contacts plural field type, which is found in the response, will
be one of the values in the following table.
See also the list of single fields in Contact Field Types.
| Plural Fields | Description |
|---|---|
guids
|
The contacts' GUID values. |
nicknames
|
The contacts' nicknames. |
emails
|
The contacts' emails. |
yahooids
|
Yahoo! IDs. |
otherids
|
Other identifiers, such as ICQ, etc., distinguished by flags (see Contact Field Flags). |
phones
|
Phone numbers. Phone numbers should use flags to distinguish one phone number from another. |
jobtitles
|
The contacts' job titles. |
companies
|
The contacts' company names. |
notesFields
|
Comments about the contacts. |
links
|
URLs. |
customFields
|
Custom fields created with the "Add a Custom Field" dialog from the Yahoo Address Book. |
names
|
Contacts' names. |
addresses
|
Postal addresses. |
birthdays
|
Contacts' birthdays. |
anniversaries
|
Contacts' anniversaries. |
In the following example, the Contacts plural field type will be
replaced with one of the entries from the table of Contact Plural Fields. For example, see Example JSON Response Body for GET Plural Fields.
These examples show how to request information for all of the phones of a contact. The contact's unique identifier (the CID) value is 32.
The response body has the following:
uri tag identifies the precise location of each Field Object.
id tag is the FID that uniquely identifies the field on which this Field object is located.
To get the requested information in JSON format, you must explicitly make your request as shown here.
http://social.yahooapis.com/v1/user/XYZUHL23NH5DGGGGXM/contact/32/phones?format=json
This example shows the XML response body returned when making a request for information for all of the phones of a contact with the following URI:
http://social.yahooapis.com/v1/user/XYZUHL23NH5DGGGGXM/contact/32/phones
These examples show how to add a phone for a contact identified by the CID 32.
Call the HTTP POST operation on the following endpoint and send the Phone Object below:
http://social.yahooapis.com/v1/user/XYZUHL23NH5DGGGGXM/contact/32/phones?format=json
Call the HTTP POST operation on the following endpoint and send the Phone Object below:
http://social.yahooapis.com/v1/user/XYZUHL23NH5DGGGGXM/contact/32/phones