EnvoyX Docs
Dashboard

Dashboard

Dashboard

The Dashboard API provides analytics and reporting endpoints for monitoring your invoice processing pipeline.

Endpoints

MethodPathDescription
GET/api/v1/dashboard/statsOverall statistics
GET/api/v1/dashboard/trendsProcessing trends by date
GET/api/v1/dashboard/status-breakdownInvoice count by status
GET/api/v1/dashboard/processing-timesProcessing time analytics

All endpoints require the X-API-Key header.

Overall Statistics

Get high-level metrics for your account.

curl -X GET https://staging-api.tryenvoyx.com/api/v1/dashboard/stats \
  -H "X-API-Key: YOUR_API_KEY"

Response:

{
  "success": true,
  "status": 200,
  "code": "STATS_FETCHED",
  "message": "Dashboard stats retrieved successfully",
  "data": {
    "total_invoices": 1247,
    "processed_invoices": 1180,
    "flagged_invoices": 45,
    "failed_invoices": 22,
    "avg_processing_time": 18.3,
    "accuracy_rate": 96.2,
    "mom_change": 12.5
  }
}
FieldTypeDescription
total_invoicesintegerTotal invoices uploaded
processed_invoicesintegerSuccessfully processed count
flagged_invoicesintegerFlagged for review count
failed_invoicesintegerFailed extraction count
avg_processing_timenumberAverage processing time in seconds
accuracy_ratenumberExtraction accuracy percentage
mom_changenumberMonth-over-month change percentage

Get invoice processing volume over time.

curl -X GET "https://staging-api.tryenvoyx.com/api/v1/dashboard/trends?period=30days" \
  -H "X-API-Key: YOUR_API_KEY"

Query Parameters:

ParameterTypeDefaultDescription
periodstring30daysTime period: 7days, 30days, or 90days

Response:

{
  "success": true,
  "status": 200,
  "code": "TRENDS_FETCHED",
  "message": "Processing trends retrieved successfully",
  "data": {
    "period": "30days",
    "trends": [
      {
        "date": "2024-02-10",
        "total": 42,
        "processed": 38,
        "flagged": 3,
        "failed": 1
      },
      {
        "date": "2024-02-09",
        "total": 35,
        "processed": 33,
        "flagged": 2,
        "failed": 0
      }
    ]
  }
}

Status Breakdown

Get current invoice distribution by status.

curl -X GET https://staging-api.tryenvoyx.com/api/v1/dashboard/status-breakdown \
  -H "X-API-Key: YOUR_API_KEY"

Response:

{
  "success": true,
  "status": 200,
  "code": "STATUS_BREAKDOWN_FETCHED",
  "message": "Status breakdown retrieved successfully",
  "data": {
    "breakdown": [
      { "status": "PROCESSED", "count": 1180, "percentage": 94.6 },
      { "status": "FLAGGED", "count": 45, "percentage": 3.6 },
      { "status": "FAILED", "count": 22, "percentage": 1.8 }
    ]
  }
}

Processing Times

Get processing time analytics over a time period.

curl -X GET "https://staging-api.tryenvoyx.com/api/v1/dashboard/processing-times?period=30days" \
  -H "X-API-Key: YOUR_API_KEY"

Query Parameters:

ParameterTypeDefaultDescription
periodstring30daysTime period: 7days or 30days

Response:

{
  "success": true,
  "status": 200,
  "code": "PROCESSING_TIMES_FETCHED",
  "message": "Processing times retrieved successfully",
  "data": {
    "period": "30days",
    "times": [
      {
        "date": "2024-02-10",
        "avg_time": 17.8,
        "min_time": 12.1,
        "max_time": 28.4
      },
      {
        "date": "2024-02-09",
        "avg_time": 19.2,
        "min_time": 13.5,
        "max_time": 32.1
      }
    ]
  }
}
FieldTypeDescription
avg_timenumberAverage processing time in seconds
min_timenumberMinimum processing time in seconds
max_timenumberMaximum processing time in seconds

Next Steps

On this page