Contacts by Category Name

Description

A category name is the user or system-assigned label used to group contacts. You can create categories and assign contacts to those categories. For example, suppose that Bob creates a category named BookClub and then adds two of his contacts, Mary and Bill, to that category. In the URIs related to categories, Bob is identified by the {guid} value and the value of {category-name} is BookClub.

To use the following URI, you will need the {category-name}. You can get this variable by running an HTTP GET operation to retrieve a collection of contacts, where you can the find the value {category-name} in the returned Contact Objects. Using the {category-name}, make an HTTP GET call to return a page of contacts.

URI

The following URI points to a category resource. See the Elements of the Category Object section for a description of the resource's structure. The {category-name} in the URI corresponds to the name field of the Category Object.

https://social.yahooapis.com/v1/user/{guid}/category/{category-name}/contacts

HTTP Operations Supported

  • GET

Query Parameters Supported

  • format
  • bucketinfo

Matrix Parameters Supported

  • start
  • count
  • bucket
  • maxbucketsize
  • minbucketcount

Scopes Required

  • GET: Read Yahoo Contacts

Elements of the Category Object

See also the JSON Syntax for Category Object and XML Syntax for Category Object.

Element JSON Data Type XML Schema Data Type Required for Write? Read Only? Description
id string string No Yes The Category ID.
uri string anyURI No Yes A link to the actual resource.
created string dateTime No Yes This is a system-generated response indicating the date that the object was created. The date is in RFC 3339 format. Example: Wed, 13 Aug 2008 21:24:09 GMT
updated string dateTime No No This is a system-generated response indicating the date that the object was modified. The date is in RFC 3339 format. Example: Wed, 13 Aug 2008 21:24:09 GMT
name string string Yes No The category name. This may be a system-assigned name or a name chosen by the user.

JSON Syntax for Category Object

See also the Example JSON Response Body for GET Categories.

XML Syntax for Category Object

See also the Example XML Response Body for GET Categories.

JSON Syntax for GET Contacts

See also JSON Syntax for Contact Object.

See also Example JSON Response Body for GET Contacts.

Example Responses for GET Contacts by Category

This example shows how to request a contact's categories by name. This is a request by a user whose GUID is XYZUHL23NH5DGGGGXM for the contacts in the clowns category.

The responses show that there are two contacts (indicated by the value of total) nicknamed HeadClown and StarGirl. The responses then provides details about the contacts.

The information for each is contained in two fields: nickname and address; other contacts may have more fields (for example, phone, email, job, company). The nickname field is unstructured and its value is a single, simple string. The address field is structured and contains multiple subfields whose individual values consist of simple strings.

Example JSON Response Body for GET Contacts by Category

To get the requested information in JSON format, you must explicitly use the format query parameter when making your request as shown here.

https://social.yahooapis.com/v1/user/XYZUHL23NH5DGGGGXM/category/clowns/contacts?format=json

Example XML Response Body for GET Contacts By Category

This example shows the XML response body returned when making a request for the contacts in the clowns category with the following URI:

https://social.yahooapis.com/v1/user/XYZUHL23NH5DGGGGXM/category/clowns/contacts

Table of Contents