getInvoiceInfo()
Metodo per avere informazioni dettagliate su una determinata fattura inviata (ciclo attivo), inclusi notifiche, storico eventi ed esiti SDI.
Endpoint
| Method | 
URI | 
POST | 
https://fatture.keliweb.it/api/get-invoice-info | 
Request Parameters
| Parameter | 
Type | 
Description | 
Required | 
HTTP headers: Authorization | 
string | 
Bearer + the token to access APIs | 
Yes | 
invoiceId | 
integer | 
ID univoco della fattura (relativo al DB locale) | 
required_without:identificativoSdI | 
identificativoSdI | 
integer | 
ID univoco della fattura dato dal SDI | 
required_without:invoiceId | 
is_read | 
boolean | 
se presente, filtra le fatture ricevute per lette/non lette | 
optional | 
latest | 
boolean | 
se presente, filtra le fatture ricevute (solo ultima per quel numero) | 
optional | 
filename | 
string | 
se presente, filtra le fatture ricevute per nome file fattura | 
optional | 
numero | 
string | 
se presente, filtra le fatture ricevute per numero | 
optional | 
Response Parameters
| Parameter | 
Type | 
Description | 
data['invoice'] | 
array | 
dettagli della fattura inviata, in formato JSON | 
Example Request (BASH Curl)
curl --location --request POST 'https://fatture.keliweb.it/api/get-invoice-info' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYxYTAzNzMzYzY5ZDQ3ZD' \
--form 'invoiceId="1"'
Example Request (PHP Curl)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://fatture.keliweb.it/api/get-invoice-info',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('invoiceId' => '1'),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYxYTAzNzMzYzY5ZDQ3ZDUxZDFiNT'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example Request (jQuery AJAX)
var form = new FormData();
form.append("invoiceId", "1");
var settings = {
    url: "https://fatture.keliweb.it/api/get-invoice-info",
    method: "POST",
    timeout: 0,
    headers: {
        Authorization:
            "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYxYTAzNzMzYzY5ZDQ3ZDUxZDF"
    },
    processData: false,
    mimeType: "multipart/form-data",
    contentType: false,
    data: form
};
$.ajax(settings).done(function(response) {
    console.log(response);
});
Example Request (Python - Requests)
import requests
url = "https://fatture.keliweb.it/api/get-invoice-info"
payload={'invoiceId': '1'}
files=[
]
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYxYTAzNzMzYzY5ZDQ3Z'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Example Response (JSON payload)
{
    "data": {
        "invoice": {
            "id": 1,
            "user_id": 1,
            "client_id": 1,
            "numero": "1",
            "base36": "00001",
            "sezionale": null,
            "version": "FPA12",
            "type": "TD01",
            "currency": "EUR",
            "causale": null,
            "date": "30/09/2021",
            "includedBollo": false,
            "importoBollo": null,
            "totaleBeniServizi": null,
            "totaleDocumento": 15.85,
            "totaleImposta": null,
            "totalePagare": null,
            "visitor": "192.168.10.1",
            "package_path": "invoices/info@keliweb.it/2021/1",
            "filename": "IT03281320782_00001.xml",
            "cedente": "Keliweb SRL",
            "cessionario": "ENTE PARCO NAZIONALE - Uff_eFatturaPA",
            "codiceDestinatario": "UF1234",
            "pecDestinatario": null,
            "identificativoSdI": 25702397,
            "dataOraRicezioneSdi": "2021-10-20T11:35:01.785+02:00",
            "erroreSdi": null,
            "created_at": "30/09/2021 (11:05)",
            "updated_at": "20/10/2021 (11:35)",
            "draft": false,
            "status": "INVIATA",
            "errors": null,
            "esito": null,
            "scarto": null,
            "production": false,
            "mode": "cron",
            "notifications": [
                {
                    "id": 5,
                    "invoice_id": 1,
                    "identificativoSdI": 23041615,
                    "nomeFileNotifica": "IT03281320782_00001_NS_001.xml",
                    "nomeFileOriginale": "IT03281320782_00001.xml",
                    "codiceDestinatario": null,
                    "descrizioneDestinatario": null,
                    "xml": "invoices/info@keliweb.it/2019/1/notifications/NS/20200709163212/IT03281320782_00001_NS_001.xml",
                    "type": "NS",
                    "hash": "478f782eb26503e58a0ca860eb1dc806a22a3355ada855c198b3037a1454226b",
                    "errors": "[{\"Codice\": \"00200\", \"Descrizione\": \"File non conforme al formato (nella descrizione del messaggio è riportata l’indicazione puntuale della non conformità)  : The value 'abcdef70p20h123y' of element 'CodiceFiscale' is not valid.\nriga: 24 - colonna: 56\", \"Suggerimento\": \"Verificare che il file inviato sia conforme al formato previsto\"}, {\"Codice\": \"00200\", \"Descrizione\": \"File non conforme al formato (nella descrizione del messaggio è riportata l’indicazione puntuale della non conformità)  : The value 'abcdef70p20h123y' of element 'CodiceFiscale' is not valid.\nriga: 41 - colonna: 56\", \"Suggerimento\": \"Verificare che il file inviato sia conforme al formato previsto\"}]",
                    "messageId": 44258902,
                    "dataOraRicezione": "2020-07-09T16:31:55.000+02:00",
                    "dataMessaADisposizione": null,
                    "dataOraConsegna": null,
                    "descrizione": null,
                    "note": null,
                    "created_at": "2020-07-09 14:32:12",
                    "updated_at": "2020-07-09 14:32:12",
                    "numeroFattura": null,
                    "annoFattura": null,
                    "posizioneFattura": null,
                    "esito": null,
                    "scarto": null,
                    "messageIdCommittente": null,
                    "riferimentoArchivio": null,
                    "pecMessageId": null,
                    "riferimentoFattura": null,
                    "esitoCommittente": null,
                    "formato": null,
                    "tentativiInvio": null,
                    "hashFileOriginale": null
                }
            ],
            "histories": [
                {
                    "id": 1,
                    "invoice_id": 1,
                    "identificativoSdI": null,
                    "xml": null,
                    "status": "PRESA IN CARICO",
                    "created_at": "2021-09-30 11:05:08",
                    "updated_at": "2021-09-30 11:05:08",
                    "errors": null,
                    "descrizione": null,
                    "note": null,
                    "mode": null
                }
            ],
            "outcomes": []
        },
    },
    "version": "v2.0.0",
    "copyright": "2009-2021 - Keliweb Srl",
    "documentation": "https://fatture.keliweb.it/docs",
    "valid_as_of": "21/10/2021 (13:05)"
}