Schema

The following data schema are used throughout the Yahoo Messenger IM API.

presence

Element Name Element Data Type Element Presence Element Definition
presenceState integer Mandatory

The current presence state.

-1 = Offline

0 = Online

2 = Busy

999 = Idle

presenceMessage string Optional The presence message
clientType string Optional

Indicates if client is mobile or PC. Values may be:

"mobile"

"pc" (default)

Example 2.1. JSON Example


contact

Element Name Element Data Type Element Presence Element Definition
id string Mandatory The user ID
network string Optional The IM network value. The default is "yahoo".
authorized integer Optional

0 = unauthorized

1 = authorized (default)

groups list of groups Optional list of groups this contact belongs to. Note that this is not the same definition as the group schema defined below.
presence object Optional Presence for contact
clientCapabilities object Optional List of client capabilities
addressbook object Optional Addressbook data for the contact
uri object Mandatory URI for contact resource

Example 2.2. JSON Example


contacts (list)

Example 2.3. JSON Example


contacts (collection)

Element Name Element Data Type Element Presence Element Definition
contacts Refer to "contacts (list)" Mandatory Refer to "contacts (list)"
start integer Mandatory Offset to first object
count integer Mandatory Number of objects in the response list
total integer Mandatory Number of objects in total

Example 2.4. JSON Example


group

Element Name Element Data Type Element Presence Element Definition
name string Mandatory The group name
contacts object Optional A list of contacts
uri string Mandatory URI for group resource

Example 2.5. JSON Example


groups (list)

Example 2.6. JSON Example


groups (collection)

Element Name Element Data Type Element Presence Element Definition
groups Refer to "groups (list)" Mandatory Refer to "groups (list)"
start integer Mandatory Offset of first object
count integer Mandatory Number of objects in the response list
total integer Mandatory Number of objects in total

Example 2.7. JSON Example


ignoredUser

Element Name Element Data Type Element Presence Element Definition
id string Mandatory The user ID
network string Optional The network value. The default value is "yahoo".

Example 2.8. JSON Example


ignoredUsers (list)

Example 2.9. JSON Example


ignoredUsers (collection)

Element Name Element Data Type Element Presence Element Definition
ignoredUsers Refer to "ignoredUsers (list)" Mandatory Refer to "ignoredUsers (list)"
start integer Mandatory Offset to first object
count integer Mandatory Number of objects in the response list
total integer Mandatory Number of objects in total

Example 2.10. JSON Example


preference

Element Name Element Data Type Element Presence Element Definition
key string Mandatory Preference key name
cat string Mandatory Preference category
value string Mandatory Preference value

Example 2.11. JSON Example


preferences (list)

Example 2.12. JSON Example


user

Element Name Element Data Type Element Presence Element Definition
id string Mandatory The user ID
network string Optional The network value. The default value is "yahoo".

Example 2.13. JSON Example


users (list)

Example 2.14. JSON Example


users (collection)

Element Name Element Data Type Element Presence Element Definition
users Refer to "users (list)" Mandatory Refer to "users (list)"
start integer Mandatory Offset to first object
count integer Mandatory Number of objects in the response list
total integer Mandatory Number of objects in total

Example 2.15. JSON Example


error

Element Name Element Data Type Element Presence Element Definition
code integer Mandatory The application error code
detail string Mandatory The application error detail. This string is not localized.
description string Mandatory The application error description. This string is not localized.

Example 2.16. JSON Example


addressbook

Element Name Element Data Type Element Presence Element Definition
id string Mandatory AddressBook Record ID
nickname string Optional Nickname
firstname string Optional Firstname
lastname string Optional Lastname
mobileno string Optional Mobile Number
homeno string Optional Home Number
workno string Optional Work Number
email string Optional Email Address
lastModified integer Optional Value represented as time in second since the Epoch

Example 2.17. JSON Example


Table of Contents