|
Mokugift API: Create Multiple Rewards, No Send
Description
This call would create a Reward for each of the recipients provided for the specified campaign, returns a list of URLs to the Rewards (no email will be sent to the recipients).
API version = 1.0
Request Information
EndPoint URL: |
http://www.mokugift.jp/api/multi_reward_urls/<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_list |
String (required) |
The list of the recipients for the rewards. Recipients are separated by comma's ','.
Each recipient can be repersented in either of the following 2 formats:
- email (e.g. "john@smith.com")
- name <email> (e.g. "John Smith <john@smith.com>")
An example value: "John Smith <john@smith.com>, sally@chan.com"
Note: There is a maximum limit of 1,000 rewards can be created in a single REST call.
|
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
Part_Failed (some but not all rewards are created)
Failed (no rewards are created)
|
transaction_id |
result |
Unique ID for this transaction or call. |
rewards |
result |
This element contain all the rewards created. |
reward |
rewards |
This element contain all the information about each 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). |
unsent_rewards |
result |
This element contain all the rewards that are not created. |
unsent_reward |
unsent_rewards |
Information of each reward that was not created. |
email |
unsent_reward |
Email address for which reward was failed to be created. |
error |
unsent_reward |
Reason why this reward was not created. Error Information: code & description. Please see Complete list of Errors |
error |
result |
Only when status=Failed. Error Information: code & description. Please see Complete list of Errors |
Sample Response 1:
Sample Response 2: (with Part-Failed status)
|