DocumentService :: UpdateInfosLibres

The POST method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • TypeDocument typeDocument,
  • string numeroDocument,
  • List<InfoLibre> infosLibresList.

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

Input parameters:

{"numeroDocument":"FA00011",
"typeDocument":6,
"infosLibresList":
[
{
"Name":"Commentaires",
"Type":0,
"Size":69,
"EstCalculee":false,
"Value":"AA - AA - AA - AA - "
},
{
"Name":"Divers",
"Type":0,
"Size":69,
"EstCalculee":false,
"Value":"AA - AA - AA - AA - "
},
{
"Name":"TestTableEntete",
"Type":0,
"Size":21,
"EstCalculee":false,
"Value":"AA - AA - AA - AA - "
},
{
"Name":"testDate",
"Type":1,
"Size":0,
"EstCalculee":false,
"Value":"2018-03-31T00:00:00"
},
{
"Name":"testDecimal",
"Type":3,
"Size":0,
"EstCalculee":false,
"Value":8.000000
}
]
}

Example:

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

use services\DocumentService;
use services\WebServices100;

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

// add parameters
$data = new stdClass()
$data->numeroDocument = FA00011
$data->typeDocument= 6
...

$data = $document->getResponse();
$data_json = json_encode($data);

// Send requests to receive data
$result = WebServices100::getData($url, $data_json);

$response = json_decode($result);

Result:

BOOLEAN