|
Mokugift API: Create Reward, No Send
Description
This call would create a Reward for the specified campaign, returns the URL to the Reward (no email will be sent to the recipient).
API version = 1.0
Request Information
EndPoint URL: |
http://www.mokugift.com/api/reward_url/<campaign_id> |
 |
HTTP Method: |
POST |
Request Parameters
Parameter |
Value |
Description |
<campaign_id> (on URL) |
String (required) |
The unique ID for the reward campaign. |
passcode |
String (required) |
The unique passcode for the reward campaign. |
recipient_email |
String (required) |
The email address of the recipient for the reward. |
recipient_name |
String |
The fullname of the recipient for the reward. |
Sample Request URL:
with the following query parameters passed in the POST data block:
If you know how to use cURL, here's a sample POST in cURL command-line syntax:
Response Elements
Fields |
Parent Field |
Description |
result |
n/a |
Root element that contain the whole response |
version |
result |
Version of the Mokugift API. |
status |
result |
Status of this call: Success or Failed. |
transaction_id |
result |
Unique ID for this transaction or call. |
reward |
result |
This element contain all the information about the created reward. |
id |
reward |
Unique ID of the created reward. |
recipient_email |
reward |
The email of the recipient of the created reward. |
url |
reward |
The URL for the recipient to receive the created reward. (The REST client is expected to send this URL to the recipient). |
error |
result |
Only when status=Failed. Error Information: code & description. Please see Complete list of Errors |
Sample Response 1:
Sample Response 2: (With Error)
|