ApiEndpoints
Report Endpoints
Manage financial reports, projections, and actuals.
Reports are the core financial artifacts in Sureshake, representing specific snapshots of entity performance.
List Reports
Retrieve a paginated list of reports.
GET
/api/v1/reportscurl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/reports
const response = await fetch('https://api.sureshake.com/api/v1/reports', {
headers: { 'Authorization': `Bearer ${token}` }
});
const { data, meta } = await response.json();200 OK
{
"data": [
{
"id": "8f2349ef-22ab-46ae-a129-2eb4c2570001",
"title": "Annual Audit 2023",
"report_type": "annual_report",
"status": "verified",
"is_public": false,
"owner_id": "user_123",
"created_at": "2024-01-10T10:00:00Z",
"updated_at": "2024-01-10T10:00:00Z"
}
],
"meta": {
"total": 1,
"limit": 20,
"offset": 0,
"hasMore": false
}
}Create Report
Create a new report for an entity.
POST
/api/v1/reportscurl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Q1 2024 Projection", "report_type": "projection", "data": {}}' \
https://api.sureshake.com/api/v1/reportsGet Report
Retrieve a single report by its ID.
GET
/api/v1/reports/:idcurl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/reports/8f2349ef...
Update Report
Update report metadata or status.
PATCH
/api/v1/reports/:idcurl -X PATCH \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "verified"}' \
https://api.sureshake.com/api/v1/reports/8f2349ef...Delete Report
Permanently remove a report.
DELETE
/api/v1/reports/:idcurl -X DELETE -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/reports/8f2349ef...