getOutcomes()


Metodo per ottenere la lista degli esiti dal SDI relativi alle proprie fatture.

Endpoint

Method URI
GET https://fatture.keliweb.it/api/outcomes

Request Parameters

Parameter Type Description Required
HTTP headers: Authorization string Bearer + the token to access APIs Yes

Response Parameters

Parameter Type Description
data array lista degli esiti, in formato JSON

Example Request (BASH Curl)

curl --location --request GET 'https://fatture.keliweb.it/api/outcomes' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjJmZTQ2NTMzZ'

Example Request (PHP Curl)

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://fatture.keliweb.it/api/outcomes',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjJmZTQ2NTMzZWZhMmMxZj'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Example Request (jQuery AJAX)

var form = new FormData();
var settings = {
    url: "https://fatture.keliweb.it/api/outcomes",
    method: "GET",
    timeout: 0,
    headers: {
        Authorization:
            "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjJmZTQ2NTMzZWZ"
    },
    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/outcomes"

payload={}
files={}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYxYTAzNzMzYzY5Z'
}

response = requests.request("GET", url, headers=headers, data=payload, files=files)

print(response.text)

Example Response (JSON payload)

{
    "data": [],
    "version": "v2.0.0",
    "copyright": "2009-2021 - Keliweb Srl",
    "documentation": "https://fatture.keliweb.it/docs",
    "valid_as_of": "21/10/2021 (12:21)"
}