Perl Fatturazione Elettronica Aruba IT: Monitor Check

Back to Index

Restituisce il valore del metodo check monitor

Documentation: https://fatturazioneelettronica.aruba.it/apidoc/docs.html#_monitorcheck

CURL Command

curl -X POST  https://demows.fatturazioneelettronica.aruba.it/services/invoice/MonitorCheck \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE='

Perl Example

use chilkat();

$rest = chilkat::CkRest->new();

#  URL: https://demows.fatturazioneelettronica.aruba.it/services/invoice/MonitorCheck
$bTls = 1;
$port = 443;
$bAutoReconnect = 1;
$success = $rest->Connect("demows.fatturazioneelettronica.aruba.it",$port,$bTls,$bAutoReconnect);
if ($success != 1) {
    print "ConnectFailReason: " . $rest->get_ConnectFailReason() . "\r\n";
    print $rest->lastErrorText() . "\r\n";
    exit;
}

$rest->AddHeader("Content-Type","application/json");
$rest->AddHeader("Authorization","Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE=");
$rest->AddHeader("Accept","application/json");

$sbResponseBody = chilkat::CkStringBuilder->new();
$success = $rest->FullRequestNoBodySb("POST","/services/invoice/MonitorCheck",$sbResponseBody);
if ($success != 1) {
    print $rest->lastErrorText() . "\r\n";
    exit;
}

$respStatusCode = $rest->get_ResponseStatusCode();
if ($respStatusCode >= 400) {
    print "Response Status Code = " . $respStatusCode . "\r\n";
    print "Response Header:" . "\r\n";
    print $rest->responseHeader() . "\r\n";
    print "Response Body:" . "\r\n";
    print $sbResponseBody->getAsString() . "\r\n";
    exit;
}

$jsonResponse = chilkat::CkJsonObject->new();
$jsonResponse->LoadSb($sbResponseBody);

#  See the Online Tool for Generating JSON Parse Code

$errorCode = $jsonResponse->stringOf("errorCode");
$errorDescription = $jsonResponse->stringOf("errorDescription");
$checkValue = $jsonResponse->stringOf("checkValue");

Sample JSON Response Body

{
  "errorCode": "",
  "errorDescription": "",
  "checkValue": "Service it.arubapec.fatturapa.uploadservice.UploadService STATUS UP"
}