Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎2 - Consumer Related‎ > ‎

Refer Friends

This method will send an email to the recipients inviting them to come to the site.  Setting the ReferredByUserKey will append questring value ref=<userKey> to any links sent out so the site can cookie the recipient users for referral tracking.

Method: POST /api/v3/publisher/referfriends

Authentication: oauth
 
Post
Required Form Name Data Type Explanation
Yes
FromEmail string The email address to record.
No
FromName string The name of the user doing the referring.
No Message string The custom message that should be included in the email.
No SegmentKey string The segment key the friends should be referred to.  This might create the link to the multi deal page.  If provided, it should be a valid segment key.
No ReferredByUserKey string
The user key of the person sending the share offer. If supplied will append the querystring 'ref={userKey}' so the site can track referrals for purchase and sign up.
No ReferUrl string If referring a friend to a specific page, set that value here.
Yes Recipients[0...n] EmailRecipient The list of email recipients that should receive the email.  At least one is required.

EmailRecipient

Required Form Name Data Type Explanation
Yes
Email string The recipient's email address.
No
Name string The recipient's name.


Returns
base response fields
emailsSent - The number of emails that were actually sent.


Sample Request:

POST http://api.groupcommerce.com/api/v3/publisher/referfriends

Form: FromName=Sylvester+Martin&FromEmail=me%40email.com&Message=You+really+should+check+this+out.&SegmentKey=&ReferredByUserKey=&ReferUrl=&Recipients%5b0%5d.Email=apisupport%2bdocs%40groupcommerce.com&Recipients%5b0%5d.Name=Api+docs

Authorization: OAuth oauth_signature="xhD7EUrgyPN7xmr%2ft1I2aueV1Pg%3d", oauth_nonce="1532864", oauth_timestamp="1320359829", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"


Sample JSON Response:

{
    "errors":[],
    "lastPublished":"/Date(1320359835355)/",
    "success":true,
    "version":"3",
    "emailsSent":1
}


Sample XML Response:

<referFriendsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-11-03T22:38:53.6751687Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <emailsSent>1</emailsSent>
</referFriendsResponse>
Comments