Register | Login | Feedback | 日本

mokugift rewards
The meaningful and effective way to motivate your customers

Rewards Home | How it works| How we plant| FAQ| Developer Center

Contact mokugift:

415.508.6658

sales@mokugift.com

Contact Form

Developers Menu

Mokugift API Home
Mokugift Sandbox
Login to access IDs & Passcodes

Mokugift API: Create Multiple Rewards, No Send, No Email Addresses

Description

This call would creates a Reward for each of the recipients provided for the specified campaign without passing in the recipient's emails. It returns a list of URLs to the Rewards while no email will be sent to the recipients.

(You will be passing in an unique ID of the recipient that your system recognizes.)

API version = 1.0

Request Information

EndPoint URL:

http://www.mokugift.com/api/multi_reward_urls2/<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:

  1. ID (e.g. "user1234")
  2. name <ID> (e.g. "John Smith <user1234>")

An example value: "John Smith <user1234>, user6789"

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_id

reward

The unqiue ID of the recipient of the created reward. (ID passed in and recognized by your system)

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.

recipient_id

unsent_reward

The unqiue ID of your user for which reward was failed to be created. (ID passed in and recognized by your system)

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)

Copyright © 2009 Mokugift All Right Reserved