-
Release 0.10.0
StableAll checks were successfulCreate Release Package / build-release (push) Successful in 1m10sreleased this
2026-02-03 20:24:50 +00:00 | 13 commits to main since this releaseAdded
- REST API Infrastructure:
- New
src/Api/directory with complete REST API implementation ResponseFormatter.php- Standardized response formatting (success, collection, error responses)RateLimiter.php- Transient-based rate limiting with tiered limitsControllers/AbstractController.php- Base controller with common functionalityRestApi.php- Main registration class with namespacewp-bnb/v1
- New
- Buildings API:
GET /wp-bnb/v1/buildings- List buildings with pagination and searchGET /wp-bnb/v1/buildings/{id}- Get single building with address, contact, detailsGET /wp-bnb/v1/buildings/{id}/rooms- Get rooms in a building with status filter
- Rooms API:
GET /wp-bnb/v1/rooms- List rooms with filters (building, room_type, amenities, capacity, status)GET /wp-bnb/v1/rooms/{id}- Get room details with gallery, pricing, amenitiesGET /wp-bnb/v1/rooms/{id}/availability- Check availability with price calculationGET /wp-bnb/v1/rooms/{id}/calendar- Get monthly calendar dataPOST /wp-bnb/v1/availability/search- Search available rooms by date range and criteria
- Bookings API:
POST /wp-bnb/v1/bookings- Create booking (public, creates pending status)GET /wp-bnb/v1/bookings- List bookings with filters (admin)GET /wp-bnb/v1/bookings/{id}- Get booking details (admin)PATCH /wp-bnb/v1/bookings/{id}- Update booking (admin)DELETE /wp-bnb/v1/bookings/{id}- Cancel booking (admin)POST /wp-bnb/v1/bookings/{id}/confirm- Confirm pending booking (admin)POST /wp-bnb/v1/bookings/{id}/check-in- Check in guest (admin)POST /wp-bnb/v1/bookings/{id}/check-out- Check out guest (admin)
- Guests API (admin only):
GET /wp-bnb/v1/guests- List guests with paginationGET /wp-bnb/v1/guests/{id}- Get guest details (excludes encrypted ID numbers)GET /wp-bnb/v1/guests/search- Search guests by name/emailGET /wp-bnb/v1/guests/{id}/bookings- Get guest's booking history
- Services API:
GET /wp-bnb/v1/services- List active services with categoriesGET /wp-bnb/v1/services/{id}- Get service details with pricing infoPOST /wp-bnb/v1/services/{id}/calculate- Calculate service price for booking
- Pricing API:
POST /wp-bnb/v1/pricing/calculate- Full price calculation with servicesGET /wp-bnb/v1/pricing/seasons- Get configured seasons and pricing modifiers
- API Settings tab in plugin settings:
- Enable/disable REST API toggle
- Enable/disable rate limiting toggle
- Endpoint documentation table
- Authentication instructions
Changed
- Plugin.php updated to initialize REST API on
rest_api_inithook - Settings page now has seven tabs: General, Pricing, License, Updates, Metrics, API
- README.md updated with comprehensive REST API documentation
Security
- Rate limiting: public (60/min), availability (30/min), booking (10/min), admin (120/min)
- Admin endpoints require
edit_postscapability - Supports WordPress Application Passwords for external API access
- Client identification by user ID (authenticated) or IP address (anonymous)
- Proxy/Cloudflare IP detection via X-Forwarded-For and CF-Connecting-IP headers
Downloads
- REST API Infrastructure: