require($_SESSION["ini"]["config"]["documentRoot"]."/include/api_client.class.php");
$api_client = new api_client("https://wapp-atchs.cloudx.nrg-web.net");
$array_data = array(
"azienda" => 0,
"nome_file" => "distinta.pdf",
"allegato" => {CONTENUTO FILE CODIFICATO BASE64}
);
$result = $api_client->exec("POST", "/api/upload_file", $array_data);
if ($result === false) {
echo $api_client->errorMsg;
}
else {
echo print_r($result, true);
}