Documents

Alex Reservations - Get Booking Status API

REST API endpoint for retrieving the current status of a reservation created via the external bookings API.

Base URL: https://your-domain.com/wp-json/alexr/v1


Authentication

All requests must include a valid API key. Two methods are supported:

X-API-Key: your-api-key-here

Option 2: Authorization Bearer header

Authorization: Bearer your-api-key-here

Authentication errors

HTTP Code Error Code Description
401 rest_missing_api_key No API key provided in the request headers
401 rest_invalid_api_key The API key does not exist or has been deactivated

Endpoint

Get Booking Status

GET /wp-json/alexr/v1/bookings/{uuid}/status

Retrieves the current status of a booking. The booking must belong to the restaurant associated with the API key used.

Parameters

Parameter Location Required Description
uuid URL path Yes The booking UUID returned when the booking was created

Example request

curl -X GET https://your-domain.com/wp-json/alexr/v1/bookings/bo_a1b2c3d4-e5f6-7890-abcd-ef1234567890/status \
  -H "X-API-Key: a1b2c3d4e5f6..."

Successful response

HTTP 200 OK

{
  "success": true,
  "booking_id": 456,
  "uuid": "bo_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "booked",
  "platform": "TheFork",
  "platform_booking_id": "TF-123456"
}

Response fields

Field Type Description
success boolean Always true on a successful response
booking_id integer Internal numeric ID of the booking
uuid string Unique identifier of the booking
status string Current booking status. Possible values: pending, booked, cancelled, no_show, seated, completed
platform string Source platform the booking was created from (e.g. "TheFork", "OpenTable", "API")
platform_booking_id string | null External booking ID from the source platform, if provided at creation time

Error responses

HTTP 404 Not Found - Booking not found or does not belong to the API key's restaurant

{
  "success": false,
  "error": "Booking not found"
}

HTTP 401 Unauthorized - Missing or invalid API key

{
  "code": "rest_missing_api_key",
  "message": "API key is required. Send it via X-API-Key header or Authorization: Bearer <key>.",
  "data": { "status": 401 }
}

How it works

Restaurant scoping

The endpoint only returns bookings that belong to the restaurant associated with the API key used in the request. Attempting to retrieve a booking from a different restaurant will return a 404 Not Found error, even if the UUID is valid.

Booking status values

The status field reflects the current state of the booking as managed within Alex Reservations:

Status Description
pending Booking is awaiting confirmation
booked Booking is confirmed
cancelled Booking has been cancelled
no_show Guest did not show up
seated Guest is currently seated
completed Visit has been completed

Note that status transitions are managed from the Alex Reservations dashboard. External platforms can use this endpoint to poll for status changes (e.g. to detect when a restaurant confirms or cancels a reservation).


Use cases

  • Polling for confirmation: After creating a booking with status: "pending", poll this endpoint to detect when the restaurant confirms it (status changes to "booked")
  • Cancellation verification: After calling the Cancel Booking endpoint, use this endpoint to confirm the status has updated to "cancelled"
  • Sync checks: Periodically verify that a booking's status in Alex Reservations matches the status in your external platform

Response codes summary

HTTP Code Meaning
200 Booking found. Returns current status and platform data
401 Authentication error (missing or invalid API key)
404 Booking not found or does not belong to this restaurant