For security, load your API key from environment variables (for example via .env) and never store it in browser storage.
2Connect delivery providers
Connect the accounts you'll use when booking deliveries via the API. You can disconnect
anytime.
bolt
uber
yango
3Try a request
Run a quick quote search using your SAIL_API_KEY environment variable.
Get Delivery Quote
Successful responses include header X-Sail-Status: Smooth Sailing.
Overview
The Sail API provides a comprehensive delivery platform that connects you to multiple providers through a single, unified interface. See our pricing for plan limits and rates.
Features
Multi-Provider Support: Connect to Bolt, Uber, and Yango through one API
Unified Interface: Consistent request/response format across all providers
Real-time Pricing: Get accurate quotes and delivery estimates
Provider Management: Easily connect and disconnect provider accounts
Status Tracking: Monitor delivery progress with comprehensive status updates
Architecture
The Sail API acts as a unified layer on top of multiple delivery providers, abstracting away the differences between their individual APIs. This allows you to integrate once and get access to multiple providers seamlessly.
Base URL
All API requests should be made to https://api.sailrides.co. All endpoints are versioned and prefixed with /v1.
Store delivery state - Avoid re-polling completed deliveries
Use conditional requests - Check Last-Modified headers if available
Monitor API usage - Track your request count to avoid hitting limits
Have a fallback - Consider switching to webhooks if polling becomes inefficient
Webhooks
Webhooks provide real-time notifications when delivery status changes occur. Instead of constantly polling our API, you can receive immediate updates by configuring webhook endpoints.
Configuration
Configure your webhook URL when creating a delivery by including the webhookUrl field in your request. The webhook URL will receive real-time notifications for that delivery.
function logApiError(error, context = {}) {
const logLevel = getLogLevel(error.code);
console[logLevel]('API Error:', {
code: error.code,
message: error.message,
requestId: context.requestId,
timestamp: new Date().toISOString(),
...context
});
}
function getLogLevel(errorCode) {
const clientErrors = ['invalid_api_key', 'missing_required_field', 'invalid_quote'];
const serverErrors = ['internal_error', 'provider_unavailable'];
if (clientErrors.includes(errorCode)) return 'warn';
if (serverErrors.includes(errorCode)) return 'error';
return 'info';
}
Troubleshooting Guide
Common Issues and Solutions
401 Unauthorized: Verify API key in Authorization header format: ApiKey your_key
429 Rate Limited: Implement rate limiting and exponential backoff
Quote expired: Request a new quote before creating delivery
Delivery not found: Verify delivery ID and account permissions
Provider unavailable: Try again later or use different provider
Embeddable Widget
The Sail widget allows you to embed ride price comparison directly into your website. Visitors can see real-time prices from multiple providers (Bolt, Uber, Yango) to reach your location.
Use cases:
Event venues showing attendees how much it costs to get there
Hotels displaying ride prices from airports
Restaurants helping customers plan their visit
Conference centers with pre-configured destination
Geolocation Permission The widget requires user location permission to calculate ride prices. Users will be prompted when they click “Compare Ride Prices”.
Domain Whitelisting Your widget key is tied to specific domains (max 3 allowed per widget). You can manage allowed domains from the Widgets dashboard.
HTTPS Required The widget must be embedded on HTTPS pages for geolocation to work properly.
Rate Limiting Widget requests are rate-limited per key. For high-traffic sites, contact us for increased limits.
Mobile Support The widget is fully responsive and works on mobile devices. The iframe adapts to the container width.