Overview
Xenia provides comprehensive data extraction APIs for exporting submission data, generating analytics reports, and integrating with business intelligence platforms.
Export Formats:
Excel (.xlsx) - Bulk submission exports with custom columns
PDF - Individual and merged submission reports
JSON - Spreadsheet data and analytics APIs
CSV - Task and compliance reports
Key Capabilities:
Bulk submission exports with filtering
Real-time task and compliance analytics
Scheduled automated report delivery
BI platform integration (ChartBrew, custom dashboards)
Submission Exports
Export to Excel
Generate an Excel export of submissions for a template.
curl -X POST "https://api.xenia.team/api/v1/ops/checklists/{checklistId}/logs-excel" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"startDate": "2024-01-01",
"endDate": "2024-12-31",
"locationIds": ["location-uuid-1", "location-uuid-2"],
"status": "completed"
},
"columns": ["submittedAt", "location", "submittedBy", "score", "status"],
"includeNotes": true,
"includeAttachments": false
}'
Request Body:
Field Type Required Description filtersobject No Filter criteria filters.startDatestring No Start date (ISO format) filters.endDatestring No End date (ISO format) filters.locationIdsarray No Filter by location UUIDs filters.statusstring No Filter by status: draft, completed, approved, rejected columnsarray No Columns to include in export includeNotesboolean No Include submission notes includeAttachmentsboolean No Include attachment URLs recipientEmailstring No Email to send completed export
Response:
{
"status" : true ,
"code" : 200 ,
"message" : "Excel export started. You will receive an email when ready." ,
"data" : {
"exportId" : "export-uuid" ,
"estimatedRecords" : 1500 ,
"status" : "processing"
}
}
Large exports are processed asynchronously. The completed file is sent via email or can be retrieved via the export status endpoint.
Export to PDF
Generate PDF reports for submissions.
# Single submission PDF
curl -X POST "https://api.xenia.team/api/v1/ops/checklists/{checklistId}/logs-pdf" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"submissionIds": ["submission-uuid-1"],
"includePhotos": true,
"includeSignatures": true,
"includeNotes": true
}'
# Merge multiple submissions into one PDF
curl -X POST "https://api.xenia.team/api/v1/ops/checklists/{checklistId}/logs-pdf" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"submissionIds": ["submission-uuid-1", "submission-uuid-2", "submission-uuid-3"],
"mergeIntoOne": true,
"includePhotos": true
}'
Request Body:
Field Type Required Description submissionIdsarray Yes Submission UUIDs to export mergeIntoOneboolean No Combine all into single PDF includePhotosboolean No Include captured photos includeSignaturesboolean No Include signatures includeNotesboolean No Include notes recipientEmailstring No Email for delivery
Get Spreadsheet Data
Retrieve submission data in JSON spreadsheet format.
curl -X POST "https://api.xenia.team/api/v1/ops/checklists/submissions-spreadsheet" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"checklistId": "template-uuid",
"startDate": "2024-12-01",
"endDate": "2024-12-31",
"locationIds": ["location-uuid"],
"page": 1,
"pageSize": 100
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : {
"headers" : [
"Submission ID" ,
"Submitted At" ,
"Location" ,
"Submitted By" ,
"Score" ,
"Question 1" ,
"Question 2"
],
"rows" : [
[
"sub-uuid-1" ,
"2024-12-23T10:00:00Z" ,
"Downtown Store" ,
"John Doe" ,
"95%" ,
"Yes" ,
"Pass"
]
],
"pagination" : {
"page" : 1 ,
"pageSize" : 100 ,
"total" : 250 ,
"totalPages" : 3
}
}
}
Public PDF Reports
Generate a public PDF for sharing (requires public report enabled).
curl -X POST "https://api.xenia.team/api/v1/ops/public/submissions/{submissionId}/pdf" \
-H "Content-Type: application/json" \
-d '{
"includePhotos": true,
"format": "detailed"
}'
Get Submission Attachments
Retrieve all attachments from submissions.
curl -X POST "https://api.xenia.team/api/v1/ops/checklists/logs/attachments" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"submissionIds": ["submission-uuid-1", "submission-uuid-2"],
"attachmentTypes": ["image", "document", "signature"]
}'
Task Analytics
Real-time analytics endpoints for task performance and compliance tracking.
Task Count by Status
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/count-by-status" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2024-12-01",
"endDate": "2024-12-31",
"locationIds": ["location-uuid"],
"assigneeIds": ["user-uuid"]
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : {
"Open" : 45 ,
"InProgress" : 12 ,
"Completed" : 230 ,
"Overdue" : 8 ,
"Missed" : 3 ,
"total" : 298
}
}
Task Count by Assignees
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/count-by-assignees" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2024-12-01",
"endDate": "2024-12-31"
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : [
{
"assigneeId" : "user-uuid-1" ,
"assigneeName" : "John Doe" ,
"assigned" : 50 ,
"completed" : 45 ,
"overdue" : 3 ,
"completionRate" : 90
},
{
"assigneeId" : "user-uuid-2" ,
"assigneeName" : "Jane Smith" ,
"assigned" : 35 ,
"completed" : 33 ,
"overdue" : 1 ,
"completionRate" : 94.3
}
]
}
Task Count by Categories
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/count-by-categories" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2024-12-01",
"endDate": "2024-12-31"
}'
Weekly Completion Trends
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/weekly-completion" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"weeks": 12
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : [
{
"weekStart" : "2024-12-16" ,
"weekEnd" : "2024-12-22" ,
"total" : 150 ,
"completed" : 142 ,
"completionRate" : 94.7
},
{
"weekStart" : "2024-12-09" ,
"weekEnd" : "2024-12-15" ,
"total" : 145 ,
"completed" : 140 ,
"completionRate" : 96.6
}
]
}
Schedule Completion by Location
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/schedule-completion-by-location" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2024-12-01",
"endDate": "2024-12-31"
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : [
{
"locationId" : "location-uuid-1" ,
"locationName" : "Downtown Store" ,
"scheduled" : 100 ,
"completed" : 95 ,
"onTime" : 90 ,
"late" : 5 ,
"missed" : 5 ,
"completionRate" : 95 ,
"onTimeRate" : 94.7
}
]
}
On-Time vs Late by Location
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/on-time-late-submission-by-location" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2024-12-01",
"endDate": "2024-12-31"
}'
Daily Compliance Report
curl -X POST "https://api.xenia.team/api/v1/ops/reports/tasks/daily-compliance" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"date": "2024-12-23",
"locationIds": ["location-uuid"]
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : {
"date" : "2024-12-23" ,
"locations" : [
{
"locationId" : "location-uuid" ,
"locationName" : "Downtown Store" ,
"scheduledTasks" : 15 ,
"completedTasks" : 14 ,
"complianceRate" : 93.3 ,
"overdueItems" : [
{
"taskId" : "task-uuid" ,
"title" : "Evening Safety Check" ,
"dueAt" : "2024-12-23T18:00:00Z" ,
"assignee" : "John Doe"
}
]
}
],
"overallCompliance" : 93.3
}
}
Submission Analytics
Template Submission Summary
curl -X POST "https://api.xenia.team/api/v1/ops/template-submissions" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"checklistId": "template-uuid",
"startDate": "2024-12-01",
"endDate": "2024-12-31",
"groupBy": "location"
}'
Submission Count by Status
curl -X POST "https://api.xenia.team/api/v1/ops/submissions-count-by-status" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"checklistId": "template-uuid",
"startDate": "2024-12-01",
"endDate": "2024-12-31"
}'
Response:
{
"status" : true ,
"code" : 200 ,
"data" : {
"draft" : 5 ,
"completed" : 245 ,
"pending_approval" : 8 ,
"approved" : 220 ,
"rejected" : 12 ,
"total" : 490
}
}
Grid Reports & Dashboards
Custom report builders with saved views and thresholds.
List Grid Reports
curl -X GET "https://api.xenia.team/api/v1/mgt/grid-reports" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Create Grid Report
curl -X POST "https://api.xenia.team/api/v1/mgt/grid-reports" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"name": "Monthly Compliance Dashboard",
"description": "Track compliance across all locations",
"reportType": "compliance",
"config": {
"dateRange": "last_30_days",
"groupBy": "location",
"metrics": ["completionRate", "onTimeRate", "flaggedItems"]
}
}'
Create Report View
curl -X POST "https://api.xenia.team/api/v1/mgt/grid-reports/{gridReportId}/view" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"name": "Regional View",
"filters": {
"locationIds": ["region-1-uuid", "region-2-uuid"]
},
"columns": ["location", "completionRate", "trend"],
"sortBy": "completionRate",
"sortOrder": "ASC"
}'
Export Report View to Spreadsheet
curl -X GET "https://api.xenia.team/api/v1/mgt/grid-report-views/{gridReportViewId}/spreadsheet" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Set alert thresholds for report metrics.
curl -X POST "https://api.xenia.team/api/v1/mgt/grid-report-views/{gridReportViewId}/thresholds" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"thresholds": [
{
"metric": "completionRate",
"operator": "lt",
"value": 90,
"severity": "warning",
"notifyRoles": ["manager-role-uuid"]
},
{
"metric": "completionRate",
"operator": "lt",
"value": 70,
"severity": "critical",
"notifyRoles": ["manager-role-uuid", "admin-role-uuid"]
}
]
}'
Scheduled Reports
Automate report generation and delivery.
List Report Schedules
curl -X GET "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/report-schedules" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status" : true ,
"code" : 200 ,
"data" : [
{
"id" : "schedule-uuid" ,
"name" : "Weekly Compliance Report" ,
"reportType" : "daily-compliance" ,
"schedule" : {
"frequency" : "weekly" ,
"dayOfWeek" : 1 ,
"time" : "08:00" ,
"timezone" : "America/New_York"
},
"recipients" : [ "[email protected] " , "[email protected] " ],
"format" : "excel" ,
"isActive" : true ,
"lastRunAt" : "2024-12-16T08:00:00Z" ,
"nextRunAt" : "2024-12-23T08:00:00Z" ,
"createdAt" : "2024-11-01T10:00:00Z"
}
]
}
Create Report Schedule
curl -X POST "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/report-schedules" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily Task Summary",
"reportType": "task-summary",
"schedule": {
"frequency": "daily",
"time": "18:00",
"timezone": "America/New_York"
},
"recipients": ["[email protected] "],
"format": "pdf",
"filters": {
"locationIds": ["location-uuid"]
}
}'
Request Body:
Field Type Required Description namestring Yes Schedule name reportTypestring Yes Type: daily-compliance, task-summary, submission-export schedule.frequencystring Yes daily, weekly, monthlyschedule.timestring Yes Time in HH:MM format schedule.timezonestring No IANA timezone (default: workspace timezone) schedule.dayOfWeeknumber No For weekly: 0-6 (Sunday-Saturday) schedule.dayOfMonthnumber No For monthly: 1-28 recipientsarray Yes Email addresses formatstring No excel or pdf (default: excel)filtersobject No Report filters
Toggle Schedule (Pause/Resume)
curl -X POST "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/report-schedules/{scheduleId}/toggle" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Run Report Now
Trigger immediate report generation.
curl -X POST "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/report-schedules/{scheduleId}/run-now" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status" : true ,
"code" : 200 ,
"message" : "Report generation started" ,
"data" : {
"executionId" : "execution-uuid" ,
"status" : "processing" ,
"estimatedCompletion" : "2024-12-23T10:05:00Z"
}
}
Get Execution History
curl -X GET "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/report-schedules/{scheduleId}/executions?page=1&pageSize=10" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status" : true ,
"code" : 200 ,
"data" : {
"executions" : [
{
"id" : "execution-uuid" ,
"status" : "completed" ,
"startedAt" : "2024-12-23T08:00:00Z" ,
"completedAt" : "2024-12-23T08:02:15Z" ,
"recipientCount" : 2 ,
"deliveryStatus" : "sent" ,
"fileSize" : 245000 ,
"recordCount" : 1500
}
],
"pagination" : {
"page" : 1 ,
"pageSize" : 10 ,
"total" : 52
}
}
}
Dataset API (BI Integration)
Direct data access for business intelligence platforms.
Daily Compliance Report
curl -X GET "https://api.xenia.team/api/v1/mgt/datasets/daily-compliance-report?workspaceId={workspaceId}&todayDate=2024-12-23" \
-H "x-xenia-api-key: YOUR_API_KEY"
Response:
{
"status" : true ,
"code" : 200 ,
"data" : [
{
"locationId" : "location-uuid" ,
"locationName" : "Downtown Store" ,
"date" : "2024-12-23" ,
"scheduledTasks" : 15 ,
"completedTasks" : 14 ,
"compliancePercentage" : 93.33 ,
"projectStatus" : {
"active" : 3 ,
"completed" : 12 ,
"overdue" : 1
}
}
]
}
Weekly Submission Report
curl -X GET "https://api.xenia.team/api/v1/mgt/datasets/weekly-submission-report?workspaceId={workspaceId}&todayDate=2024-12-23&checklistName=Safety%20Inspection" \
-H "x-xenia-api-key: YOUR_API_KEY"
Response:
{
"status" : true ,
"code" : 200 ,
"data" : [
{
"locationId" : "location-uuid" ,
"locationName" : "Downtown Store" ,
"checklistName" : "Safety Inspection" ,
"weekData" : [
{ "date" : "2024-12-17" , "completed" : 2 , "pending" : 0 , "flagged" : 0 },
{ "date" : "2024-12-18" , "completed" : 2 , "pending" : 0 , "flagged" : 1 },
{ "date" : "2024-12-19" , "completed" : 2 , "pending" : 0 , "flagged" : 0 },
{ "date" : "2024-12-20" , "completed" : 2 , "pending" : 0 , "flagged" : 0 },
{ "date" : "2024-12-21" , "completed" : 1 , "pending" : 1 , "flagged" : 0 },
{ "date" : "2024-12-22" , "completed" : 2 , "pending" : 0 , "flagged" : 0 },
{ "date" : "2024-12-23" , "completed" : 1 , "pending" : 1 , "flagged" : 0 }
],
"weekTotal" : {
"completed" : 12 ,
"pending" : 2 ,
"flagged" : 1
}
}
]
}
ChartBrew Integration : Include the header platform: chartbrew for optimized response format compatible with ChartBrew dashboards.
Common Workflows
Daily Compliance Automation
BI Dashboard Integration
Bulk Submission Export
Create export request with date range and filters
Monitor status via export status endpoint
Download file when ready or receive via email
Process data in your BI tool or spreadsheet
Best Practices
Use filters to reduce export size
Always specify date ranges and location filters for large exports. This improves performance and reduces processing time.
Schedule reports during off-peak hours
Configure scheduled reports to run during off-peak hours (early morning or late evening) to minimize impact on system performance.
Use appropriate export formats
Use Excel for data analysis and manipulation. Use PDF for formal reports and sharing with stakeholders.
Configure grid report thresholds to receive automatic notifications when compliance metrics fall below acceptable levels.
Leverage Dataset API for real-time dashboards
Use the Dataset API with ChartBrew or custom dashboards for real-time visibility into compliance metrics.