Download Customer Transactions
Export customer transaction data as downloadable JSON or CSV files.
Supports the same filtering options as Get Customer Transactions.
Endpoint: GET https://dev.walkerstdata.com.au/api/v1/customer/{customerId}/transactions/download
Query Parameters
type(required): File format - eitherjsonorcsvjobId(optional): Retrieve transactions from a specific enrichment jobisEnriched(optional): Filter by enrichment status (true/false)page(optional): Page number for pagination (1-indexed, must be >= 1, default: 1)count(optional): Number of transactions per page (must be >= 1, default: 20)
Request
- cURL
- JavaScript
- Python
# Download all transactions as JSON
curl -X GET "https://dev.walkerstdata.com.au/api/v1/customer/f9e8d7c6-b5a4-3210-9876-543210abcdef/transactions/download?type=json" \
-H "x-api-key: YOUR_API_KEY" \
-o "customer-transactions.json"
# Download all transactions as CSV
curl -X GET "https://dev.walkerstdata.com.au/api/v1/customer/f9e8d7c6-b5a4-3210-9876-543210abcdef/transactions/download?type=csv" \
-H "x-api-key: YOUR_API_KEY" \
-o "customer-transactions.csv"
# Download transactions from a specific job
curl -X GET "https://dev.walkerstdata.com.au/api/v1/customer/f9e8d7c6-b5a4-3210-9876-543210abcdef/transactions/download?type=csv&jobId=550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: YOUR_API_KEY" \
-o "job-transactions.csv"
# Download only enriched transactions
curl -X GET "https://dev.walkerstdata.com.au/api/v1/customer/f9e8d7c6-b5a4-3210-9876-543210abcdef/transactions/download?type=json&isEnriched=true" \
-H "x-api-key: YOUR_API_KEY" \
-o "enriched-transactions.json"
const customerId = 'f9e8d7c6-b5a4-3210-9876-543210abcdef';
// Download transactions as JSON
const response = await fetch(`https://dev.walkerstdata.com.au/api/v1/customer/${customerId}/transactions/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-transactions.json';
a.click();
}
// Download transactions as CSV
const csvResponse = await fetch(`https://dev.walkerstdata.com.au/api/v1/customer/${customerId}/transactions/download?type=csv`, {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
// Download from specific job
const jobId = '550e8400-e29b-41d4-a716-446655440000';
const jobResponse = await fetch(`https://dev.walkerstdata.com.au/api/v1/customer/${customerId}/transactions/download?type=csv&jobId=${jobId}`, {
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 transactions as JSON
response = requests.get(
f'https://dev.walkerstdata.com.au/api/v1/customer/{customer_id}/transactions/download?type=json',
headers=headers
)
if response.status_code == 200:
with open('customer-transactions.json', 'wb') as f:
f.write(response.content)
# Download transactions as CSV
csv_response = requests.get(
f'https://dev.walkerstdata.com.au/api/v1/customer/{customer_id}/transactions/download?type=csv',
headers=headers
)
# Download from specific job
job_id = '550e8400-e29b-41d4-a716-446655440000'
job_response = requests.get(
f'https://dev.walkerstdata.com.au/api/v1/customer/{customer_id}/transactions/download',
headers=headers,
params={'type': 'csv', 'jobId': job_id}
)
Response
JSON Format
{
"transactions": [
{
"transactionId": "550e8400-e29b-41d4-a716-446655440000",
"transactionDate": "2025-01-15",
"amount": -125.5,
"description": "WOOLWORTHS 1234",
"balance": 1500.0,
"level1": "Shopping",
"level2": "Groceries",
"level3": "Supermarkets"
}
],
"totalCount": 1,
"currentPage": 1,
"pageSize": 20,
"totalPages": 1
}
CSV Format
transactionId,customerId,transactionDate,amount,description,balance,level1,level2,level3
550e8400-e29b-41d4-a716-446655440000,550e8400-e29b-41d4-a716-446655440001,2025-01-15,-125.50,WOOLWORTHS 1234,1500.00,Shopping,Groceries,Supermarkets
Files are automatically named with customer ID and date: json-{customerId}-{yyyyMMdd}.json or csv-{customerId}-{yyyyMMdd}.csv.
Use Cases
- Export for analysis: Download transaction data for external processing
- Backup data: Create local copies of enriched transactions
- Integration: Import data into other systems or spreadsheets
Next Steps
With downloaded transaction files, you can:
- Load into Excel: Use CSV format for spreadsheet analysis
- Process programmatically: Use JSON format for custom applications
- Archive data: Store historical transaction records