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

Share Offer

Will share an offer to an email address.  This is very similar to refer friends.

Method: POST api/v3/publisher/offers/{offerId}/share
Authentication: oauth
 
Parameters
 offerId - The id of the offer being shared.

Post
Required Form Name Data Type Explanation
Yes
FromEmail string The email address that the request is coming from.
No
FromName
string The name of the person sending the share offer.
No Message string The optional message to be sent along with the request.
YesRecipients[0...n]
list The list of email recipients that should receive the email.  At least one is required.
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 SegmentKey string The segment key of the offer being shared.

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 sent.


Sample Request:

POST http://api.groupcommerce.com/api/v3/publisher/offers/7064/share

Form: FromName=DJ&FromEmail=fromEmail%40test.com&Message=This+is+an+important+message+from...&OfferId=7064&SegmentKey=new-york&ReferredByUserKey=&Recipients%5b0%5d.Email=groupcommerce%40test.com&Recipients%5b0%5d.Name=gc

Authorization: OAuth oauth_signature="X7TvIafaER3n%2fgL2e63%2b4%2fYVyzY%3d", oauth_nonce="4004760", oauth_timestamp="1320794862", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"


Sample JSON Response:

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


Sample XML Response:

<shareOfferResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-10-28T00:41:46.6073105Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <emailsSent>1</emailsSent>
</shareOfferResponse>
Comments