1. Accueil
  2. API
  3. Add / Update POS

Add / Update POS

/addpos

This function allows you to add new points of sale.

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

 

apikeyAPI KEYYou can get it from your profil
https://app.Fideljet.com/profil then apikey section
namePOS NamePOS Name
passwordPOS PasswordDefault password : « 123456 »
validation_codePOS Validation codePOS Validation code before every transaction.
Default validation code : « 1234 »
addressPOS AddressPOS Address
contact_mobileContact MobileContact Mobile
contact_emailContact Email addressContact Email address

 

Here is a PHP exemple:

<?php 
$curl = curl_init(); $apikey = "YOUR_API_KEY"; 
$name = "POS NAME"; // POS Name
$password = "_PASSWORD_"; // POS Password
$validation_code = "_VALIDATION_CODE"; // POS Validation Code 
$address = "POS address"; // POS  address
$contact_email = "[email protected]"; // Contact Email address 
$contact_mobile = "0600000000"; // Contact Mobile
curl_setopt_array($curl, array( CURLOPT_URL => "https://app.fideljet.com/rest/addpos",
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\",\"name\":\"$name\",\"password\":\"$password\",\"validation_code\":\"$validation_code\",\"address\":\"$address\",\"contact_mobile\":\"$contact_mobile\",\"contact_email\":\"$contact_email\"}",
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":"Pos added successfully",
   "success":true,
   "data":{
      "login":"6BBHGD",
      "password":"123456",
      "validation_code":"1234"
    }
}

 

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