Ricerca una singola fattura per Id
curl -X GET https://demows.fatturazioneelettronica.aruba.it/services/invoice/out/{invoiceId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE='
Dim rest As Chilkat.Rest
Set rest = Chilkat.NewRest
' URL: https://demows.fatturazioneelettronica.aruba.it/services/invoice/out/{invoiceId}
bTls = True
port = 443
bAutoReconnect = True
success = rest.Connect("demows.fatturazioneelettronica.aruba.it",port,bTls,bAutoReconnect)
If (success <> True) Then
Debug.Print "ConnectFailReason: "; rest.ConnectFailReason
Debug.Print rest.LastErrorText
Exit Sub
End If
success = rest.AddHeader("Authorization","Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE=")
success = rest.AddHeader("Accept","application/json")
Dim sbResponseBody As Chilkat.StringBuilder
Set sbResponseBody = Chilkat.NewStringBuilder
success = rest.FullRequestNoBodySb("GET","/services/invoice/out/{invoiceId}",sbResponseBody)
If (success <> True) Then
Debug.Print rest.LastErrorText
Exit Sub
End If
respStatusCode = rest.ResponseStatusCode
If (respStatusCode >= 400) Then
Debug.Print "Response Status Code = "; respStatusCode
Debug.Print "Response Header:"
Debug.Print rest.ResponseHeader
Debug.Print "Response Body:"
Debug.Print sbResponseBody.GetAsString()
Exit Sub
End If
Dim jsonResponse As Chilkat.JsonObject
Set jsonResponse = Chilkat.NewJsonObject
success = jsonResponse.LoadSb(sbResponseBody)
' See the Online Tool for Generating JSON Parse Code
id = jsonResponse.StringOf("id")
senderDescription = jsonResponse.StringOf("sender.description")
senderCountryCode = jsonResponse.StringOf("sender.countryCode")
senderVatCode = jsonResponse.StringOf("sender.vatCode")
senderFiscalCode = jsonResponse.StringOf("sender.fiscalCode")
receiverDescription = jsonResponse.StringOf("receiver.description")
receiverCountryCode = jsonResponse.StringOf("receiver.countryCode")
receiverVatCode = jsonResponse.StringOf("receiver.vatCode")
receiverFiscalCode = jsonResponse.StringOf("receiver.fiscalCode")
invoiceType = jsonResponse.StringOf("invoiceType")
docType = jsonResponse.StringOf("docType")
file = jsonResponse.StringOf("file")
filename = jsonResponse.StringOf("filename")
username = jsonResponse.StringOf("username")
lastUpdate = jsonResponse.StringOf("lastUpdate")
idSdi = jsonResponse.StringOf("idSdi")
i = 0
count_i = jsonResponse.SizeOfArray("invoices")
Do While i < count_i
jsonResponse.I = i
invoiceDate = jsonResponse.StringOf("invoices[i].invoiceDate")
number = jsonResponse.StringOf("invoices[i].number")
status = jsonResponse.StringOf("invoices[i].status")
i = i + 1
Loop
{
"id": "1",
"sender": {
"description": "Aruba SPA",
"countryCode": "ITA",
"vatCode": "6372762541",
"fiscalCode": "N5Hnt9vvMZ"
},
"receiver": {
"description": "Aruba SPA",
"countryCode": "ITA",
"vatCode": "8767263441",
"fiscalCode": "LVZTeOJ8BN"
},
"invoiceType": "FPA12",
"docType": "in",
"file": "ZEdWemRBPT0=",
"filename": "IT07026037883_jtlkl.xml.p7m",
"invoices": [
{
"invoiceDate": "2019-01-21T17:36:21.289+01:00",
"number": "1",
"status": "Inviata"
},
{
"invoiceDate": "2019-01-21T17:36:21.289+01:00",
"number": "2",
"status": "Consegnata"
}
],
"username": "Utente",
"lastUpdate": "2019-01-21T17:36:21.289+01:00",
"idSdi": null
}