Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

My3PAI API

OpenAPI 3.0.3 Production Ready Laravel Sanctum Stripe Connect Google Vertex AI


🌍 Overview

My3PAI is a next-generation creator commerce platform that empowers travel influencers, map creators, and digital content producers to build, monetize, and scale their expertise. This repository contains the complete OpenAPI 3.0.3 specification for the My3PAI REST API β€” a comprehensive, well-documented blueprint of the platform's entire surface area.

The API powers a multi-sided marketplace connecting creators (influencers, map makers, educators) with consumers (travelers, learners, adventure seekers) through an ecosystem of:

  • πŸ—ΊοΈ Interactive Travel Maps with rich Points of Interest (POIs)
  • πŸŽ“ Masterclasses & Courses β€” premium educational content
  • πŸŽ™οΈ Podcasts & Blog Posts β€” content publishing and monetization
  • πŸ“ž 1-on-1 Consultations β€” booking and scheduling with calendar management
  • 🎬 Digital Media Marketplace β€” stock footage, presets, templates, and more
  • πŸ’³ Full Commerce Stack β€” cart, orders, payments, invoicing, and payouts

πŸ’° Money convention (since 2026-08-18): every money value is an integer in minor units (cents) under a *_cents key. No dollar floats on the wire. *_formatted fields are display-only strings; percentages keep *_percentage names. See MIGRATION-money-cents-2026-08-18.md for the full endpoint-by-endpoint impact and frontend display guidance.


My3PAI System Architecture


✨ Why My3PAI?

Problem My3PAI Solution
Travel creators lack monetization tools Multi-revenue engine: maps, courses, consultations, media sales
Fragmented creator tooling Unified platform: content management, e-commerce, scheduling
No standardized travel data Rich POI schema with filters, media, pricing, and versioning
Complex creator payouts Stripe Connect integration with automated platform fees
Limited audience engagement Blog, podcast, social posts, contact forms β€” all in one place

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        My3PAI API                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ” Authentication Layer  (Laravel Sanctum Token Auth)      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ“¦ Core Domains                                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Maps &  β”‚ β”‚ Content  β”‚ β”‚ Creator  β”‚ β”‚  Commerce    β”‚  β”‚
β”‚  β”‚   POIs   β”‚ β”‚  (Blog,  β”‚ β”‚ Services β”‚ β”‚  (Cart,      β”‚  β”‚
β”‚  β”‚          β”‚ β”‚ Podcast, β”‚ β”‚ (Consul- β”‚ β”‚  Orders,     β”‚  β”‚
β”‚  β”‚          β”‚ β”‚ Master-  β”‚ β”‚ tations, β”‚ β”‚  Payments,   β”‚  β”‚
β”‚  β”‚          β”‚ β”‚ classes) β”‚ β”‚ Payouts) β”‚ β”‚  Invoices)   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ’³ Payment Processing  (Stripe Connect)                    β”‚
β”‚  πŸ€– AI Services  (Google Vertex AI)                        β”‚
β”‚  πŸ“Š Admin & Analytics                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Core Capabilities

πŸ—ΊοΈ Maps & Points of Interest (POIs)

The heart of My3PAI β€” a sophisticated geographic content system:

  • Rich POI Data Model β€” Each POI includes basic info, categories, difficulty levels, pricing, regions, amenities, tips, media, and experiential descriptions
  • Completeness Scoring β€” Automated 0-100 scoring with publishability checks
  • Optimistic Locking β€” Draft version control prevents concurrent edit conflicts
  • Visibility Controls β€” Public/private toggles, featured POIs for map previews
  • Batch Operations β€” Bulk visibility toggling and management
  • Advanced Filtering β€” Multi-dimensional filters: activity, terrain, audience, accessibility, amenities, tags, countries, difficulty, cost type
  • Media Management β€” Images, audio guides, PDF attachments with reordering
  • Media β€” POIs support uploaded photos, audio and PDF attachments with AI-assisted descriptions

πŸ‘€ Creator Ecosystem

A full-stack creator management system:

  • Rich Profiles β€” Bio, tagline, location, theme customization, intro video
  • Social Presence β€” Manage social links, social posts with reordering
  • Skills & Certifications β€” Structured expertise representation
  • Languages β€” Multi-language support with ordering
  • External Links β€” Portfolio and affiliate link management
  • Creator Tools Visibility β€” Granular control over which tools appear on public profiles
  • Contact Management β€” Contact form with read/unread tracking and statistics
  • Earnings & Payouts β€” Real-time earnings summaries, payout history, Stripe Connect dashboard

πŸ“š Content Monetization

Content Type Features Monetization
Blog Posts Rich content, cover images, SEO-friendly slugs Public / Gated
Podcast Episodes Audio uploads, cover art, settings management Free / Premium
Masterclasses Full course content, purchase gating, premium locking One-time purchase
Consultations Calendar availability, time slots, booking, cancellation policies Per-session pricing

πŸ›’ Commerce Engine

A complete e-commerce infrastructure:

  • Shopping Cart β€” Full CRUD with guest session support (X-Session-ID)
  • Guest-to-User Cart Merging β€” Seamless conversion on login
  • Orders β€” Full lifecycle: pending β†’ processing β†’ completed β†’ cancelled β†’ refunded
  • Digital Downloads β€” Secure download links for purchased products
  • Invoicing β€” Professional invoice generation with send/download, paid/received views
  • Payment Processing β€” Stripe Payment Intents with confirmation flow
  • Platform Fees β€” Automated fee calculation with influencer payout amounts

🎬 Digital Media Marketplace

  • Asset Types β€” Video, Photo, Preset, Audio, Template, Other
  • Purchase Flow β€” Individual asset purchases with download management
  • My Purchases β€” Centralized library of all purchased digital goods

πŸ€– AI Integration

  • AI Chat β€” Google Vertex AI-powered conversational interface
  • Translation β€” AI-powered English translation endpoint

πŸ›‘οΈ Admin Platform

  • User Management β€” CRUD, verification, password management
  • Platform Analytics β€” Earnings summaries, activity logs, platform-wide stats

πŸ“‹ API Overview

Category Endpoints Description
Authentication POST /register, POST /login, POST /logout, POST /forgot-password, POST /reset-password Full auth lifecycle
Profile GET/PUT /profile, avatar/cover upload, preferences, account management, password change User self-service
Maps CRUD, thumbnail, URL parsing, purchase access Map lifecycle
POIs CRUD with drafts, media, audio, PDF, batch operations, filter metadata Rich geographic content
Influencers Public profiles, blog, podcast, masterclasses, consultations, maps, media assets, social posts Public creator discovery
Creator Tools Socials, posts, languages, skills, certifications, external links, blog, podcast, masterclasses, consultations, media assets, payouts, earnings Creator dashboard
Consultations Booking, availability, time slots, calendar, cancellation policies, payment sessions Scheduling engine
Commerce Cart (with guest support), orders, payments, invoices, digital downloads Full commerce stack
Media Assets Marketplace CRUD, purchases, downloads Digital goods marketplace
Stripe Connect Onboarding, status, dashboard link, account management Payment infrastructure
Admin Users, stats, activity, platform earnings Platform administration
AI Chat, translation AI-powered features
Webhooks Stripe events, video worker callbacks External integrations

🀝 B2B Partner Integration

My3PAI offers a comprehensive set of API endpoints designed for strategic B2B partners β€” travel agencies, tourism boards, content distributors, affiliate networks, enterprise resellers, and SaaS platforms looking to integrate creator commerce into their ecosystem.

Partner Onboarding & Payment Infrastructure

Endpoint Method Description
POST /stripe/connect/onboard POST Initiate Stripe Connect Express onboarding β€” returns a hosted onboarding URL for partners to link their payment accounts
GET /stripe/connect/status GET Retrieve Stripe account status: connection state, charges enabled, payouts enabled, outstanding requirements
GET /stripe/connect/dashboard GET Generate a Stripe-hosted dashboard link for partners to manage payouts, balances, and account details
POST /stripe/connect POST Update or manage the connected Stripe account configuration
POST /webhooks/stripe POST Receive real-time Stripe event notifications (account updates, payout lifecycle, application deauthorization)

Partner Payouts & Financial Reconciliation

Endpoint Method Description
GET /influencer/earnings/summary GET Aggregated earnings with period filtering (all_time, this_month, last_month, this_year) β€” all amounts in USD
GET /influencer/payouts GET Paginated payout history with status filtering (pending, processing, paid, failed)
GET /influencer/payouts/{id} GET Detailed view of a specific payout transaction
GET /invoices/summary GET Invoice summary statistics with date range filtering β€” total paid, total received, status breakdown
GET /invoices GET Full invoice listing with status and type filters (paid/received), date range, and pagination
GET /invoices/{id} GET Single invoice detail with line items and payment information
GET /invoices/{id}/download GET Download invoice as PDF for accounting and record-keeping
POST /invoices/{id}/send POST Send invoice via email to the customer

Platform Analytics (Admin)

Endpoint Method Description
GET /admin/stats GET Platform-wide dashboard statistics: total users, verified users, new registrations, admin counts
GET /admin/platform/earnings GET Platform earnings with filtering by influencer, date range, and status (collected, reversed, pending)
GET /admin/platform/earnings/summary GET Aggregated platform earnings summary for reporting
GET /admin/activity GET Platform activity log for audit and compliance
GET /admin/users GET User management with search, filtering, and pagination
GET /admin/users/{id} GET Detailed user profile for account management
POST /admin/users/{id}/verify POST Verify user accounts β€” essential for partner-managed creator verification

Commerce & Order Management

Endpoint Method Description
GET /orders GET List orders with status and date filtering
GET /orders/sold GET Orders sold by the partner/creator
GET /orders/purchased GET Orders purchased by customers
GET /orders/{id} GET Detailed order view with items, payment, and status
POST /orders/{id}/refund POST Process refunds through Stripe
GET /orders/{id}/download GET Download order-related digital assets

AI-Powered Partner Tools

Endpoint Method Description
POST /ai/chat POST Google Vertex AI Gemini-powered chat β€” enables partners to build AI travel assistants, content generators, and smart recommendation features
POST /ai/translate-to-english POST AI-powered translation to English β€” useful for partners operating in multilingual markets

Integration Scenarios

Travel Agency Partnership

Agency Platform
    β”œβ”€β”€ GET /influencers β†’ Discover creators by location and expertise
    β”œβ”€β”€ GET /influencers/{username}/maps β†’ Browse available travel maps
    β”œβ”€β”€ POST /stripe/connect/onboard β†’ Link payment accounts
    β”œβ”€β”€ GET /influencer/earnings/summary β†’ Track revenue share
    └── POST /ai/chat β†’ Build AI trip planning features

Enterprise Content Distribution

Distribution Platform
    β”œβ”€β”€ GET /influencers/{username}/masterclasses β†’ Access premium courses
    β”œβ”€β”€ GET /influencers/{username}/podcast β†’ Syndicate podcast content
    β”œβ”€β”€ GET /influencers/{username}/media-assets β†’ License digital media
    β”œβ”€β”€ GET /orders/sold β†’ Track content sales
    └── GET /invoices/summary β†’ Financial reconciliation

Tourism Board Integration

Tourism Board
    β”œβ”€β”€ GET /maps/{map} β†’ Access curated destination maps
    β”œβ”€β”€ GET /pois/filters/metadata β†’ Explore POI categories and filters
    β”œβ”€β”€ GET /influencers/{username}/blog β†’ Curate destination blog content
    β”œβ”€β”€ POST /influencer/contact β†’ Direct messaging with creators
    └── GET /admin/platform/earnings β†’ Track regional economic impact

πŸ” Authentication

The API uses Laravel Sanctum token-based authentication:

Authorization: Bearer <your-token>

Guest users can access cart endpoints via session-based identification:

X-Session-ID: <your-session-id>

⚑ Rate Limiting

Endpoint Group Limit
Authentication 5 req/min per IP
Public Maps 60 req/min per IP
Rate Limit Exceeded HTTP 429

πŸ“ Repository Structure

openapi/
β”œβ”€β”€ openapi.yaml                    # Root OpenAPI specification
β”œβ”€β”€ components/
β”‚   └── schemas/                    # Reusable data models (90+ schemas)
β”‚       β”œβ”€β”€ User.yaml               # User model with preferences
β”‚       β”œβ”€β”€ PoiResource.yaml        # Full POI resource with completeness scoring
β”‚       β”œβ”€β”€ MapResource.yaml        # Map model with pricing and access control
β”‚       β”œβ”€β”€ InfluencerProfile.yaml  # Rich creator profile
β”‚       β”œβ”€β”€ Consultation.yaml       # Consultation with working hours
β”‚       β”œβ”€β”€ MasterclassFull.yaml    # Premium course content
β”‚       β”œβ”€β”€ Invoice.yaml            # Full invoicing with platform fees
β”‚       β”œβ”€β”€ Order.yaml              # Order lifecycle management
β”‚       β”œβ”€β”€ MediaAsset.yaml         # Digital media marketplace
β”‚       β”œβ”€β”€ Cart.yaml               # Shopping cart
β”‚       └── ...                     # 80+ additional schemas
└── paths/                          # Path definitions (150+ endpoints)
    β”œβ”€β”€ health.yaml
    β”œβ”€β”€ register.yaml
    β”œβ”€β”€ login.yaml
    β”œβ”€β”€ maps.yaml
    β”œβ”€β”€ influencers.yaml
    β”œβ”€β”€ cart.yaml
    β”œβ”€β”€ orders.yaml
    β”œβ”€β”€ invoices.yaml
    β”œβ”€β”€ admin_stats.yaml
    β”œβ”€β”€ ai_chat.yaml
    └── ...                         # 140+ additional path files

πŸ› οΈ Getting Started

Prerequisites

  • An API client (Postman, Insomnia, cURL, or any HTTP client)
  • A My3PAI account (for authenticated endpoints)

Base URLs

Environment URL
Local Development http://localhost:8000/api
Production https://api.my3pai.com/api

Quick Start

# Register a new account
curl -X POST https://api.my3pai.com/api/register \
  -H "Content-Type: application/json" \
  -d '{"name": "Travel Creator", "email": "creator@example.com", "password": "securepass123", "password_confirmation": "securepass123"}'

# Login to get your token
curl -X POST https://api.my3pai.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"email": "creator@example.com", "password": "securepass123"}'

# Use your token for authenticated requests
curl https://api.my3pai.com/api/me \
  -H "Authorization: Bearer <your-token>"

API Client Setup

Import the OpenAPI specification into your preferred API client:

  • Postman: File β†’ Import β†’ Select openapi.yaml
  • Insomnia: Create β†’ Import β†’ Select openapi.yaml
  • Swagger UI: Point to the raw openapi.yaml URL

πŸ’Ό Business Model & Monetization

My3PAI generates revenue through multiple streams:

Revenue Stream Description
Platform Fees Percentage fee on every transaction (orders, consultations, media sales)
Premium Map Sales Commission on paid map purchases
Digital Media Marketplace Transaction fees on preset, template, and asset sales
Consultation Bookings Service fee on booked consultations
Masterclass Sales Revenue share on premium course content
Creator Subscriptions (future) Tiered creator plans with enhanced features

Platform Economics

Customer Payment ($100)
    β”œβ”€β”€ Platform Fee (variable %)
    β”œβ”€β”€ Payment Processing (Stripe fee)
    └── Creator Payout (remainder)

πŸ”’ Security & Compliance

  • Token-based Authentication β€” Laravel Sanctum with secure token management
  • Stripe Connect β€” PCI-compliant payment processing, no sensitive card data stored
  • Rate Limiting β€” Protection against abuse and DDoS
  • Input Validation β€” Comprehensive schema validation on all endpoints
  • Optimistic Locking β€” Prevents data corruption from concurrent edits
  • Environment Separation β€” Distinct local and production configurations

🀝 Contributing

We welcome contributions from the community! Whether you're a developer, travel creator, or API enthusiast, here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow OpenAPI 3.0.3 specification standards
  • Maintain backward compatibility for existing endpoints
  • Add comprehensive schema definitions for new models
  • Include meaningful descriptions and examples
  • Keep path files modular and focused

πŸ“„ License

This project is licensed under a Proprietary License β€” see the LICENSE file for details.


πŸ“¬ Contact & Support

Channel Details
API Support api-support@my3pai.com
Website https://my3pai.com
GitHub Issues Report a bug

Built for creators. Powered by technology. Ready for the world.

Β© 2025 My3PAI. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages