Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Methods‎ > ‎1 - Offer‎ > ‎

Share

Will share a specific offer with a friend.

Method: /api/v2/publisher/offers/{offerId}/share
Authentication: oauth

Required Parameters:
  offerId - The id of the offer being shared.


Post
Requried Form Name Explanation
Yes
FromEmail
The email address who is sending the invite
No
FromName
The name who is sending the invite.
No
SegmentKey
The segment key of the offer being shared.
No
Message
The custom message to be supplied to the invite
Yes
Recipients[0 ... N]
A list of EmailRecipients.  One is required

EmailRecipient
:
  Email - The email address being invited.  (required)
  Name - The name that should appear on the invite.  Optional.

Returns:
  success - Whether or not emails were sent.
  emailsSent - The number of emails that were sent.

Sample Request:
POST /api/v2/publisher/offers/1499/share HTTP/1.1

FromName=Sylvester%20Martin&FromEmail=email%40email.com&Message=My%20Personal%20Message&SegmentKey=boston&OfferId=1499&Recipients%5B0%5D.Email=friend1%40email.com&Recipients%5B1%5D.Email=friend2%40email.com

Authorization: OAuth oauth_consumer_key="2ef75cb3-6579-49d3-a804-c0a0d1b3d5d0", oauth_nonce="KSF1c", oauth_signature="8%2FYAiAI35IFOCpkuq1%2FTF9pL94E%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1306884390", oauth_version="1.0"


Host: apitest.groupcommerce.com

Sample XML Response:
<shareOfferResult>
    <success>true</success>
    <emailsSent>2</emailsSent>
</shareOfferResult>


Sample JSON Response:
{
    "emailsSent":2,
    "success":true
}


Comments