Get a report
curl --request GET \
--url https://api.swippee.com/v1/reports/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swippee.com/v1/reports/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swippee.com/v1/reports/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.swippee.com/v1/reports/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.swippee.com/v1/reports/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.swippee.com/v1/reports/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swippee.com/v1/reports/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"report_id": "cl_abc123",
"status": "complete",
"data_source": "PARSED_STATEMENT",
"tamper_verifiable": true,
"statement": {
"bank": "Nabil Bank",
"bank_code": "NABIL",
"currency": "NPR",
"period": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"opening_balance": 123,
"closing_balance": 123,
"total_transactions": 123
},
"signals": {},
"monthly_summary": [
{}
],
"categories": {},
"merchant_categories": {},
"transactions": [
{
"transaction_id": "txn_0001",
"date": "2023-12-25",
"name": "<string>",
"amount": 2480,
"iso_currency_code": "NPR",
"balance": 123,
"merchant_name": "Example Store",
"payment_terminal_id": "2222000000000000",
"mcc": "5411",
"personal_finance_category": {
"primary": "GENERAL_MERCHANDISE",
"detailed": "GENERAL_MERCHANDISE_OTHER_GENERAL_MERCHANDISE"
},
"counterparties": [
{
"type": "merchant",
"name": "<string>",
"confidence_level": "<string>"
}
],
"payment_channel": "<string>",
"pending": false
}
]
}{
"error_type": "AUTHENTICATION_ERROR",
"error_code": "INVALID_API_KEY",
"error_message": "Unknown API key.",
"display_message": null,
"request_id": "req_8f3c9b2e4a1d4f7c9e0b1a2c3d4e5f60",
"documentation_url": "https://docs.swippee.com/concepts/errors#invalid_api_key",
"suggested_action": "Check your API key in the Authorization header."
}{
"error_type": "AUTHENTICATION_ERROR",
"error_code": "INVALID_API_KEY",
"error_message": "Unknown API key.",
"display_message": null,
"request_id": "req_8f3c9b2e4a1d4f7c9e0b1a2c3d4e5f60",
"documentation_url": "https://docs.swippee.com/concepts/errors#invalid_api_key",
"suggested_action": "Check your API key in the Authorization header."
}Reports
Get a report
Fetch a single completed report by its ID.
GET
/
v1
/
reports
/
{id}
Get a report
curl --request GET \
--url https://api.swippee.com/v1/reports/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swippee.com/v1/reports/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swippee.com/v1/reports/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.swippee.com/v1/reports/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.swippee.com/v1/reports/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.swippee.com/v1/reports/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swippee.com/v1/reports/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"report_id": "cl_abc123",
"status": "complete",
"data_source": "PARSED_STATEMENT",
"tamper_verifiable": true,
"statement": {
"bank": "Nabil Bank",
"bank_code": "NABIL",
"currency": "NPR",
"period": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"opening_balance": 123,
"closing_balance": 123,
"total_transactions": 123
},
"signals": {},
"monthly_summary": [
{}
],
"categories": {},
"merchant_categories": {},
"transactions": [
{
"transaction_id": "txn_0001",
"date": "2023-12-25",
"name": "<string>",
"amount": 2480,
"iso_currency_code": "NPR",
"balance": 123,
"merchant_name": "Example Store",
"payment_terminal_id": "2222000000000000",
"mcc": "5411",
"personal_finance_category": {
"primary": "GENERAL_MERCHANDISE",
"detailed": "GENERAL_MERCHANDISE_OTHER_GENERAL_MERCHANDISE"
},
"counterparties": [
{
"type": "merchant",
"name": "<string>",
"confidence_level": "<string>"
}
],
"payment_channel": "<string>",
"pending": false
}
]
}{
"error_type": "AUTHENTICATION_ERROR",
"error_code": "INVALID_API_KEY",
"error_message": "Unknown API key.",
"display_message": null,
"request_id": "req_8f3c9b2e4a1d4f7c9e0b1a2c3d4e5f60",
"documentation_url": "https://docs.swippee.com/concepts/errors#invalid_api_key",
"suggested_action": "Check your API key in the Authorization header."
}{
"error_type": "AUTHENTICATION_ERROR",
"error_code": "INVALID_API_KEY",
"error_message": "Unknown API key.",
"display_message": null,
"request_id": "req_8f3c9b2e4a1d4f7c9e0b1a2c3d4e5f60",
"documentation_url": "https://docs.swippee.com/concepts/errors#invalid_api_key",
"suggested_action": "Check your API key in the Authorization header."
}Authorizations
Your API key from the dashboard, sent as Authorization: Bearer swippee_sk_live_....
Path Parameters
Response
The report
Example:
"cl_abc123"
Example:
"complete"
How the data was obtained: parsed from the bank's PDF/Excel, or read from a photo/scan.
Available options:
PARSED_STATEMENT, OCR_IMAGE Example:
"PARSED_STATEMENT"
Whether the source supports document tamper-verification (false for OCR_IMAGE).
Example:
true
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I