POST | /share/refer-friend-link-used | A friend referral link was used | Validates the JWT token with the identity of the referring user and returns relevant information. |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class ConsumerApi
{
public static class ReferFriendLinkUsedRequest implements IPost
{
public String referFriendToken = null;
public String getReferFriendToken() { return referFriendToken; }
public ReferFriendLinkUsedRequest setReferFriendToken(String value) { this.referFriendToken = value; return this; }
}
public static class ReferFriendLinkUsedResponse
{
public ReferFriendUser referringUser = null;
public ReferFriendState state = null;
public ReferFriendUser getReferringUser() { return referringUser; }
public ReferFriendLinkUsedResponse setReferringUser(ReferFriendUser value) { this.referringUser = value; return this; }
public ReferFriendState getState() { return state; }
public ReferFriendLinkUsedResponse setState(ReferFriendState value) { this.state = value; return this; }
}
public static class ReferFriendUser
{
public String firstName = null;
public String lastName = null;
public String profilePhotoUrl = null;
public String getFirstName() { return firstName; }
public ReferFriendUser setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public ReferFriendUser setLastName(String value) { this.lastName = value; return this; }
public String getProfilePhotoUrl() { return profilePhotoUrl; }
public ReferFriendUser setProfilePhotoUrl(String value) { this.profilePhotoUrl = value; return this; }
}
public static enum ReferFriendState
{
Available,
Awarded,
CanNotReferYourself,
YouWereAlreadySignedUp,
Expired;
}
}
Java ReferFriendLinkUsedRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /share/refer-friend-link-used HTTP/1.1
Host: unstable-consumer-api.brovs.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"referFriendToken":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"referringUser":{"firstName":"String","lastName":"String","profilePhotoUrl":"String"},"state":"Available"}