DocumentService :: UpdateChampsDocument

The POST method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • TypeDocument typeDocument,
  • string numeroDocument,
  • ChampsDocumentUpdate champs,
  • object value.

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,
"champs":2,
"value":"FA00011AA"
}

Example:

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

use services\DocumentService;
use services\WebServices100;

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

// add parameters
$data = new stdClass()
$data->numeroDocument = FA00011
$data->typeDocument= 6
$data->champs= 2
$data->value= FA00011AA


$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