getInboxInfo()


Metodo per avere informazioni dettagliate su una determinata fattura ricevuta (ciclo passivo).

Endpoint

Method URI
POST https://fatture.keliweb.it/api/get-inbox-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

Response Parameters

Parameter Type Description
data['inbox'] array dettagli della fattura ricevuta, in formato JSON

Example Request (BASH Curl)

curl --location --request POST 'https://fatture.keliweb.it/api/get-inbox-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-inbox-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-inbox-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-inbox-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": {
        "inbox": {
            "id": 1,
            "identificativoSdI": "23069278",
            "nomeFile": "IT03281320782_0001f.xml",
            "file": "inbox/23069278/file/IT03281320782_0001f.xml",
            "nomeFileMetadati": "IT03281320782_0001f_MT_001.xml",
            "metadati": "inbox/23069278/metadati/IT03281320782_0001f_MT_001.xml",
            "type": "INBOX-RiceviFatture",
            "codiceDestinatario": "8MO1234",
            "formato": "FPR12",
            "tentativiInvio": 1,
            "messageId": "44307403",
            "created_at": "2020-07-20 07:34:41",
            "updated_at": "2020-07-20 07:34:41",
            "idFiscaleIVA": "IT03281320782",
            "codiceFiscale": null,
            "pecDestinatario": null,
            "fornitore": "Keliweb SRL",
            "idFiscaleIVA_fornitore": "IT03281320782",
            "codiceFiscale_fornitore": null,
            "is_read": false,
            "totaleDocumento": 12.08,
            "numero": "2020A-18133",
            "tipoDocumento": "TD01",
            "dataDocumento": "14/07/2020",
            "divisa": "EUR",
            "causale": null
        }
    },
    "version": "v2.0.0",
    "copyright": "2009-2021 - Keliweb Srl",
    "documentation": "https://fatture.keliweb.it/docs",
    "valid_as_of": "21/10/2021 (13:05)"
}