Download Customer Transaction Aggregations
Download aggregated transaction summaries as downloadable JSON or CSV files.
Export hierarchical financial data for offline analysis or integration with other systems.
Endpoint: GET https://dev.walkerstdata.com.au/api/v1/customer/{customerId}/transactions/aggregate/download
Query Parameters
type(required): File format - eitherjsonorcsv
Request
- cURL
- JavaScript
- Python
# Download aggregated data as JSON
curl -X GET "https://dev.walkerstdata.com.au/api/v1/customer/f9e8d7c6-b5a4-3210-9876-543210abcdef/transactions/aggregate/download?type=json" \
-H "x-api-key: YOUR_API_KEY" \
-o "customer-aggregations.json"
# Download aggregated data as CSV
curl -X GET "https://dev.walkerstdata.com.au/api/v1/customer/f9e8d7c6-b5a4-3210-9876-543210abcdef/transactions/aggregate/download?type=csv" \
-H "x-api-key: YOUR_API_KEY" \
-o "customer-aggregations.csv"
const customerId = 'f9e8d7c6-b5a4-3210-9876-543210abcdef';
// Download aggregations as JSON
const response = await fetch(`https://dev.walkerstdata.com.au/api/v1/customer/${customerId}/transactions/aggregate/download?type=json`, {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
if (response.ok) {
const blob = await response.blob();
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'customer-aggregations.json';
a.click();
}
// Download aggregations as CSV
const csvResponse = await fetch(`https://dev.walkerstdata.com.au/api/v1/customer/${customerId}/transactions/aggregate/download?type=csv`, {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
import requests
customer_id = 'f9e8d7c6-b5a4-3210-9876-543210abcdef'
headers = {'x-api-key': 'YOUR_API_KEY'}
# Download aggregations as JSON
response = requests.get(
f'https://dev.walkerstdata.com.au/api/v1/customer/{customer_id}/transactions/aggregate/download?type=json',
headers=headers
)
if response.status_code == 200:
with open('customer-aggregations.json', 'wb') as f:
f.write(response.content)
# Download aggregations as CSV
csv_response = requests.get(
f'https://dev.walkerstdata.com.au/api/v1/customer/{customer_id}/transactions/aggregate/download?type=csv',
headers=headers
)
Response
JSON Format
{
"tables": [
{
"id": "income",
"hierarchy": "table",
"type": "objectArray",
"values": [
{
"id": "sales volume",
"hierarchy": "row",
"type": "timeseries",
"values": {
"2025-01": 53512.8,
"2025-02": 1094617.8,
"total": 1435732.86
}
}
]
},
{
"id": "expenses",
"hierarchy": "table",
"type": "objectArray",
"values": [
{
"id": "ffc by type",
"hierarchy": "subtable",
"type": "objectArray",
"values": [
{
"id": "asset-finance",
"hierarchy": "row",
"type": "timeseries",
"values": {
"2025-04": -1145.1,
"total": -1145.1
}
}
]
}
]
}
]
}
CSV Format
Category,Subcategory,Line_Item,Metric,Value
income,,sales volume,2025-01,53512.8
income,,sales volume,2025-02,1094617.8
income,,sales volume,total,1435732.86
expenses,ffc by type,asset-finance,2025-04,-1145.1
expenses,ffc by type,asset-finance,total,-1145.1
The CSV format flattens the hierarchical structure into tabular columns:
- Category: Top-level table (income, expenses)
- Subcategory: Mid-level subtable (empty if direct row)
- Line_Item: Row identifier
- Metric: Time period or 'total'
- Value: Monetary amount
Files are automatically named: json-{customerId}-{yyyyMMdd}.json or csv-{customerId}-{yyyyMMdd}.csv.
Use Cases
- Financial reporting: Generate standardized summary reports
- Business intelligence: Import structured data into BI tools
- Spreadsheet analysis: Use CSV format for Excel analysis
- Archive summaries: Store historical aggregated data
Next Steps
With downloaded aggregation files, you can:
- Create dashboards: Build visualizations from structured summary data
- Generate reports: Use flattened CSV data for reporting tools
- Integrate systems: Import JSON format into other applications