Welcome to the YetiRides API! This comprehensive API allows you to manage trekking adventures, blog content, and customer bookings for your adventure tourism business.
graph TB
Client[Client Applications]
API[YetiRides API]
Auth[Authentication Service]
DB[(Database)]
reCAPTCHA[Google reCAPTCHA]
Storage[File Storage]
Email[Email Service]
Client -->|HTTP/HTTPS| API
API -->|Authenticate| Auth
API -->|CRUD Operations| DB
API -->|Bot Protection| reCAPTCHA
API -->|File Operations| Storage
API -->|Notifications| Email
subgraph Backend Services
API
Auth
DB
Storage
Email
end
sequenceDiagram
participant C as Customer
participant A as API
participant R as reCAPTCHA
participant E as Email Service
participant Admin as Admin
C->>A: Submit Booking Request
A->>R: Verify reCAPTCHA Token
R-->>A: Validation Result
alt Valid Token
A->>A: Process Booking
A->>E: Send Email to Admin
A-->>C: Booking Confirmation
E->>Admin: New Booking Notification
else Invalid Token
A-->>C: Error Response
end
flowchart LR
A[Start] --> B{Has Token?}
B -->|Yes| C[Validate Token]
B -->|No| D[Login Required]
C -->|Valid| E[Access Granted]
C -->|Invalid| D
D --> F[Login]
F --> G[Generate Token]
G --> E
flowchart TD
A[Admin] -->|Login| B[Dashboard]
B -->|Manage Treks| C[Trek Management]
B -->|Manage Blogs| D[Blog Management]
B -->|View Bookings| E[Booking Management]
C -->|Add Trek| C1[New Trek Form]
C -->|Edit Trek| C2[Edit Trek Form]
C -->|Delete Trek| C3[Confirm Delete]
D -->|Add Blog| D1[New Blog Form]
D -->|Edit Blog| D2[Edit Blog Form]
D -->|Delete Blog| D3[Confirm Delete]
E -->|New Bookings| E1[Process Bookings]
E -->|Contact Enquiries| E2[Handle Enquiries]
erDiagram
User ||--o{ Booking : makes
User ||--o{ ContactUs : submits
Trek ||--o{ Booking : receives
Blog ||--|| User : created_by
User {
int id
string name
string email
string role
string address
string phone
}
Trek {
int id
string data_type
string title
string location
decimal price
string duration
string difficulty
string type
float distance_km
text description
string featured_image
boolean is_featured
boolean is_active
json trek_days
}
Blog {
int id
string title
text content
string featured_image
boolean is_active
int user_id
}
Booking {
int id
string trek_name
string name
string email
string country
string phone
int adults
int children
string subject
text message
}
Full system access and management
Basic access for customers
sequenceDiagram
participant C as Client
participant M as Middleware
participant A as API Controller
participant D as Database
C->>M: HTTP Request
M->>M: Validate Token
M->>M: Check Permissions
alt Invalid Auth
M-->>C: 401/403 Error
else Valid Auth
M->>A: Forward Request
A->>D: Query Data
D-->>A: Return Data
A-->>C: JSON Response
end
Note over C,D: All responses follow standard format
Login with email and password
Request body:
{
"email": "user@example.com",
"password": "password"
}
Register new user account
Logout current user (requires authentication)
Request password reset
Get current user information (requires authentication)
List all treks with pagination and filtering
Query Parameters:
Example Request:
GET /api/treks?data_type=trek&is_active=true&page=1
Get specific trek details
Create new trek (admin only)
Required fields:
{
"title": "Annapurna Base Camp Trek",
"data_type": "trek",
"location": "Nepal",
"price": 1200.00,
"duration": "14 days",
"difficulty": "Moderate",
"type": "Trekking",
"distance_km": 115.0,
"description": "Amazing trek to ABC...",
"featured_image": "file",
"trek_days": ["Day 1: Arrival...", "Day 2: Trek to..."]
}
Update trek details (admin only)
Delete trek (admin only)
List all blog posts
Get specific blog post details
Create new blog post (admin only)
Required fields:
{
"title": "Best Trekking Destinations",
"content": "Blog content here...",
"featured_image": "file"
}
Update blog post (admin only)
Delete blog post (admin only)
Submit trek booking enquiry (requires reCAPTCHA)
Required fields:
{
"trek_name": "Annapurna Base Camp Trek",
"name": "John Doe",
"email": "john@example.com",
"country": "USA",
"phone": "+1234567890",
"adults": 2,
"children": 1,
"subject": "Booking inquiry",
"message": "I'm interested in...",
"recaptcha_token": "token_from_google"
}
Submit contact form (requires reCAPTCHA)
Pull latest changes from git repository
Pull latest changes from git repository
All public forms are protected with Google reCAPTCHA Enterprise to prevent spam and bot attacks.
Comprehensive role-based access control ensures users can only access appropriate resources.
All API inputs are validated using Laravel's robust validation system.
Secure image upload handling with proper file type validation and storage.
{
"success": true,
"data": {
// Response data
},
"message": "Operation completed successfully"
}
{
"success": false,
"message": "Error description",
"errors": {
// Validation errors (if any)
}
}
Authorization: Bearer YOUR_TOKENYetiRides API Documentation v1.0
Built with Laravel and Swagger/OpenAPI