Introduction
The Kin Conecta API is a RESTful API built with Spring Boot that powers the social network platform connecting tourists with local guides. The API provides endpoints for user management, tour operations, bookings, reviews, matching algorithms, and real-time messaging.Base URL
All API requests should be made to:The production base URL will differ from the development URL. Update this configuration in your application properties.
API Versioning
The API uses path-based versioning with the/api/ prefix for most endpoints. Some legacy endpoints use the /kinconecta/api/ prefix.
Standard endpoints:
Request Format
All requests should use JSON format with the appropriateContent-Type header:
Example Request
Response Format
All API responses use JSON format. Successful responses return the requested data with appropriate HTTP status codes.Success Response
Error Response
HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
200 OK | Successful GET, PUT requests |
201 Created | Successful POST request creating a new resource |
204 No Content | Successful DELETE request or operation with no response body |
400 Bad Request | Invalid request format or parameters |
404 Not Found | Requested resource does not exist |
500 Internal Server Error | Server error occurred |
Core API Resources
The Kin Conecta API is organized around the following core resources:Users & Authentication
Users
User registration, authentication, and profile management
POST /kinconecta/api/user/login- User authenticationPOST /kinconecta/api/user- Create new userGET /kinconecta/api/user- List all usersGET /kinconecta/api/user/{fullName}_{userId}- Get user by IDPUT /kinconecta/api/user/{fullName}_{userId}- Update userDELETE /kinconecta/api/user/{fullName}_{userId}- Delete user
Tours
Tours
Tour creation, management, and booking operations
GET /api/tours- List all toursGET /api/tours/{tourId}- Get tour detailsPOST /api/tours- Create new tourPUT /api/tours/{tourId}- Update tourDELETE /api/tours/{tourId}- Delete tourPOST /api/tours/{tourId}-add-destination- Add destination to tour
Bookings
Endpoints:GET /kinconecta/api/tours/trip-booking- List all bookingsGET /kinconecta/api/tours/trip-booking/{tripId}- Get booking detailsPOST /kinconecta/api/tours/trip-booking- Create new bookingPUT /kinconecta/api/tours/trip-booking/{tripId}- Update bookingDELETE /kinconecta/api/tours/trip-booking/{tripId}- Cancel booking
Guide Profiles
Guide Profiles
Guide profile management, certifications, and availability
GET /api/guide_profiles- List all guide profilesGET /api/guide_profiles/{id}- Get guide profilePOST /api/guide_profiles- Create guide profilePUT /api/guide_profiles/{id}- Update guide profileDELETE /api/guide_profiles/{id}- Delete guide profile
Tourist Profiles
Endpoints:GET /api/tourists/{userId}- Get tourist profilePATCH /api/tourists/{userId}- Update tourist profileGET /api/tourists/{touristId}/favorites- Get favorite guidesPOST /api/tourists/{touristId}/favorites/{guideId}- Add favorite guideDELETE /api/tourists/{touristId}/favorites/{guideId}- Remove favorite guide
Reviews
Endpoints:GET /api/reviews- List all reviewsGET /api/reviews/{id}- Get review detailsPOST /api/reviews- Create reviewPUT /api/reviews/{id}- Update reviewDELETE /api/reviews/{id}- Delete review
Matching
Matching Algorithm
AI-powered matching between tourists and guides
GET /api/matching/tourist/{touristUserId}/guides- Get recommended guides for touristGET /api/matching/guide/{guideUserId}/tourists- Get recommended tourists for guide
Pagination
Some endpoints support pagination using query parameters:Maximum number of results to return
Number of results to skip
Example
CORS Configuration
The API is configured to accept requests from any origin with the following methods:GETPOSTPUTDELETEOPTIONS
Data Types
Common Field Types
Unique identifier (auto-generated)
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
User Roles
Account Status
Language Codes
Rate Limiting
Rate limiting is not currently implemented but should be added before production deployment.
- Authentication endpoints: 5 requests per minute per IP
- Read operations: 100 requests per minute per user
- Write operations: 30 requests per minute per user
Error Handling
The API follows Spring Boot’s standard error response format:ISO 8601 timestamp when the error occurred
HTTP status code
Error type description
Detailed error message
API endpoint path where the error occurred
Database Configuration
The API connects to MySQL database:Next Steps
Authentication
Learn how to authenticate users and manage sessions
Tours API
Explore tour creation and management endpoints
Matching Algorithm
Understand the guide-tourist matching system
WebSocket Support
Real-time messaging implementation