Itinera API
    • ✈ Itinera API Documentation
    • Docs
      • legacy
        • Itinera — System Overview
        • Technology Stack & Architecture
        • Getting Started Guide
        • Infrastructure
        • Frontend Application
        • Architecture Overview
        • API Reference
        • Backend Services
        • Development Guidelines
      • phases
        • 01. Architecture Overview & Checkout Idempotency
        • Phase 2: Commerce & Checkout Engine
        • Phase 3: Webhooks & Asynchronous Fulfillment
        • Phase 4: Security Perimeter & Authentication
        • Phase 5: Database Schema & Entity Relationships
        • Phase 6: AI Quota & Telemetry Subsystems
        • Phase 7: API Route Matrix & FormRequests
        • Phase 8: Global Exception & Error Handling
        • Phase 9: Frontend Ecosystem & State Management
        • Phase 10: Design System & Component Library
        • Phase 11: Interactive GSAP Animations
        • Phase 12: Deployment & CI/CD Pipeline
        • Phase 13: Testing Strategies
        • Phase 14: Performance & Optimization
        • Phase 15: Developer Onboarding & Runbooks
        • 15-Phase Comprehensive Wiki & Documentation Plan
    • APIs
      • Auth
        • Register a new user
        • Log in a user
        • Log out user
        • Refresh JWT token
        • Forgot password request
        • Reset password verification
        • Get current user profile
        • Update user profile
        • Redirect to Google OAuth
        • Google OAuth Callback
        • Verify email via signed URL
      • Catalog
        • List all countries
        • Get country details
        • List all cities
        • List all regions
        • List all destinations
        • Get destination details
        • Get hotels by destination
        • List all hotels
        • Get hotel details
        • Get reviews for a hotel
        • List all flights
        • Get flight details
        • List all restaurants
        • Get restaurant details
        • List all attractions
        • Get current weather
        • Submit review for an entity
        • Delete review
        • Toggle favourite status for entity
        • List my submitted reviews
      • Bookings
        • Book a tour destination
      • V1 Aliases
        • V1 List all countries
        • V1 Get country details
        • V1 List all cities
        • V1 List all destinations
        • V1 Get destination details
        • V1 Get hotels by destination
        • V1 List all hotels
        • V1 Get hotel details
        • V1 Get reviews for a hotel
        • V1 List all flights
        • V1 Get flight details
        • V1 List all restaurants
        • V1 Get restaurant details
        • V1 List all attractions
        • V1 Get attraction details
        • V1 List all regions
        • V1 Get weather details
      • Trips
        • List user trips
        • Create a new trip
        • Get trip details
        • Update trip details
        • Delete a trip
        • Get creation metadata
        • Attach items to a trip
        • Update trip item
        • Detach items from a trip
        • Fork a trip
      • Conversations
        • List user conversations
        • Start a new conversation
        • Get conversation details
        • List messages in conversation
        • Send message to conversation
        • Mark conversation as read
      • Commerce Plans
        • List public plans
        • Get public plan details
      • Commerce Subscriptions
        • Subscribe to a plan
        • Upgrade active plan
        • Get active subscription info
        • Cancel active subscription
      • Commerce Checkout
        • Initiate Paymob payment checkout
      • Integrations
        • Paymob status webhook callback
        • Paymob redirect return callback
      • System Settings & Support
        • Submit public contact message
        • Subscribe to system newsletter
        • Get list of my reports
        • List all notifications
        • Mark single notification as read
        • List available surveys
        • Submit answers for survey
        • Get survey details
        • Update survey details
        • Delete survey response
      • AI Tools
        • Enhance itinerary details using AI
        • Request AI review of itinerary
        • Plan route using AI assistance
        • Get AI quota remaining details
        • Chat with AI Concierge assistant
        • Get AI Review progress by ID
      • Agency Integration
        • Request agency assignment
        • List agency active tasks
        • List agency managed trips
        • Get agency total earnings
        • Get agency profile details
        • Update agency profile details
      • Admin User Management
        • List users inside admin dashboard
        • Get user profile
        • Set user active status
        • Block user profile
      • Admin Catalog Moderation
        • Create new catalog category
        • Create new catalog destination
        • Create new hotel catalog record
        • Create new flight catalog record
        • Create new restaurant catalog record
        • Create new attraction catalog record
    • Schemas
      • User
      • ErrorResponse
      • Trip
      • Destination
      • Hotel
      • Flight
      • Restaurant
      • Attraction
      • Booking
      • Review
      • Agency
      • Survey

    ✈ Itinera API Documentation

    Itinari — Developer Portal#

    The official API reference, live sandbox, and system narrative for Itinari — an AI-powered luxury travel orchestration platform (Team 2 Conference Project @ Threedos).
    Verdict: Production-ready · Laravel 13 · 106/106 reconciled API operations · live Cloud Mock with realistic datasets

    01 — Overview#

    Itinari orchestrates luxury travel: destination and flight catalogs, AI-generated itineraries (Groq llama-3.3-70b), trip attachment pipelines, Paymob-hosted checkout with HMAC-verified webhooks, agency marketplace, and an operator admin suite.
    This portal documents 106 unique API operations — every route in routes/api.php reconciled against controller implementations, grouped by domain, with request/response examples and pagination headers on all list endpoints.

    02 — Technology Stack#

    Verified against composer.json:
    LayerTechnology
    FrameworkLaravel 13 · PHP 8.5
    Authenticationtymon/jwt-auth ^2.1 · refresh rotation · blacklist on logout
    Authorizationspatie/laravel-permission — super_admin · admin · agency · user
    OAuthlaravel/socialite — Google + Facebook (email verification always required)
    AIlucianotonet/groq-laravel — llama-3.3-70b, cached + quota-managed
    Paymentspaymob/php-library — intention API · hosted checkout · HMAC webhooks
    Reportsbarryvdh/laravel-dompdf ^3.1 (PDF) · openspout (XLSX) via queued jobs
    Cache/Queuepredis (redis-ready) · database driver default
    Spec Sourcededoc/scramble ^0.13 → curated into this Apidog project

    Live System Architecture#


    03 — Frontend Engineering#

    Two client generations ship in the monorepo:
    React 19 showcase + legacy client — the legacy product surface: 355 files, 48+ pages, zero bundler, tokens.css design system, GSAP 3.12 choreography, glassmorphic dark theme.
    React 19 engineering showcase — this project's presentation layer: Vite + Tailwind 4 + shadcn/ui primitives + GSAP, with a boarding-pass design system and live Apidog-powered data flows.
    Chips: React 19 Vite Tailwind 4 shadcn/ui GSAP vanilla-js legacy · 355 files

    04 — Security Model#

    All guarded routes require a bearer token:
    Fetch: POST /login or POST /register → 1-hour access token.
    Rotate: POST /refresh (throttled 15/min) invalidates the old token atomically.
    Webhooks: POST /paymob/webhook verifies HMAC SHA-512 before any state change; idempotent by merchant_order_id.
    Design decision — JWT placement: the auth:api guard is enforced at the route layer, never inside controllers. RBAC (Spatie) is declared per-route, so permission changes are grep-able in one file and controllers stay thin. Email verification is always required — OAuth providers are never auto-trusted.

    05 — Data & Reports#

    Engines: MySQL in production, SQLite for dev/test parity harness — 44 migrations, soft deletes on major entities, polymorphic trip_items attaching hotels/flights/dining/attractions to itineraries.
    Reports: POST /admin/reports/generate queues GenerateReportJob → branded PDF (DomPDF) or XLSX (OpenSpout) with "All Time" defaults; download via GET /admin/reports/{id}/download.
    Seeded realism: migrate:fresh --seed loads 60+ paid orders/payments plus geocoded catalog fixtures for demos.

    06 — Suggested Demo Flow#

    Eight steps, one narrative:
    1.
    Register — POST /register
    2.
    Verify email — signed link → success page
    3.
    Explore catalog — GET /destinations with region/search filters
    4.
    Create trip — POST /trips
    5.
    AI generate — POST /ai/plan → enriched days[]
    6.
    Attach items — flights · hotels · dining → /attach/{type}
    7.
    Checkout — Paymob hosted → webhook fulfills order
    8.
    Boarding pass — printable ticket · review & fork community trips

    ⚙️ Core Environments#

    EnvironmentBase URLPurpose
    Live Productionhttps://itinari.up.railway.app/apiActive monorepo API serving real data.
    Local Sandboxhttp://127.0.0.1:8000/apiLocal container environment.
    Apidog Cloud Mockhttps://mock.apidog.com/m1/1364933-1369112-defaultSafe mock gateway serving realistic multi-item datasets.

    📡 Live Interactive Sandbox (Try It)#

    1.
    Open any endpoint (e.g. GET /destinations).
    2.
    Select Cloud Mock in the environment dropdown.
    3.
    Send → structured multi-item JSON (Santorini, Tokyo, Paris…).
    4.
    For guarded routes: POST /login first, copy token, then paste into Bearer Auth (top-right Auth panel).

    10 — Team#

    RoleFocus
    Backend EngineeringLaravel · domain services
    Frontend Engineeringvanilla JS · GSAP motion
    IntegrationsPaymob · Groq · OSM
    Quality & VerificationPHPUnit · 55 suites
    DevOpsDocker · Railway
    Docs & DesignOpenAPI · Apidog · brand
    Modified at 2026-08-24 14:14:31
    Next
    Itinera — System Overview
    Built with