Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Methods‎ > ‎3 - Consumer‎ > ‎

Invite

Will invite a friend to the publisher site.

Method: /api/v2/publisher/invite/{segmentKey}
Authentication: oauth

Required Parameters:
 
segmentKey - A valid segment key for the publisher. eg "new-york", "national"


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
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/invite/boston HTTP/1.1

FromName=Sylvester%20Martin&FromEmail=email%40email.com&Message=Custom%20Message&SegmentKey=boston&Recipients%5B0%5D.Email=friend%40email.com&Recipients%5B1%5D.Email=%20friend2%40email.com

Authorization: OAuth oauth_consumer_key="2ef75cb3-6579-49d3-a804-c0a0d1b3d5d0", oauth_nonce="XpZIX", oauth_signature="bHRF6X6mu41O9qXsZgu3HYP0shI%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1306883285", oauth_version="1.0"

Host: apitest.groupcommerce.com

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


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


Comments