1. Default Module
YGO Client API
v1
  • v2
  • v1
  • Default Module
    • Overview
    • Core Concepts
    • Authentication
    • Quickstart Guide
    • AI Search & Trip Planning
    • Booking Flow
    • Environments
    • General
      • Check API health status
      • Get current API key context
    • AI Search & Trip Planning
      • Send message to YGO AI
    • Product Search (Deprecated)
      • Search for hotel & package offers
      • Get transfers for booking
      • Get package price calendar
    • Bookings
      • Get or create open booking
      • Check offer availability
      • Update open booking
      • Update booking status and trigger workflows
      • List bookings
      • Get booking
    • Schemas
      • Schemas
        • PackageSearchRequest
        • GetPackageCalendarRequest
        • GetBookingRequest
        • ListBookingsRequest
        • SaveBookingStatusRequest
        • SaveOpenBookingRequest
        • GetOpenBookingRequest
        • GetTransfersRequest
        • Product
        • Booking
        • TransferOptionsResponse
        • PackageCalendarResponse
        • ProductTexts
        • BookingDetails
        • TripReference
        • TransferOption
        • PackageCalendarDate
        • LocaleContent
        • BookingItemInput
        • Trip
        • ProductImage
        • TransferImage
        • BookingItem
        • Traveller
        • PickupInformation
        • ProductDetails
        • PackageOffer
        • PickupLocation
        • Image
        • Pickup
        • TourOperator
        • CheckPickup
        • Accommodation
        • TransferRemark
        • Room
        • CancellationPolicy
        • Transport
        • Flight
        • Airport
        • Price
        • PriceByPax
        • SuccessResponse
        • ErrorResponse
        • Hotel
        • HotelFeatures
        • FeatureState
        • RoomFeatures
        • RoomContent
        • Facility
      • Response
        • Unauthorized
  1. Default Module

Environments

The YGO API provides two environments: Sandbox and Production. Understanding when and how to use each is critical for successful integration.
INFO
Unified Endpoint Design
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.
Benefits:
Simple integration—one URL to remember
Easy environment switching—just change your API key
Same code works across all environments

Environment Overview#

AspectSandboxProduction
PurposeDevelopment and testingLive operations
Base URLhttps://api.ygo.ai/v1https://api.ygo.ai/v1
Project TypeSandbox ProjectProduction Project
API KeysConnected to Sandbox ProjectConnected to Production Project
Supplier CredentialsTest/sandbox accountsYour production accounts
BookingsTest bookings (not fulfilled)Real bookings (fulfilled and billed)
DataIsolated from productionLive customer data
Rate Limits100 requests/minute1000 requests/minute

Sandbox Environment#

Purpose#

Use Sandbox for:
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#

Supplier Connections:
Connected to test/sandbox accounts from Peakwork, Amadeus, etc.
Test credentials are configured by YGO during onboarding
Availability may be limited compared to production
Bookings:
Test bookings are created but never fulfilled
No actual hotel reservations or flight tickets are issued
No charges occur
Data:
Completely isolated from production
Safe to experiment and make mistakes
Data may be reset periodically (with notice)
TIP
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#

Use Production for:
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
WARNING
Production = Real Money
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#

Once live, monitor:
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
INFO
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:
TIP
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:
Make your first request in Sandbox with the Quickstart Guide
Review the Authentication guide to understand API keys
Explore the API Reference to see all available endpoints
Modified at 2025-10-16 11:59:24
Previous
Booking Flow
Next
Check API health status
Built with