PHP ActiveX 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='

PHP ActiveX Example

<?php

$rest = new COM("Chilkat_9_5_0.Rest");

//  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->ConnectFailReason . "\n";
    print $rest->LastErrorText . "\n";
    exit;
}

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

$sbResponseBody = new COM("Chilkat_9_5_0.StringBuilder");
$success = $rest->FullRequestNoBodySb('POST','/services/invoice/MonitorCheck',$sbResponseBody);
if ($success != 1) {
    print $rest->LastErrorText . "\n";
    exit;
}

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

$jsonResponse = new COM("Chilkat_9_5_0.JsonObject");
$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"
}