DocumentService :: InsertEntete

The POST method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • TypeDocument typeDocument,
  • DateTime date,
  • string numeroDocument,
  • string numeroTiers

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

Input parameters:

{"typeDocument":0,"date":"\/Date(1426201200000+0100)\/","numeroDocument":"BC00028a2","numeroTiers":"DIAMA"}

Example:

require (__DIR__ . '/service/Document.php');
use services\Document;
use services\Webservices100;
$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/DocumentService/rest/InsertDocument';
$data = new stdClass();
$data->typeDocument = 0;
$data->date = "/Date(1426201200000+0100)/";
$data->numeroDocument = "BC00028a2";
$data->numeroTiers = "DIAMA";
$json_data = json_encode($data);
// Send requests to receive data
$result = WebServices100::getData($url, $json_data);
$response = json_decode($result);

Result:

BC00028