1. Accueil
  2. API
  3. Get contact informations

Get contact informations

/getcontact

This function allows you to get a specific contact informations.

  • Endpoint: https://app.fideljet.com/rest/getcontact
  • Type: Post

 

apikeyAPI KEYYou can get it from your profil
https://app.Fideljet.com/profil then apikey section
emailEmail addressContact email address, mandatory if mobile value is empty
mobileMobileContact mobile phone
mandatory if email value is empty

 

Here is a PHP exemple:

<?php 
$curl = curl_init(); $apikey = "YOUR_API_KEY"; 
$email = "[email protected]"; // Email address 
$mobile = "0600000000"; // Mobile contact
curl_setopt_array($curl, array( CURLOPT_URL => "https://app.fideljet.com/rest/getcontact",
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\"}",
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;
}

?>

Résultat:

{
   "message":"Success",
   "success":true,
   "data":{
      "contact":[
         {
            "Contact":{
               "name":"name",
               "mobile":"+212600000000",
               "email":"[email protected]",
               "points":"6",
               "montant":600,
               "card_number":null,
               "member":"1",
               "membersince":"2018-07-03 00:00:00",
               "bounce":null,
               "unsubscribe_email":"0",
               "unsubscribe_sms":"0",
               "birthday":"1990-01-01",
               "city":null,
               "address":null,
               "notes":null,
               "created":"2018-07-03 00:04:18",
               "modified":"2018-07-03 00:04:18"
             }
         }
      ]
    }
}

 

Cet article vous a-t-il été utile ? Oui Non