Skip to content

Getting Started

Welcome! This guide will help you integrate the Steer-Vibes Analytics API into your application quickly and efficiently.

🔐 API Key Authentication

API Key Format:

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

API Key Security:

  • Store API keys securely (environment variables, secret managers)
  • Never commit API keys to version control or logs
  • Use different API keys for development, staging, and production environments

The Steer Analytics API follows a 3-step async pattern optimized for large dataset processing. This pattern is based on the Snowflake SQL API standard:

1️⃣ Submit

Submit Query Send your analytics request and receive a unique query ID for tracking

2️⃣ Monitor

Check Status Poll the status endpoint until query execution completes. The response includes partition metadata.

3️⃣ Retrieve

Get Results (Partitioned) Fetch each partition separately using the results endpoint with ?partition=N

Let’s make your first API call to retrieve Steer customer analytics.

Terminal window
# Submit a query for complete customer data
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 '{}'

Expected Response:

{
"message": "Query submitted successfully",
"queryId": "01bf6563-0003-9701-0006-874e00e6507e",
"queryType": "customer-vibes",
"status": "RUNNING",
"success": true,
"links": {
"status": "/api/data/v1/analytics/01bf6563-0003-9701-0006-874e00e6507e/status",
"results": "/api/data/v1/analytics/01bf6563-0003-9701-0006-874e00e6507e/results"
}
}

The API offers multiple query types for different use cases:

Endpoint: /api/data/v1/analytics/customer-vibes

When to Use:

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

Expected Volume:

  • All customer and vehicle records
  • Typical response: 10,000+ records
  • Processing time: Variable (depends on data size)
  • Cached response: Instant
Terminal window
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 '{}'

Endpoint: /api/data/v1/analytics/business360-hierarchy

Description: Returns complete organizational structure showing the relationships between brands, tenants, and shops.

Terminal window
curl -X POST https://public-api.dev2.steercrm.dev/api/data/v1/analytics/business360-hierarchy \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{}'

🚀 Use Caching

Results are cached for 1 hour. Identical queries will return instantly with cached data.

⏱️ Choose the Right Query

Use delta queries for regular sync operations to minimize data transfer and processing time.

📊 Handle Partitions

Large datasets are automatically partitioned. Always iterate through all partitions to get complete data.

🔄 Implement Retry Logic

Add exponential backoff for failed requests and handle transient network issues.

  1. Batch Operations: Group multiple data needs into single query cycles
  2. Cache Locally: Store results locally to minimize API calls
  3. Use Delta Queries: For regular sync operations, use 24-hour delta queries
  4. Handle Errors Gracefully: Implement proper error handling and retry logic
  5. Monitor Performance: Track query completion times and optimize accordingly