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": [...]
}
You can filter and retrieve rewards through:
Don't forget to replace the following placeholders with your own values when running the commands:
__API_KEY__
- your api key__CAMPAIGN_ID__
- campaign object id__PERSON_ID__
- person object id__EMAIL_ADDRESS__
- person email addresscurl -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.
curl -X GET\\
-H "Accept: application/json"\\
-H "Authorization: Bearer __API_KEY__"\\
"<https://api.referralmagic.co/people/__PERSON_ID__/rewards>"