CompteAnalytiqueService :: GetCompteAnalytique

The POST method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • short IdPlanAnalytique.
  • string compte.

Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).

Input parameters:

{"IdPlanAnalytique":1,"compte":"921SI1"}

Example:

require (__DIR__ . '/service/WebServices100.php');

use services\WebServices100;

$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/CompteAnalytiqueService/rest/GetCompteAnalytique';

// add parameters
$data = new stdClass();
$data->IdPlanAnalytique = 1;
$data->compte = "921SI1";
$json_data = json_encode($data); // Send requests to receive data $result = WebServices100::getData($url, $json_data); $response = json_decode($result);

Result:

stdClass Object
(
    [IdPlanAnalytique] => 1
    [Section] => 921SI1
    [Intitule] => Direction commerciale
    [TypeCompte] => 0
    [EstEnSommeil] => 
    [InfosLibres] => Array
        (
        )

)