API Overview
The DATA Reshape API provides powerful server-side endpoints for sending tracking data directly from your backend systems, enabling reliable data collection without browser dependencies. Perfect for e-commerce platforms, CRM systems, and enterprise applications requiring backend data integration, high-volume data processing, or scenarios where client-side tracking is not suitable.
Getting Started
Prerequisites
API access is available with Data Source Addon on FLEX plan and above.
Contact DATA Reshape team to enable API access for your account.
Your Credentials
Once approved, you'll receive:
- Script ID - Your unique project identifier
- Access Token - Secret authentication key
- API Base URL - Your configured endpoint (e.g.,
dre2.yourdomain.com
)
Available Integration Methods
Standard Integration
Standardized endpoints for common business scenarios
Event Create
Universal endpoint for tracking any approved event with comprehensive data objects. Supports all event types from the Events Documentation with standardized schema validation.
Key Features:
- Flexible Event Tracking - Send any approved event type (product_viewed, checkout_completed, lead_created, etc.)
- Complete Data Objects - Support for products, shipping, payments, coupons, user data, and context
- Privacy Compliance - Built-in SHA-256 hashing and data anonymization capabilities
- Validation & Error Handling - Comprehensive data validation with detailed error messages
Perfect For:
- E-commerce Platforms - Complete transaction and customer journey tracking
- Lead Generation Systems - Contact forms, newsletter signups, and qualification tracking
- Multi-event Implementations - Single endpoint for all your tracking needs
- Rapid Deployment - Quick implementation with pre-built data structures
Implementation Example:
POST /reshape/standard/event?id=YOUR_SCRIPT_ID
Content-Type: application/json
X-Dre-Access-Token: YOUR_ACCESS_TOKEN
{
"event": {
"name": "checkout_completed",
"value": 299.99,
"currency": "EUR",
"id": "ORDER_12345",
"properties": {
"payment_method": "credit_card",
"shipping_method": "express"
}
},
"products": [...],
"shipping": [...],
"payments": [...],
"user": {...}
}
Custom Integration
Enterprise-level custom endpoints tailored to your business
Available exclusively for CUSTOM plan subscribers with dedicated development resources.
About Custom Integration
Specialized webhook endpoints designed specifically for your business logic, data structures, and operational workflows.
Key Benefits:
- Business-Aligned Architecture - Match your exact business logic and data requirements
- Stable Long-term Communication - Purpose-built endpoints that evolve with your business
- Enterprise-Grade Customization - Tailored validation, processing, and response formats
- Seamless Integration - Natural fit with existing infrastructure and systems
What's Included:
- Dedicated Development - Custom endpoint creation by DATA Reshape team
- Technical Consultation - Architecture guidance and optimization recommendations
- Comprehensive Testing - Functionality, performance, and security validation
- Ongoing Support - Maintenance, updates, and business evolution support
Perfect For:
- E-commerce Enterprises - Complex multi-warehouse, custom pricing, loyalty programs
- Healthcare Organizations - HIPAA-compliant patient journey tracking and medical device integration
- Financial Services - Regulatory compliance tracking and secure transaction processing
- Any Business - Requiring specialized data collection beyond standard approaches
Custom Endpoint Examples:
E-commerce Enterprise:
POST /reshape/custom/enterprise-order-sync?id=YOUR_SCRIPT_ID
{
"order_data": {
"erp_order_id": "ERP_ORD_12345",
"multi_warehouse_fulfillment": [...],
"custom_pricing_rules": [...],
"loyalty_program_data": {...}
},
"business_context": {
"sales_channel": "enterprise_b2b",
"account_tier": "platinum"
}
}
Healthcare Organization:
POST /reshape/custom/patient-interaction-tracking?id=YOUR_SCRIPT_ID
{
"interaction_data": {
"patient_journey_stage": "consultation",
"service_categories": [...],
"compliance_data": {
"hipaa_consent": true,
"anonymization_level": "full"
}
},
"regulatory_context": {...}
}
API Architecture
Authentication & Security
Access Control
- X-Dre-Access-Token header for secure authentication
- Script ID parameter for project identification
- HTTPS-only communication for data protection
Data Privacy
- SHA-256 Hashing - Built-in support for sensitive data anonymization
- Flexible Privacy Levels - From plaintext to full anonymization
- GDPR & CCPA Compliance - Privacy-first data collection approaches
Data Standards
Consistent Schema
- Standardized Objects - Event, Product, User, Shipping, Payment, Coupon objects
- Flexible Properties - Custom business attributes without breaking core functionality
- Currency Support - Multi-currency with exchange rate handling
Validation & Quality
- Real-time Validation - Comprehensive data checking before processing
- Error Reporting - Detailed validation messages for quick debugging
- Data Consistency - Ensures reliable analytics and destination compatibility
Response Format
- Success (200):
{"result": "ok", "messages": ["Received. This has been processed"]}
- Error (4xx):
{"result": "error", "messages": ["Missing unique_id.", "Invalid currency format."]}
Implementation Strategies
Choose Your Integration Method
Standard Integration - Best For:
// Universal event tracking
const events = [
'product_viewed',
'checkout_completed',
'lead_created',
'sign_up'
];
// Single endpoint handles all events
POST /reshape/standard/event
Custom Integration - Best For:
// Business-specific workflows
const customEndpoints = [
'/enterprise-order-sync',
'/patient-interaction-tracking',
'/financial-compliance-reporting',
'/inventory-management-sync'
];
// Tailored endpoints for specialized needs
POST /reshape/custom/{your-endpoint}
Common Use Cases
E-commerce Integration
- Order Tracking - Complete transaction lifecycle from cart to fulfillment
- Customer Journey - Product views, cart interactions, checkout progression
- Inventory Management - Stock updates, warehouse fulfillment, supply chain data
- Customer Analytics - Lifetime value, segmentation, behavior analysis
CRM & Lead Management
- Lead Capture - Contact forms, newsletter signups, demo requests
- Sales Pipeline - Qualification, progression, conversion tracking
- Customer Onboarding - Registration, activation, engagement milestones
- Marketing Attribution - Source tracking, campaign effectiveness, ROI analysis
Enterprise & Specialized Solutions
- Industry Compliance - Healthcare HIPAA, finance regulatory requirements
- Legacy System Integration - Modernizing existing data collection infrastructure
- Multi-system Synchronization - ERP, CRM, inventory, and analytics coordination
- Custom Business Logic - Unique workflows, pricing models, operational processes
Implementation Best Practices
Security & Authentication
// Environment variables for security
const config = {
baseURL: process.env.RESHAPE_API_URL,
accessToken: process.env.RESHAPE_ACCESS_TOKEN,
scriptId: process.env.RESHAPE_SCRIPT_ID
};
// Secure headers
const headers = {
'Content-Type': 'application/json',
'X-Dre-Access-Token': config.accessToken
};
Error Handling & Retry Logic
// Exponential backoff retry
async function sendToReshape(data, retries = 3) {
try {
const response = await fetch(url, {
method: 'POST',
headers,
body: JSON.stringify(data)
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return await response.json();
} catch (error) {
if (retries > 0) {
await sleep(Math.pow(2, 4 - retries) * 1000);
return sendToReshape(data, retries - 1);
}
throw error;
}
}
Data Validation
// Pre-validation before sending
function validateEventData(eventData) {
const required = ['event.name', 'event.value', 'event.currency', 'event.id'];
const missing = required.filter(field => !getNestedValue(eventData, field));
if (missing.length > 0) {
throw new Error(`Missing required fields: ${missing.join(', ')}`);
}
return true;
}
Getting Support
Contact Information
- Email: [email protected]
- Support Portal: https://www.datareshape.ro/contact
Before Contacting Support
- Environment Details - Script ID, endpoint URL, environment (prod/dev)
- Request Data - Complete request payload (sanitized of sensitive data)
- Response Received - Full response body and status code
- Timestamp - Exact time of the issue occurrence
- Integration Method - Standard or Custom integration type
Development Resources
- Events Documentation - Complete event reference and examples
- Objects Documentation - Detailed data object specifications
- API Rate Limits - Current limits and upgrade options
- Best Practices - Security, performance, and implementation guidelines
Next Steps
Standard Integration
- Get API Credentials - Contact team for access token and script ID
- Review Events - Choose events from Events Documentation
- Implement Endpoint - Use Event Create for all events
- Test & Deploy - Validate with test environment before production
Custom Integration
- Schedule Consultation - Discuss business requirements with DATA Reshape team
- Requirements Analysis - Define custom endpoint specifications and data flows
- Development Phase - Collaborative development of your custom endpoints
- Testing & Deployment - Comprehensive validation and production deployment
- Ongoing Partnership - Continuous support and evolution as your business grows
Choose the integration method that best fits your technical requirements and business complexity. Both approaches provide robust, scalable solutions for comprehensive data collection and analytics.