x-api-key: bhztHDI82kehfkXjz22
https://www.magnetis-in.com/v1/
Vous pouvez suivre les différentes versions de l'API depuis cette page. Actuellement, la version en production est la version v1.
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://www.magnetis-in.com/v1/accounts/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "x-api-key: yourapikey1234" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
{ "123": { "company_name": "Cie ABC", "email": "contact@cie-abc.com", "plan": "start" }, "456": { "company_name": "Cie XYZ", "email": "contact@cie-xyz.com", "plan": "premium" } }
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://www.magnetis-in.com/v1/accounts/123/numbers/0033123456789/calls?DateFrom=20211101&DateTo=20211130", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "x-api-key: yourapikey1234" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
{ "123456": { "datecall": "28/11/21", "heurecall": "12h52", "timestampcall": "20211128125234", "callingNumber": "0033612345672", "calledNumber": "0033123456789", "supportNumero": "My website", "duration": "124", "typeNumero": "mobile", "paysNumero": "fr" }, "654321": { "datecall": "14/11/21", "heurecall": "09h23", "timestampcall": "20211114092347", "callingNumber": "0033123456789", "calledNumber": "0033123456789", "supportNumero": "My website", "duration": "321", "typeNumero": "fixe", "paysNumero": "fr" } }
var settings = { "async": true, "crossDomain": true, "url": "https://www.magnetis-in.com/v1/accounts/123/numbers/getlist", "method": "GET", "headers": { "x-api-key": "yourapikey1234", } } $.ajax(settings).done(function (response) { console.log(response); });
var data = null; var xhr = new XMLHttpRequest(); xhr.withCredentials = false; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://www.magnetis-in.com/v1/accounts/123/numbers/getlist"); xhr.setRequestHeader("x-api-key", "yourapikey1234"); xhr.send(data);
{ "0033123456789": { "numero": { "numero": "0033123456789", "supportnumero": "My website", "formatInternational": "0033123456789", "formatNational": "0123456789", "paysNumero": "fr", "typeNumero": "fixe" } } }