Reward API Object

A reward is represented as the following JSON object in all API responses.

{
  "object_id": "rwd_0bb38c3719a572e149e51fdec9a159b1",
  "object": "reward",
  "is_monetary": false,
  "is_redeemed": false,
  "amount": 1000,
  "created": 1502486922,
  "person": {
    "object_id": "per_7bba99740fe55a1938696fa789f1b392",
    "object": "person",
    "name": "Keegan Christiansen",
    "email": "[email protected]",
    "created": 1503322719
  }
}

A list of rewards is represented as follows:

{
  "rewards": [...]
}

Reward Retrieval API

You can filter and retrieve rewards through:

Don't forget to replace the following placeholders with your own values when running the commands:

Retrieve a campaign's all or pending rewards

curl -X GET \\
    -H "Accept: application/json" \\
    -H "Authorization: Bearer __API_KEY__" \\
    "<https://api.referralmagic.co/campaigns/__CAMPAIGN_ID__/rewards>"

If you want to retrieve pending rewards only, add ?pending=1 at the end of URL.

Retrieve a person's all or pending rewards

curl -X GET\\
    -H "Accept: application/json"\\
    -H "Authorization: Bearer __API_KEY__"\\
    "<https://api.referralmagic.co/people/__PERSON_ID__/rewards>"