Welcome to the MOGU Public API documentation. This API allows you to programmatically manage trips and catalogs for your travel business.
All API endpoints require authentication using API Keys.
Include your API Key in the Authorization header of every request:
Authorization: Bearer YOUR_API_KEY- Production:
https://trips.api.moguplatform.com
To access the API, you'll need to generate an API Key from your MOGU account:
- Log in to your MOGU account
- Navigate to the Integrations tab in your account settings
- Generate a new API Key
The API Key will start with ak_ and will include the necessary permissions based on your account role.
Learn how to generate an API Key: For step-by-step instructions, see our How to generate an API Key guide.
Here's a simple example to list your trips:
curl -X GET https://trips.api.moguplatform.com/trips \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Trips are the main entities in the MOGU platform. A trip represents a travel itinerary with all its details, configurations, and associated travelers.
Key operations:
- Create and manage trips
- Configure trip settings and branding
- Manage trip visibility (public/private)
- Track trip visualizations
Catalogs are collections of trips that can be organized and shared. They allow you to group related trips for easier management and presentation.
Key operations:
- Create and organize catalogs
- Add/remove trips from catalogs
- Make catalogs publicly accessible
- Filter and search catalog trips
List endpoints support pagination to handle large datasets efficiently:
GET /trips?page=1&pageSize=20Parameters:
page: Page number (starts at 1)pageSize: Number of items per page (default: 20, max: 100)
Response format:
{
"data": [...],
"page": 1,
"pageSize": 20,
"totalCount": 150,
"totalPages": 8
}Apply filters to narrow down results using JSON syntax:
GET /trips?filters=[{"field":"duration","operator":"gte","value":5}]Supported operators:
eq: Equal toneq: Not equal togt: Greater thangte: Greater than or equal tolt: Less thanlte: Less than or equal toin: In arraycontains: Contains value
Search across multiple fields using JSON syntax:
GET /trips?search={"fields":["title","code"],"term":"Paris"}Sort results by any field:
GET /trips?orderBy={"field":"createdAt","direction":"desc"}Directions:
asc: Ascending orderdesc: Descending order
The API uses standard HTTP status codes to indicate success or failure:
200 OK: Request succeeded201 Created: Resource created successfully
400 Bad Request: Invalid request parameters or body401 Unauthorized: Missing or invalid authentication token403 Forbidden: Insufficient permissions404 Not Found: Resource not found429 Too Many Requests: Rate limit exceeded
500 Internal Server Error: Server-side error503 Service Unavailable: Service temporarily unavailable
{
"errors": {
"title": ["Title is required"],
"duration": ["Duration must be a positive number"]
}
}Need help? We're here for you!
- Email: support@moguplatform.com
- Help Center: https://help.moguplatform.com
By using the MOGU Public API, you agree to our Terms of Service and Privacy Policy.
Ready to get started? Check out our API Reference for detailed endpoint documentation.