/addpos
This function allows you to add new points of sale.
- Endpoint: https://app.fideljet.com/rest/addpos
- Type: Post
apikey | API KEY | You can get it from your profil https://app.Fideljet.com/profil then apikey section |
name | POS Name | POS Name |
password | POS Password | Default password : « 123456 » |
validation_code | POS Validation code | POS Validation code before every transaction. Default validation code : « 1234 » |
address | POS Address | POS Address |
contact_mobile | Contact Mobile | Contact Mobile |
contact_email | Contact Email address | Contact 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" } }