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

    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