The SG Cars Trends API includes a comprehensive workflow system for automated data updates and social media integration. This guide explains how workflows operate and how to interact with them.
curl -X POST "https://api.sgcarstrends.com/workflows/linkedin/post" \ -H "Content-Type: application/json" \ -d '{ "message": "New car registration data available for January 2024", "link": "https://sgcarstrends.com/cars/2024-01" }'
curl -X POST "https://api.sgcarstrends.com/workflows/twitter/post" \ -H "Content-Type: application/json" \ -d '{ "message": "📊 January 2024 car registration data is now available! Check out the latest trends in Singapore'"'"'s automotive market.", "link": "https://sgcarstrends.com/cars/2024-01" }'
curl -X POST "https://api.sgcarstrends.com/workflows/discord/post" \ -H "Content-Type: application/json" \ -d '{ "message": "🚗 **New Data Available**\n\nJanuary 2024 car registration data has been updated!\n\n🔗 View details: https://sgcarstrends.com/cars/2024-01" }'
curl -X POST "https://api.sgcarstrends.com/workflows/telegram/post" \ -H "Content-Type: application/json" \ -d '{ "message": "📈 New car registration data for January 2024 is available! Electric vehicle registrations continue to grow.", "link": "https://sgcarstrends.com/cars/2024-01" }'
function validateWorkflowResponse(response) { if (!response.success) { throw new Error(`Workflow failed: ${response.error}`); } if (!response.data) { throw new Error('No data returned from workflow'); } return true;}