Kip API

Welcome to the Kip API documentation. This page provides information about all available endpoints, their parameters, and requirements.

API Base URL: https://api.kiphideaways.com/api
GET /api/search/{index}

Description

Perform an Elasticsearch query against a specific index. Supports both GET and POST methods.

Rate Limit: 30 requests per minute

URL Parameters

Parameter Type Required Description
index string Yes Elasticsearch index name (must be in allowed list)

Query Parameters

Parameter Type Required Description
q JSON string Yes Elasticsearch query body as JSON string. Can include pit for point-in-time queries.

Example Request

GET Request
GET https://api.kiphideaways.com/api/search/hideaways?q={"query":{"match_all":{}}}
POST /api/search/{index}

Description

Same as GET endpoint but accepts query in request body. Use this for complex queries.

Rate Limit: 30 requests per minute
GET /api/typeahead

Description

Search for hideaways with typeahead/autocomplete functionality. Returns formatted results with location suggestions.

Rate Limit: 30 requests per minute

Query Parameters

Parameter Type Required Description
q string Yes Search query (2-100 characters)
page integer Optional Page number (default: 1, min: 1)
per_page integer Optional Results per page (default: 10, min: 1, max: 25)

Example Request

GET Request
GET https://api.kiphideaways.com/api/typeahead?q=perth&page=1&per_page=10
GET /api/elastic/pit/make

Description

Create a Point-In-Time (PIT) context for Elasticsearch queries to ensure consistent results across pagination.

Rate Limit: 30 requests per minute

Query Parameters

Parameter Type Required Description
index string Yes Elasticsearch index name (must be in allowed list)
keep_alive_minutes integer Optional PIT keep-alive time in minutes (default: 5, min: 1, max: 30)
POST /api/elastic/pit/close

Description

Close a Point-In-Time (PIT) context to free up resources.

Rate Limit: 30 requests per minute

Request Body Parameters

Parameter Type Required Description
id string Yes PIT ID to close (100-250 characters)
GET /api/property-availability/search

Description

Search for property availability based on various criteria including dates, persons, price, and Supercontrol ID.

Rate Limit: 15 requests per minute

Query Parameters

Parameter Type Required Description
start_date date Optional Exact start date match (YYYY-MM-DD). Must be before or equal to end_date.
end_date date Optional Exact end date match (YYYY-MM-DD). Must be after or equal to start_date.
start_date_between date Optional Start date greater than or equal to (for range queries). Must be before or equal to end_date_between.
end_date_between date Optional End date less than or equal to (for range queries). Must be after or equal to start_date_between.
persons integer Optional Exact number of persons (min: 1)
price numeric Optional Maximum price filter (less than or equal to, min: 0)
supercontrol_id string Optional Exact Supercontrol property ID
exclude_gap_filled boolean Optional Exclude gap-filled records (default: false)
per_page integer Optional Results per page (default: 15, -1 for all results)
page integer Optional Page number (default: 1, min: 1)

Example Request

GET Request
GET https://api.kiphideaways.com/api/property-availability/search?start_date_between=2024-06-01&end_date_between=2024-06-30&persons=4&per_page=20
GET /api/property-availability/occupancy

Description

Get all unique occupancy (persons) options for a property or all properties.

Rate Limit: 15 requests per minute

Query Parameters

Parameter Type Required Description
supercontrol_id string Optional Filter by Supercontrol property ID
POST /api/bookings/user

Description

Get user bookings by email address. Returns paginated list of bookings with status filtering.

Rate Limit: 15 requests per minute Requires API Key Authentication

Authentication

This endpoint requires API key authentication. Provide the key via:

  • HTTP Header: X-API-Key: your-api-key (Recommended)
  • Request Body: api_key: your-api-key

Request Body Parameters

Parameter Type Required Description
email string Yes User email address (valid email format, max: 255 characters)
page integer Optional Page number (default: 1, min: 1)
per_page integer Optional Results per page (default: 10, min: 1, max: 50)
status string Optional Filter by status: CANCELLED, CONFIRMED, or PROVISIONAL
status_not_in string Optional Exclude status: CANCELLED, CONFIRMED, or PROVISIONAL
api_key string Optional* API key (if not provided in header)

* API key is required either in header or body

Example Request

POST Request with Header
POST https://api.kiphideaways.com/api/bookings/user
Headers:
Content-Type: application/json
X-API-Key: your-api-key
Body:
{
"email": "user@example.com",
"page": 1,
"per_page": 10
}
Note: The API key is configured in config/app.php via the BOOKINGS_API_KEY environment variable.
POST /api/index/run

Description

Remote Artisan command execution from WordPress plugin. Triggers background jobs for indexing hideaways, availability, and bookings.

Requires Client Token & IP Whitelist

Authentication

This endpoint requires:

  • Client token with index scope
  • IP address must be in the allowed whitelist

Request Body Parameters

Parameter Type Required Description
action string Yes Action to perform: reindex or availability
post_id integer Conditional WordPress post ID (required if action is single property reindex)
skip_last_update_checks boolean Optional Skip last update checks (only used when post_id is empty)
Note: This endpoint is primarily for internal use by the WordPress plugin. IP addresses must be whitelisted in the configuration.
POST /api/frontend-error

Description

Log frontend errors from client applications.

Request Body Parameters

Parameter Type Required Description
error string Yes Error message (max: 255 characters)
bag JSON string Yes Additional error context as JSON string
Note: Frontend error logging must be enabled in configuration (log_frontend_errors).
GET /api/frontend-error

Description

Retrieve logged frontend errors. Requires authentication key.

Query Parameters

Parameter Type Required Description
key string Yes Authentication key (must match frontend_error_logger_key config)
from date Optional Filter errors from this date
to date Optional Filter errors until this date
GET /api/user

Description

Get the authenticated user information.

Requires Sanctum Authentication
Note: This endpoint requires authentication. Use Bearer token in Authorization header.