Incisively DOCS back to main site

Rewards

Inform Incisively of a goal (e.g., sign-up, purchase or click-through).

Because reward tokens are unique to a user and lab, Incisively does not need to know any details about the user or lab; it can attribute the reward to the correct lab just using the token.

Request

POST https://bandits.incisive.ly/v1/reward

Parameters

key description
token The unique reward token value that was provided with this User’s suggestion.
context (optional) A JSON object with a value key to be used with Real Value labs.

Example

Token only

curl -d 'token=FOOBAR' https://bandits.incisive.ly/v1/reward

Token and Context (Real Value Labs)

curl -X POST \
     --data-urlencode 'token=FOOBAR' \
     --data-urlencode 'context={"value":100.0}' \
     https://bandits.incisive.ly/v1/reward

N.B. curl --data-urlencode sets the Content-Type: application/x-www-form-urlencoded header and URL-encodes the form values.

Response

If the reward is accepted, the response will be 204 No Content.

If the reward token has already been used, or there is some other error with the request, the response will be 400 Bad Request and contain an error message.

Notes

  • If you have multiple Labs that share a goal (e.g. ‘Checkout Complete’), make sure you send a reward token for each Lab you want to reward.

  • If your website or application uses multiple Labs with separate goals (e.g. Lab A’s goal is checkouts, but Lab B’s goal is newsletter signups), take extra care to send the correct token for the Lab you want to reward.

  • Once you have sent a reward, you’re free to delete the reward_token, since it’s no longer valid.