API Endpoints & Integration

CruiseAppy provides a set of REST API endpoints to enable integration with external systems, automation tools, and third-party services. These endpoints are secured and require appropriate authentication and permissions based on user roles.

Overview

  • All API endpoints are prefixed with /wp-json/cruiseappy/v1/.
  • Access is controlled by user roles and API keys/tokens.
  • Supports JSON request and response formats.
  • Used for booking management, data synchronization, and automation.

Authentication

  • API Users: Must use API keys or OAuth tokens as configured in the WordPress backend.
  • Role-based Access: Only users with the API User or Admin role can access most endpoints.
  • HTTPS: All API requests should be made over HTTPS for security.

Key Endpoints

Endpoint Method Description Required Role
/bookings GET List all bookings Admin, Agent, API
/bookings POST Create a new booking Agent, API
/bookings/{id} GET Retrieve booking details Admin, Agent, API
/bookings/{id} PUT Update a booking Admin, Agent, API
/bookings/{id} DELETE Delete a booking Admin, API
/customers GET List all customers Admin, Agent, API
/customers POST Create a new customer Agent, API
/customers/{id} GET Retrieve customer details Admin, Agent, API
/customers/{id} PUT Update customer information Admin, Agent, API
/cruises GET List available cruises All roles
/reports/sales GET Retrieve sales reports Admin, Agent, API
/import POST Import data (e.g., cruises, customers) Admin, API
/export GET Export data Admin, API

Example Request

curl -X GET \
    -H "Authorization: Bearer <API_TOKEN>" \
    https://yourdomain.com/wp-json/cruiseappy/v1/bookings

Integration Notes

  • API responses include standard HTTP status codes and error messages.
  • Rate limiting and logging are enforced for security and auditing.
  • For advanced integrations, webhooks and custom endpoints can be configured via plugin extensions.

See Also