Send a Contest Entry Link
From ePrize Developers Wiki
(Difference between revisions)
(→Send a Link to a Contest Entry) |
|||
Line 1: | Line 1: | ||
- | = | + | {{RESTfulAPI |
+ | |crumbs=[[API Home Page]] :: [[Contest API|Contest]] | ||
+ | |summary=Send a link to a [[Enter Contest|contest entry]] to a friend. The result will be an email sent to a friend. The content of the email and formatting must be configured with your [[API Key]]. | ||
+ | |resource=/v1/{apikey}/contest/entry/{entryId}/send_a_link | ||
+ | |methods=POST | ||
+ | |resourceargs='''apikey''': Your [[API Key]]. | ||
- | + | '''entryid''': ID of the entry retrieved from [[Enter Contest|entry creation]] or by viewing the [[Browse_Contest_Gallery|gallery]]. | |
- | + | |paramsrequired='''profile''': Canonical Location of a user profile. See: [[Fetch_profile_by_key|Fetch Profile by Key]] | |
- | + | ||
- | + | '''name''': Friend's name | |
- | + | ||
- | + | '''email''': Friend's email address | |
- | + | }} | |
- | + | {{RESTfulExample | |
- | + | |title=Successful response | |
- | + | |summary=Demonstrates successful response | |
- | + | |request=profile: http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV | |
- | + | name: Friend | |
- | + | email: friend@sample.com | |
- | + | |responsecode=200 OK | |
- | + | |response=<?xml version="1.0" encoding="UTF-8" ?> | |
- | + | ||
- | + | ||
<result> | <result> | ||
<status>1</status> | <status>1</status> | ||
</result> | </result> | ||
+ | }} | ||
+ | {{RESTfulExample | ||
+ | |title=Missing name | ||
+ | |request=profile: http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV | ||
+ | email: friend@sample.com | ||
+ | |responsecode=400 Bad Request | ||
+ | |response=<?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <result> | ||
+ | <input_error> | ||
+ | <name>name</name> | ||
+ | <error>1</error> | ||
+ | <message></message> | ||
+ | </input_error> | ||
+ | </result> | ||
+ | }} | ||
+ | {{RESTfulExample | ||
+ | |title=Missing email | ||
+ | |request=profile: http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV | ||
+ | name: Friend | ||
+ | |responsecode=400 Bad Request | ||
+ | |response=<?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <result> | ||
+ | <input_error> | ||
+ | <name>email</name> | ||
+ | <error>1</error> | ||
+ | <message></message> | ||
+ | </input_error> | ||
+ | </result> | ||
+ | }} |
Revision as of 19:40, 19 April 2011
Summary
Send a link to a contest entry to a friend. The result will be an email sent to a friend. The content of the email and formatting must be configured with your API Key.
Resource
/v1/{apikey}/contest/entry/{entryId}/send_a_link
Valid Methods
POST
Resource Arguments
Note: resource arguments are always required.
apikey: Your API Key.
entryid: ID of the entry retrieved from entry creation or by viewing the gallery.
Parameters Required
profile: Canonical Location of a user profile. See: Fetch Profile by Key
name: Friend's name
email: Friend's email address
Example: Successful response
Summary
Demonstrates successful response
Request
profile: http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV name: Friend email: friend@sample.com
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result> <status>1</status> </result>
Example: Missing name
Request
profile: http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV email: friend@sample.com
Response
HTTP Status Code: 400 Bad Request
<?xml version="1.0" encoding="UTF-8" ?> <result> <input_error> <name>name</name> <error>1</error> <message></message> </input_error> </result>
Example: Missing email
Request
profile: http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV name: Friend
Response
HTTP Status Code: 400 Bad Request
<?xml version="1.0" encoding="UTF-8" ?> <result> <input_error> <name>email</name> <error>1</error> <message></message> </input_error> </result>