Skip to main content

Subscription Service & Workflow Orchestration

Purpose:
Enterprise business process automation platform that orchestrates complex multi-step workflows, manages subscription lifecycles, and coordinates automated business operations across the entire platform.

Description:
This comprehensive orchestration system serves as the operational backbone for automating complex business processes that span multiple systems and require coordinated execution over time. It transforms manual, error-prone operations into reliable, scalable, and auditable automated workflows while providing real-time monitoring and control capabilities.

GET /subscription-service/app

Purpose:
Retrieves application configuration and metadata for the entire subscription orchestration platform with comprehensive system information.

Endpoint Explanation:
This endpoint provides centralized access to application configuration, service discovery information, feature flags, and operational parameters that govern the behavior of all workflow orchestration components. The system maintains version information, compatibility matrices, integration configurations, and health status indicators while supporting dynamic configuration updates and feature rollouts without service interruption.


curl -X GET https://api.rc.saas.bolttech.asia/v4.1/subscription-service/app     -H "Authorization: Bearer <token>"
{
"application": {
"name": "bolttech-subscription-service",
"version": "4.2.1",
"build": "2024.03.01.1542",
"status": "operational",
"uptime": "99.97%"
},
"configuration": {
"max_concurrent_executions": 1000,
"default_retry_policy": "exponential_backoff",
"supported_markets": ["PT", "ES", "FR", "DE", "IT"],
"feature_flags": {
"advanced_workflows": true,
"ai_optimization": true,
"multi_tenant": true
}
},
"service_discovery": {
"endpoints": {
"health_check": "/health",
"metrics": "/metrics",
"documentation": "/docs"
}
},
"last_updated": "2024-03-01T18:30:00Z"
}

POST /subscription-service/execution-strategy

Purpose:
Creates automated workflow execution strategies for business processes with comprehensive template definition and validation capabilities.

Endpoint Explanation:
This endpoint defines reusable workflow templates that contain the logic, decision trees, retry policies, and step sequences governing automated business processes. The system validates strategy definitions, performs dependency checking, estimates resource requirements, and provides simulation capabilities for testing before activation while supporting version control and rollback mechanisms.


curl -X POST https://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-strategy \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"strategy_name": "monthly_insurance_renewal",
"description": "Automated monthly insurance policy renewal workflow",
"workflow_definition": {
"trigger": {
"type": "schedule",
"cron": "0 0 1 * *",
"timezone": "UTC"
},
"steps": [
{
"step_id": "validate_policy",
"action": "policy_validation",
"parameters": {
"check_expiry": true,
"validate_payment_method": true
}
},
{
"step_id": "process_payment",
"action": "payment_processing",
"depends_on": ["validate_policy"],
"retry_policy": {
"max_attempts": 3,
"backoff": "exponential"
}
},
{
"step_id": "update_contract",
"action": "contract_renewal",
"depends_on": ["process_payment"]
}
]
},
"configuration": {
"max_concurrent_executions": 100,
"timeout_minutes": 30,
"notification_channels": ["email", "webhook"]
},
"metadata": {
"created_by": "system_admin",
"department": "operations",
"priority": "high"
}
}'
{
"strategy_id": "STRAT_456789123",
"status": "created",
"version": "1.0",
"created_at": "2024-03-01T19:15:30Z",
"validation_result": {
"valid": true,
"estimated_resource_usage": "medium",
"complexity_score": 7.5
}
}

GET /subscription-service/execution-strategy/{strategyId}

Purpose:
Retrieves execution strategy details and configuration with comprehensive version history and performance metrics.

Endpoint Explanation:
This endpoint provides complete strategy information including configuration details, execution history, performance metrics, and version control information. The system tracks strategy usage patterns, success rates, and resource consumption while providing insights for optimization and troubleshooting.


{
"strategy_id": "STRAT_456789123",
"strategy_name": "monthly_insurance_renewal",
"description": "Automated monthly insurance policy renewal workflow",
"status": "active",
"version": "1.0",
"workflow_definition": {
"trigger": {
"type": "schedule",
"cron": "0 0 1 * *",
"timezone": "UTC"
},
"steps": [
{
"step_id": "validate_policy",
"action": "policy_validation",
"parameters": {
"check_expiry": true,
"validate_payment_method": true
}
},
{
"step_id": "process_payment",
"action": "payment_processing",
"depends_on": ["validate_policy"],
"retry_policy": {
"max_attempts": 3,
"backoff": "exponential"
}
},
{
"step_id": "update_contract",
"action": "contract_renewal",
"depends_on": ["process_payment"]
}
]
},
"performance_metrics": {
"total_executions": 1247,
"success_rate": 0.987,
"avg_execution_time": "4.2 minutes",
"last_execution": "2024-03-01T00:05:30Z"
},
"created_at": "2024-03-01T19:15:30Z",
"updated_at": "2024-03-01T20:00:00Z"
}

DELETE /subscription-service/execution-strategy/{strategyId}

Purpose:
Removes execution strategies with proper cleanup and dependency validation.

Endpoint Explanation:
This endpoint safely removes strategy definitions by checking for active executions, handling graceful shutdown procedures, and maintaining audit trails. The system validates dependencies, provides cleanup options, and preserves historical data for compliance purposes.


curl -X DELETE https://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-strategy/{strategyId} \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"deletion_options": {
"force_delete": false,
"handle_active_executions": "complete_then_delete",
"preserve_history": true,
"cleanup_dependencies": true
},
"confirmation": {
"strategy_name": "monthly_insurance_renewal_v2",
"understood_impact": true
},
"metadata": {
"deleted_by": "system_admin",
"deletion_reason": "strategy_obsolete",
"replacement_strategy": "STRAT_789123456"
}
}'
{
"strategy_id": "STRAT_456789123",
"deletion_status": "scheduled",
"deletion_scheduled_for": "2024-03-02T02:00:00Z",
"active_executions": {
"count": 15,
"estimated_completion": "2024-03-01T23:45:00Z"
},
"cleanup_tasks": [
"complete_active_executions",
"archive_execution_history",
"remove_triggers",
"cleanup_dependencies"
],
"deleted_at": null,
"confirmation_id": "DEL_CONF_789456"
}

GET /subscription-service/execution-strategy

Purpose:
Lists all available execution strategies with filtering and pagination capabilities.

Endpoint Explanation:
This endpoint provides comprehensive strategy inventory with search, filtering, and pagination capabilities. The system supports queries by status, performance metrics, creation date, and usage patterns while providing summary statistics for operational oversight.

curl -X GET https://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-strategy     -H "Authorization: Bearer <token>"
{
"strategies": [
{
"strategy_id": "STRAT_456789123",
"strategy_name": "monthly_insurance_renewal_v2",
"status": "active",
"version": "1.1",
"created_at": "2024-03-01T19:15:30Z",
"performance_summary": {
"success_rate": 0.987,
"avg_execution_time": "4.2 minutes",
"last_execution": "2024-03-01T00:05:30Z"
}
},
{
"strategy_id": "STRAT_789123456",
"strategy_name": "contract_expiry_notification",
"status": "active",
"version": "2.3",
"created_at": "2024-02-15T14:20:00Z",
"performance_summary": {
"success_rate": 0.995,
"avg_execution_time": "1.8 minutes",
"last_execution": "2024-03-01T18:00:00Z"
}
}
],
"pagination": {
"total_count": 47,
"page": 1,
"page_size": 20,
"total_pages": 3
},
"summary": {
"active_strategies": 32,
"paused_strategies": 8,
"draft_strategies": 7
}
}

POST /subscription-service/execution-strategy/{strategyId}/activate

Purpose:
Activates execution strategies for automated processing with comprehensive validation and monitoring setup.

Endpoint Explanation:
This endpoint transitions strategies from draft or paused status to active processing by validating configurations, initializing monitoring systems, and establishing trigger mechanisms. The system performs pre-activation checks, resource allocation, and monitoring setup while providing activation confirmation and operational metrics.

curl -X POST https://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-strategy/STRAT_456789123/activate \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"activation_options": {
"immediate_activation": true,
"run_validation_checks": true,
"allocate_resources": true,
"setup_monitoring": true
},
"resource_allocation": {
"max_concurrent_executions": 100,
"memory_limit": "2GB",
"cpu_priority": "medium"
},
"monitoring_config": {
"enable_alerts": true,
"alert_thresholds": {
"failure_rate": 0.05,
"execution_time": "10 minutes"
},
"notification_channels": ["email", "webhook"]
},
"metadata": {
"activated_by": "system_admin",
"activation_reason": "scheduled_deployment",
"environment": "production"
}
}'
{
"strategy_id": "STRAT_456789123",
"activation_status": "activated",
"activated_at": "2024-03-01T21:15:00Z",
"pre_activation_checks": {
"validation": "passed",
"resource_availability": "confirmed",
"dependency_check": "passed"
},
"resource_allocation": {
"allocated_memory": "2GB",
"allocated_cpu": "4 cores",
"execution_slots": 100
},
"monitoring": {
"dashboard_url": "https://monitoring.bolttech.io/strategy/STRAT_456789123",
"alerts_configured": true,
"health_check_interval": "1 minute"
}
}

POST /subscription-service/execution-instance

Purpose:
Creates new execution instances from strategy templates with comprehensive context and parameter management.

Endpoint Explanation:
This endpoint instantiates workflow executions from strategy templates by providing execution context, customer data, and runtime parameters. The system validates input data, allocates resources, initializes execution state, and provides tracking capabilities while maintaining isolation between concurrent executions.


curl -X POST https://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-instance \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"strategy_id": "STRAT_456789123",
"execution_context": {
"customer_id": "CUST_789456",
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"policy_id": "POL_789456123"
},
"runtime_parameters": {
"renewal_amount": 34.99,
"currency": "EUR",
"billing_cycle": "monthly",
"grace_period_days": 7
},
"execution_options": {
"priority": "normal",
"timeout_minutes": 30,
"retry_on_failure": true,
"send_notifications": true
},
"metadata": {
"triggered_by": "scheduled_job",
"execution_source": "automated_renewal",
"partner_id": "PARTNER_001"
}
}'
{
"instance_id": "INST_987654321",
"strategy_id": "STRAT_456789123",
"status": "initialized",
"created_at": "2024-03-01T22:00:00Z",
"execution_context": {
"customer_id": "CUST_789456",
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"policy_id": "POL_789456123"
},
"estimated_completion": "2024-03-01T22:30:00Z",
"tracking_url": "https://monitoring.bolttech.io/execution/INST_987654321"
}

GET /subscription-service/execution-instance/{instanceId}

Purpose:
Retrieves execution instance details and current status with comprehensive progress tracking and state information.

Endpoint Explanation:
This endpoint provides real-time execution instance information including current progress, execution state, step completion status, and performance metrics. The system maintains detailed execution logs, tracks resource consumption, and provides debugging information while supporting real-time monitoring and operational oversight.


{
"instance_id": "INST_987654321",
"strategy_id": "STRAT_456789123",
"status": "initialized",
"created_at": "2024-03-01T22:00:00Z",
"execution_context": {
"customer_id": "CUST_789456",
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"policy_id": "POL_789456123"
},
"estimated_completion": "2024-03-01T22:30:00Z",
"tracking_url": "https://monitoring.bolttech.io/execution/INST_987654321"
}

POST /subscription-service/execution-instance/{instanceId}/start

Purpose:
Starts execution instance processing with monitoring and resource allocation.

Endpoint Explanation:
This endpoint initiates execution processing by allocating resources, starting workflow execution, and establishing monitoring. The system validates readiness conditions, initializes execution context, and begins step processing while providing real-time status updates.


curl -X POSThttps://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-instance/{instanceId}/start \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"start_options": {
"immediate_start": true,
"pre_execution_checks": true,
"allocate_resources": true,
"enable_monitoring": true
},
"resource_requirements": {
"memory_limit": "512MB",
"cpu_priority": "high",
"max_execution_time": "30 minutes"
},
"notification_settings": {
"notify_on_start": true,
"notify_on_completion": true,
"notify_on_failure": true,
"notification_channels": ["webhook", "email"]
},
"metadata": {
"started_by": "automated_scheduler",
"execution_trigger": "time_based",
"priority_reason": "customer_renewal_due"
}
}'
{
"instance_id": "INST_987654321",
"execution_status": "started",
"started_at": "2024-03-01T22:30:00Z",
"resource_allocation": {
"allocated_memory": "512MB",
"allocated_cpu": "2 cores",
"execution_slot": "SLOT_789"
},
"monitoring": {
"real_time_url": "https://monitoring.bolttech.io/execution/INST_987654321/live",
"alerts_enabled": true,
"health_check_interval": "30 seconds"
},
"estimated_completion": "2024-03-01T23:00:00Z",
"execution_reference": "EXEC_REF_456789"
}

POST /subscription-service/execution-event

Purpose:
Creates custom execution events for workflow triggers with comprehensive event data and routing capabilities.

Endpoint Explanation:
This endpoint generates business events that trigger workflow executions or provide data to running processes. The system validates event data, applies routing rules, and maintains event history while supporting complex event correlation and pattern matching for sophisticated workflow orchestration.


curl -X POST https://api.rc.saas.bolttech.asia/v4.1/subscription-service/execution-event     -H "Authorization: Bearer <token>"     -H "Content-Type: application/json"     -d '{
"event_type": "customer_payment_failed",
"event_data": {
"customer_id": "CUST_789456",
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"payment_amount": 34.99,
"currency": "EUR",
"failure_reason": "insufficient_funds",
"payment_method_id": "PM_TOKEN_987654321"
},
"routing_rules": {
"target_strategies": ["STRAT_456789123", "STRAT_payment_retry"],
"priority": "high",
"immediate_processing": true
},
"correlation_data": {
"transaction_id": "TXN_001234569",
"billing_cycle": "2024-03",
"retry_count": 1
},
"metadata": {
"event_source": "payment_processor",
"created_by": "system",
"partner_id": "PARTNER_001"
}
}'
{
"event_id": "EVT_123456789",
"status": "processed",
"created_at": "2024-03-01T23:15:00Z",
"routing_results": [
{
"strategy_id": "STRAT_456789123",
"instance_id": "INST_234567890",
"status": "triggered",
"estimated_execution": "2024-03-01T23:16:00Z"
},
{
"strategy_id": "STRAT_payment_retry",
"instance_id": "INST_345678901",
"status": "queued",
"scheduled_for": "2024-03-02T09:00:00Z"
}
],
"event_correlation_id": "CORR_456789123"
}

GET /subscription-service/queue

Purpose:
Monitors queue status, metrics, and processing statistics with comprehensive operational visibility.

Endpoint Explanation:
This endpoint provides visibility into the internal queueing systems that manage workflow executions, event processing, and notification delivery. It returns metrics on pending, active, and failed jobs, as well as system-level resource consumption metrics (CPU, memory, disk, network) to help monitor operational health.


curl -X GEThttps://api.rc.saas.bolttech.asia/v4.1/v4.1/subscription-service/queue     -H "Authorization: Bearer <token>"
{
"queue_status": "operational",
"total_queues": 8,
"queue_details": [
{
"queue_name": "execution_instances",
"status": "active",
"pending_jobs": 45,
"processing_jobs": 12,
"failed_jobs": 2,
"avg_processing_time": "3.2 minutes",
"throughput_per_hour": 180
},
{
"queue_name": "event_processing",
"status": "active",
"pending_jobs": 23,
"processing_jobs": 8,
"failed_jobs": 0,
"avg_processing_time": "45 seconds",
"throughput_per_hour": 720
},
{
"queue_name": "notification_delivery",
"status": "active",
"pending_jobs": 156,
"processing_jobs": 25,
"failed_jobs": 3,
"avg_processing_time": "12 seconds",
"throughput_per_hour": 2400
}
],
"system_metrics": {
"cpu_usage": "68%",
"memory_usage": "2.1GB/4GB",
"disk_usage": "45%",
"network_io": "moderate"
},
"last_updated": "2024-03-01T23:30:00Z"
}

POST /subscription-service/subscriptions

Purpose:
Creates subscription entities with automated workflow integration and comprehensive lifecycle management.

Endpoint Explanation:
This endpoint establishes subscription records that coordinate customer relationships with automated workflow orchestration. The system links customers, products, and workflows while initializing lifecycle management, communication sequences, and business process triggers.


# Example cURL omitted for brevity
{
"subscription_id": "SUBS_987654321",
"status": "active",
"created_at": "2024-03-01T23:45:00Z",
"customer_id": "CUST_789456",
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"workflow_links": [
{
"strategy_id": "STRAT_456789123",
"link_id": "LINK_123456",
"status": "active"
},
{
"strategy_id": "STRAT_renewal_notification",
"link_id": "LINK_234567",
"status": "active"
}
],
"next_billing_date": "2024-04-01T00:00:00Z",
"subscription_reference": "SUB_REF_456789"
}

POST /subscription-service/authorization

Purpose:
Authorizes subscription service operations with role-based access control and comprehensive security validation.

Endpoint Explanation:
This endpoint implements security controls for subscription service operations by validating user permissions, checking operation authorization, and maintaining audit trails. The system supports role-based access control with granular permissions specific to workflow operations while integrating with enterprise identity systems.

# To be included
{
// To be included
}