Transaction Summary
curl --request GET \
--url https://api.magebank.ai/transactions/summary \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.magebank.ai/transactions/summary"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.magebank.ai/transactions/summary', 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.magebank.ai/transactions/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$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.magebank.ai/transactions/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
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.magebank.ai/transactions/summary")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magebank.ai/transactions/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"totalEarned": 1250.50,
"totalSpent": 750.25,
"transactionCount": 15
}
{
"success": false,
"error": "start_date and end_date are required"
}
{
"success": false,
"error": "Invalid date format. Use ISO format (e.g., 2023-05-01T00:00:00Z)"
}
Transactions
Transaction Summary
Get a summary of financial activity for a date range
GET
/
transactions
/
summary
Transaction Summary
curl --request GET \
--url https://api.magebank.ai/transactions/summary \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.magebank.ai/transactions/summary"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.magebank.ai/transactions/summary', 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.magebank.ai/transactions/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$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.magebank.ai/transactions/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
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.magebank.ai/transactions/summary")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magebank.ai/transactions/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"totalEarned": 1250.50,
"totalSpent": 750.25,
"transactionCount": 15
}
{
"success": false,
"error": "start_date and end_date are required"
}
{
"success": false,
"error": "Invalid date format. Use ISO format (e.g., 2023-05-01T00:00:00Z)"
}
Financial Overview: Get a concise summary of transaction totals across all your agents for any specified date range.
Request Headers
string
required
Your API key for authentication
Query Parameters
string
required
Start date for summary (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)
string
required
End date for summary (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)
Response
number
Total amount received by your agents during the period
number
Total amount spent by your agents during the period
number
Total number of transactions during the period
{
"totalEarned": 1250.50,
"totalSpent": 750.25,
"transactionCount": 15
}
{
"success": false,
"error": "start_date and end_date are required"
}
{
"success": false,
"error": "Invalid date format. Use ISO format (e.g., 2023-05-01T00:00:00Z)"
}
Status Codes
| Status Code | Description |
|---|---|
| 200 | Summary data retrieved successfully |
| 400 | Bad Request - Invalid or missing parameters |
| 401 | Unauthorized - User not authenticated |
| 500 | Internal Server Error |
All Agents Included: The summary automatically combines transactions across all your agents, providing a consolidated financial overview.
Zero Results: If no agents are found or no transactions exist for the specified period, the endpoint will return zeros for all values with a 200 status code.