EcritureService :: InsertAnalytiques
The POST method, is used to retrieve data.
The list of necessary parameters for sending a query:
- Array of EcritureAnalytique
Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).
Input parameters:
{
"list": [
{
"ecritureAnalytique": {
"IdEcriture": 492,
"IdPlanAnalytique": 1,
"Section": "921SI1",
"Montant": 350
}
}
]
}
Example:
require (__DIR__ . '/service/WebServices100.php');
use services\EcritureAnalytique;
use services\WebServices100;
// add parameters
$ecritureAnalytique = new EcritureAnalytique();
$ecritureAnalytique-> setIdEcriture(492);
$ecritureAnalytique-> setIdPlanAnalytique(1);
$ecritureAnalytique-> setSection("922LY1");
$ecritureAnalytique-> setMontant(400);
$data = new stdClass();
$data->list[]->ecritureAnalytique = $ecritureAnalytique->getResponse();
$json_data = json_encode($data, JSON_UNESCAPED_SLASHES);
// Send requests to receive data
$result = WebServices100::getData($url, $json_data);
$response = json_decode($result);
Result:
BOOLEAN