/api/v1/chargeback/exportExport chargeback report as CSV or HTML
Auditor / finance-team export of chargeback data scoped to a project, date range, and groupBy axis. CSV is RFC-4180 quoted with Excel formula-byte sanitization and an `attachment` Content-Disposition. HTML is a print-optimized auditor report (auditors print → "Save as PDF" — same pattern as DPIA / SOC 2 attestation exports). Org-scoped via the `projectId` parameter. Rate limit: 5/min. Audit-logged.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.
Parameters
projectId in queryrequiredProject ID — caller must be a member of the project's organization.
stringformat in queryOutput format. csv = downloadable CSV with attachment disposition; html = printable inline HTML.
stringstartDate in queryISO 8601 date (YYYY-MM-DD). Defaults to 30 days ago. Inverted ranges (end < start) get swapped defensively rather than 400-ing.
stringendDate in queryISO 8601 date (YYYY-MM-DD). Defaults to today. Future dates clamp to today.
stringgroupBy in queryAggregation axis. Whitelisted to prevent reflected SQL via dynamic column names.
stringResponse
All status codes
Code samples
cURL
curl -X GET \ https://evalguard.ai/api/v1/chargeback/export \ -H "Authorization: Bearer $EVALGUARD_API_KEY"
TypeScript
// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:
const res = await fetch("https://evalguard.ai/api/v1/chargeback/export", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}` },
});
console.log(res.status, await res.json());Python
# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
response = requests.request("GET", "https://evalguard.ai/api/v1/chargeback/export", headers=headers)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequestWithContext(context.Background(), "GET", "https://evalguard.ai/api/v1/chargeback/export", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}