Community articleInviting a person to become your colleague
Added by IBM contributorIBM on April 13, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To invite a person to become your colleague, send an Atom entry document containing the connection resource to the person's colleague connections feed.



To invite a person to become your colleague, send an Atom entry document containing the connection resource to the person's colleague connections feed.

To find a person's colleague connections feed, you can search for the person by name. From the returned feed, find the person and retrieve her associated user ID, and then use the user ID to retrieve the person's full feed, which includes a link to her colleague connections feed.

After you send the invitation, the connection is added to your connections in an unconfirmed state. The connection is added to the connections of the person you invited in a pending state. See Accepting an invitation to become a colleague or Deleting connections for information about how to accept or decline an invitation.

See Authenticating requests for information about how to authenticate the request.

Process

1. Retrieve any user's Profiles service document using the user's credentials to authenticate the request. See Retrieving the Profiles service document
2. In the service document, find the href attribute value where the value of the rel attribute is http://www.ibm.com/xmlns/prod/sn/connections/colleague
For example: https://example.server.org/profiles/atom/connections.do?connectionType=colleague&key=23e29c58-c16e-467b-8f72-d9d05fc0fef1&lastMod=1395486462948
3. With the link specified by step 2, perform a POST using the sample request entry. This will send an invite to that person requesting them to be your connections colleague.

See Accepting an invitation to become a colleague or Deleting connections for information about how to accept or decline an invitation.

Input
Method URI Description
POST /profiles/atom/connections.do Value of the href attribute of the <link> element with the rel="http://www.ibm.com/xmlns/prod/sn/connections/colleague" attribute value. Note: You must include the connectionType=colleague parameter with this request.
Content Type: application/atom+xml
Sample Request:
 	

<entry xmlns="http://www.w3.org/2005/Atom">
   <content type="text">Please be my new colleague connection!</content>
   <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="connection" />
   <category scheme="http://www.ibm.com/xmlns/prod/sn/connection/type" term="colleague" />
   <category scheme="http://www.ibm.com/xmlns/prod/sn/status" term="pending" />
</entry>
Name Type Optional Description
email
string Yes The internet email address of the person whose Profile you wish to receive.
email=ajones90@enterprise.example.com
You must use either email or key to send a connections colleague invite.
key
string No An ID generated by Profiles to identify a person.
You must use either email or key to send a connections colleague invite.
connectionType
string No Identifies the type of connection to look for. You must specify connectionType=colleague.
Output
Name Type Optional Description
Location
string No Link to edit_url of the connection entry. You can use the web address specified here to subsequently retrieve and update the connection.
Code Description
201
Indicates that the invitation to connect was successfully created.
400
Bad Request. Returned when no matching user record can be found.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
Here is a sample request entry and response for a colleague invitation. Note that in deployments where email is exposed, the invitee may be referenced by the email parameter, otherwise the key parameter should be used
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
  <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="connection"/>
  <category scheme="http://www.ibm.com/xmlns/prod/sn/connection/type" term="colleague"/>
  <category scheme="http://www.ibm.com/xmlns/prod/sn/status" term="pending"/>
  <!-- Message to other user -->
  <content type="html">

   Please accept this invitation to be in my network of Connections colleagues.

  </content>
</entry>

Response returned by the server
HTTP/1.1 201 Created

Location: https://connections.example.com/profiles/atom/connection.do?connectionId=3af94660-0b59-40fc-ac63-167d111c208d