/givereward
This function allows you to give rewards to your members.
- Endpoint: https://app.fideljet.com/rest/givereward
- Type: Post
apikey | API KEY | You can get it from your profil https://app.Fideljet.com/profil then apikey section |
Email address | Contact email address, mandatory if mobile value is empty | |
mobile | Mobile | Contact mobile phone mandatory if email value is empty |
reward_id | Reward Id | Reward Id |
Here is a PHP exemple:
<?php $curl = curl_init(); $apikey = "YOUR_API_KEY"; $email = "[email protected]"; // Member email address $mobile = "0600000000"; // Member mobile phone $reward_id = '_Reward_id_';// Reward id /* Exemple result { "message":"Success", "success":true } */ curl_setopt_array($curl, array( CURLOPT_URL => "https://app.fideljet.com/rest/givereward", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{ \"apikey\":\"$apikey\",\"email\":\"$email\",\"mobile\":\"$mobile\",\"reward_id\":\"$reward_id\"}", CURLOPT_HTTPHEADER => array( "accept: application/json", "content-type: application/json" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?>