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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
# module ConsumerApi
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ReferFriendUser:
first_name: Optional[str] = None
last_name: Optional[str] = None
profile_photo_url: Optional[str] = None
class ReferFriendState(str, Enum):
AVAILABLE = 'Available'
AWARDED = 'Awarded'
CAN_NOT_REFER_YOURSELF = 'CanNotReferYourself'
YOU_WERE_ALREADY_SIGNED_UP = 'YouWereAlreadySignedUp'
EXPIRED = 'Expired'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ReferFriendLinkUsedResponse:
referring_user: Optional[ReferFriendUser] = None
state: Optional[ReferFriendState] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ReferFriendLinkUsedRequest(IPost):
refer_friend_token: Optional[str] = None
Python ReferFriendLinkUsedRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"referFriendToken":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"referringUser":{"firstName":"String","lastName":"String","profilePhotoUrl":"String"},"state":"Available"}