The YGO API provides two environments: Sandbox and Production. Understanding when and how to use each is critical for successful integration.The YGO API uses a single base URL (https://api.ygo.ai/v1) for all environments. Your API key automatically routes requests to Sandbox or Production based on the Project it's connected to.Simple integration—one URL to remember
Easy environment switching—just change your API key
Same code works across all environments
Environment Overview#
| Aspect | Sandbox | Production |
|---|
| Purpose | Development and testing | Live operations |
| Base URL | https://api.ygo.ai/v1 | https://api.ygo.ai/v1 |
| Project Type | Sandbox Project | Production Project |
| API Keys | Connected to Sandbox Project | Connected to Production Project |
| Supplier Credentials | Test/sandbox accounts | Your production accounts |
| Bookings | Test bookings (not fulfilled) | Real bookings (fulfilled and billed) |
| Data | Isolated from production | Live customer data |
| Rate Limits | 100 requests/minute | 1000 requests/minute |
Sandbox Environment#
Purpose#
Initial integration - Build and test your integration without risk
Development - Active feature development
Testing - Automated tests, manual QA
Training - Onboard new developers or partners
What's Different in Sandbox#
Connected to test/sandbox accounts from Peakwork, Amadeus, etc.
Test credentials are configured by YGO during onboarding
Availability may be limited compared to production
Test bookings are created but never fulfilled
No actual hotel reservations or flight tickets are issued
Completely isolated from production
Safe to experiment and make mistakes
Data may be reset periodically (with notice)
Best Practice: Always develop and test new features in Sandbox first, even if you're already live in Production.
Sandbox Limitations#
Known Sandbox Behaviors:Search results may return fewer packages than production (due to test supplier data)
Some edge cases (rare destinations, specific dates) may not have test data
Payment processing uses test card numbers (e.g., 4111111111111111)
Webhooks are sent but to your test URLs only
Production Environment#
Purpose#
Live customer bookings - Real transactions with real fulfillment
Customer-facing applications - Your production website or app
Real business operations - After thorough testing in Sandbox
Going Live#
Before switching to Production:1.
✅ Complete thorough testing in Sandbox
2.
✅ Handle all error scenarios gracefully
3.
✅ Implement proper logging and monitoring
4.
✅ Review security best practices
5.
✅ Get your Production Project API key from the YGO Console
6.
✅ Switch to your Production API key in your environment configuration
7.
✅ Verify your Production Project has production supplier credentials configured
Bookings made in Production are real:Hotels are actually reserved
Flights are actually ticketed
You and your customers will be charged
Cancellations may incur fees
Test everything in Sandbox first! Production Monitoring#
API Response Times - Track latency
Error Rates - Alert on spikes in 4xx/5xx errors
Booking Success Rates - Monitor conversion from search to booking
Supplier Failures - Track which suppliers have issues
Coming Soon: The YGO Console will include dashboards for API health, error rates, and usage analytics.
Switching Between Environments#
Switching environments is simple—just change your API key. The base URL stays the same:Your API key automatically determines which environment you're accessing—no need to update URLs or endpoints.DO:Use environment variables for API keys
Keep separate API keys for Sandbox and Production Projects
Use feature flags to control production rollout
Keep Sandbox access available for testing even after going live
DON'T:Hard-code API keys in your application
Use Production Project API keys for testing
Skip testing in Sandbox before deploying to production
Mix up which API key belongs to which environment
Example: Environment Configuration#
Here's a clean way to manage environments in your code:Pro Tip: Since the URL is the same across environments, you can use the same integration code for both Sandbox and Production. Just swap the API key via environment variables—no code changes needed.
Data Consistency#
Sandbox and Production are completely isolated:Bookings created in Sandbox don't appear in Production (and vice versa)
Search IDs are not portable between environments
User data, settings, and configurations are separate
If you need to test production-like scenarios in Sandbox, contact your account manager to sync specific test data.Next Steps#
Now that you understand environments: