Contact

Each user can have contacts with whom he can share his checklists or tasks. The contacts object allows you to manage this list of contacts: invite, accept invitations and list contacts. References to a contact should be through the contact id which is system generated.

A contact object contains the following fields:

email the contact's email address
contactId the contact's id
accountId the account id of the contact. This is only valid once the contact has created an account with checklist.com
name contact name
status the status the contact. Possible values are 0 (active) or 1 (pending)
avatar the url of the avatar of the contact (if exists)
inviter whether the contact initiated the relationship

Sample Contact XML

<contact>
    <contactId>123</contactId>
    <accountId>4565</accountId>
    <name>Bill Clinton</name>
    <email>[email protected]</email>
    <status>1</status>
    <avatar>http://media.checklist.com/images/myuser/myuser.jpg</avatar>
    <inviter>true</inviter>
</contact>

Sample List of Contacts XML

<contacts>
    <contact>
        <contactId>123</contactId>
        <accountId>4565</accountId>
        <name>Bill Clinton</name>
        <email>[email protected]</email>
        <status>1</status>
        <avatar>http://media.checklist.com/images/myuser/myuser.jpg</avatar>
        <inviter>true</inviter>
    </contact>
    <contact>
        <contactId>124</contactId>
        <accountId>9876</accountId>
        <name>George Bush</name>
        <email>[email protected]</email>
        <status>0</status>
        <avatar>http://media.checklist.com/images/myuser2/myuser2.jpg</avatar>
        <inviter>false</inviter>
    </contact>
</contacts>                 

Supported methods

Get Contacts List

Method list
Description Get a list of user contacts
URL https://api.checklist.com/rest/v1/contacts/list [GET]
Authentication required
Parameters None
Response A list of the user's contacts
Errors 401UnAuthorized - returned if not authorized to perform this action
Throttling normal

Invite contact

Method invite
Description Invite a contact
URL https://api.checklist.com/rest/v1/contacts/invite?email={email}&name={name}&message={message} [POST]
Authentication required
Parameters emailthe email of the invited contact
name(*)the name of the invited contact. Max 50 chars.
message(*)a message to be added to the invitation. Maximum of 500 chars.
Response The newly pending contact object
Errors 400Invalid Parameters - returned if email is invalid
400If Contact already exists
401UnAuthorized - returned if not authorized to perform this action
Throttling normal

Accept invitation

Method accept
Description Accept an invitation from a contact
URL https://api.checklist.com/rest/v1/contacts/{contactId}/accept [PUT]
Authentication required
Parameters contactIdthe contact id of the contact to be accepted
Response 200
Errors 400Contact already accepted
401UnAuthorized - returned if not authorized to perform this action
404No such contact id
Throttling normal

Decline invitation

Method decline
Description Decline an invitation from a contact. This can also be called for an already accepted contact in effect removing it from the contacts list.
URL https://api.checklist.com/rest/v1/contacts/{contactId}/decline [DELETE]
Authentication required
Parameters contactIdthe contact id of the contact to be declined
Response 200
Errors 401UnAuthorized - returned if not authorized to perform this action
404No such contact id
Throttling normal
* - optional parameter.   | x - x is the default value if none provided