Skip to content

Customer-Vibes Analytics API

API Reference Production Ready

Section titled “API Reference ”

Complete API reference for the Customer-Vibes Analytics API. Provides secure access to customer profile and vehicle data from the Customer Database through a high-performance API gateway. Built on a proven 3-step async pattern with intelligent caching for optimal performance.

🔒 Enterprise Security

System-level JWT authentication with predefined queries for maximum security

⚡ Real-time Processing

Daily data updates with 24-hour delta queries for incremental sync

Terminal window
# Submit analytics query
curl -X POST https://public-api.dev2.steercrm.dev/api/data/v1/analytics/customer-vibes \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{}'
# Check status (replace with actual queryId)
curl https://public-api.dev2.steercrm.dev/api/data/v1/analytics/{queryId}/status \
-H "X-API-Key: YOUR_API_KEY"
# Get results
curl https://public-api.dev2.steercrm.dev/api/data/v1/analytics/{queryId}/results?partition=0 \
-H "X-API-Key: YOUR_API_KEY"

API Base URL

Development: https://public-api.dev2.steercrm.dev Production: https://api-prod.example.com

🔐 API Key Authentication

Authentication Method:

  • Use the X-API-Key header for all API requests
  • Example: X-API-Key: your-api-key-here

Get information about all available predefined analytics queries.

GET /api/data/v1/analytics/types

Full Dataset Query Complete Data

Section titled “Full Dataset Query ”

Retrieve complete customer profiles and vehicle data for initial data loads or complete snapshots.

POST /api/data/v1/analytics/customer-vibes
Content-Type: application/json
{}

Use Cases:

  • Initial system setup and data population
  • Complete data synchronization
  • Data warehouse migrations
  • Comprehensive reporting and analytics

24-Hour Delta Query Incremental

Section titled “24-Hour Delta Query ”

Retrieve only records updated within the last 24 hours for efficient incremental updates.

POST /api/data/v1/analytics/customer-vibes-delta-24h
Content-Type: application/json
{}

When no records have been updated in the last 24 hours:

{
"success": true,
"queryId": "01bf6563-0003-96b3-0006-874e00e6407a",
"queryType": "customer-vibes-delta-24h",
"partition": 0,
"totalPartitions": 1,
"rowCount": 0,
"data": [],
"metadata": {
"format": "jsonv2",
"numRows": 0,
"partitionInfo": [
{
"rowCount": 0,
"uncompressedSize": 0
}
]
}
}

Use Cases:

  • Regular synchronization processes (hourly/daily)
  • Real-time data pipeline updates
  • Change detection and event processing
  • Efficient bandwidth usage for large datasets

Retrieve the complete organizational structure showing relationships between brands, tenants, and shops.

POST /api/data/v1/analytics/business360-hierarchy
Content-Type: application/json
{}

Description: Returns complete organizational structure with brand, tenant, and shop relationships for navigation and filtering.

Retrieve aggregated KPIs and performance metrics at the brand level for executive dashboards.

POST /api/data/v1/analytics/business360-insights-brand
Content-Type: application/json
{
"brand_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Body Parameters:

  • brand_id (required): Brand UUID for filtering insights

Description: Provides high-level executive insights with brand-level KPIs aggregated across all tenants and shops.

Retrieve aggregated performance metrics at the tenant level for operational management.

POST /api/data/v1/analytics/business360-insights-tenant
Content-Type: application/json
{
"tenant_id": "f2e3d4c5-b6a7-8901-2345-6789abcdef01"
}

Body Parameters:

  • tenant_id (required): Tenant UUID for filtering insights

Description: Operational management insights with performance metrics rolled up across all shops within a tenant.

Retrieve granular performance data at the shop location level for detailed analysis.

POST /api/data/v1/analytics/business360-insights-shop
Content-Type: application/json
{
"shop_id": "c3d4e5f6-a7b8-9012-3456-789abcdef012"
}

Body Parameters:

  • shop_id (required): Shop UUID for filtering insights

Description: Detailed KPIs for individual shop locations with granular performance metrics.

Monitor the execution progress of submitted queries with real-time status updates.

GET /api/data/v1/analytics/{queryId}/status

RUNNING

Query is currently executing on the database

SUCCESS

Query completed successfully, results are available

FAILED

Query execution failed, check error details

Retrieve the processed data from completed queries with support for large dataset partitioning.

GET /api/data/v1/analytics/{queryId}/results?partition=0

Parameters:

  • partition (optional): Partition number (0-based). Default: 0

Test the API quickly and efficiently with our pre-configured Postman collection. Get started in minutes with ready-to-use requests and environment configurations.

📦 Complete Collection

Pre-configured requests for all API endpoints including:

  • Customer analytics queries (full dataset & 24h delta)
  • Status monitoring and result retrieval
  • Health checks
  • Built-in variable management and error handling

🔧 Environment Setup

Development Environment

Ready-to-use environment configuration with:

  • Dev2 API URL (https://public-api.dev2.steercrm.dev)
  • API key variable placeholder
  • Automatic query ID persistence
  • Response validation scripts

Get testing in 3 steps:

  1. Download the collection and environment files
  2. Import both files into Postman
  3. Set your API key in the environment variables

For comprehensive data model specifications including field definitions, business rules, consent management, and integration considerations, please refer to the dedicated Data Model documentation.

⚡ Database Processing

Variable timing Initial query execution depends on data size and complexity

🚀 Cached Results

Redis Caching Cached results for identical queries delivered instantly

⏱️ Result Cache TTL

1 hour Results cached for optimal performance

🔄 Status Cache TTL

5 minutes Running query status cached briefly

For large datasets, the database automatically creates partitions when needed. The number of partitions varies based on dataset size and complexity.

📊 Partition Strategy

Automatic Partitioning

  • Large result sets are automatically divided into manageable partitions
  • Number of partitions varies based on dataset size and data characteristics
  • Partition size varies based on data characteristics and compression

📊 Full Dataset

Complete Records All available customer and vehicle records from source systems

⏰ 24-Hour Delta

Recent Updates Records updated within the last 24 hours (based on Unix timestamp comparison)

🔄 Update Frequency

Daily Updates Source system updates processed once every 24 hours

🌐 Global Sync

Multi-tenant Supports multiple tenant environments and regions