REST API · v1

Build booking experiences your users deserve.

The Calplexity API gives you full programmatic control over tours, events, resources, availability, and bookings. Multi-tenant, JSON, and thoroughly documented — so you can go from idea to live in an afternoon.

Quick start

1 · Authenticate and get your org

curl -X POST https://calplexity.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"••••••"}'

# Response includes a session cookie.
# Your orgId is in: response.organizations[0].id

2 · Fetch live availability for a tour

curl "https://calplexity.com/api/tours/TOUR_ID/availability\
?from=2026-07-01&to=2026-07-31"

# Returns slots[] — each with startsAt, endsAt,
# remaining seats, and status.
# Resource availability is already intersected.

What you can build

Multi-tenant from day one

Every resource is scoped to an organization. One API key, multiple orgs. Perfect for building white-label booking experiences or marketplaces.

Availability intelligence

The engine intersects tour schedules, resource weekly windows, and ad-hoc blocks to return only genuinely bookable slots. You never have to implement conflict detection.

Full booking lifecycle

From PENDING → AWAITING_APPROVAL → CONFIRMED → REFUNDED. Webhooks coming Q3. State machine handles group discounts, pre-order thresholds, and private requests.

Resource scheduling

Model buses, vans, tour guides, and partner contacts as resources. Assign them to tours and events. The platform surfaces only slots where every required resource is free.

Embeddable calendars

Any calendar can be embedded with a single script tag. The embed endpoint returns live events, availability, and booking forms — styled to match your brand.

Community submissions

Let partners and contributors draft events. Your staff approves in one click. Trusted contributors can auto-publish. Moderation queue is built in.

Common patterns

Copy-paste starting points for the three most common integration paths.

Display available tour slots

  1. 1Authenticate: POST /api/auth/login
  2. 2List tours: GET /api/orgs/:orgId/tours
  3. 3Fetch open slots: GET /api/tours/:tourId/availability
  4. 4Render the calendar with the returned slots array

Accept a booking

  1. 1Customer picks a slot from the availability response
  2. 2POST /api/bookings with tourId, instanceStartsAt, party details
  3. 3Redirect to checkoutUrl if requiresPayment is true
  4. 4Poll GET /api/bookings/:bookingId or listen for webhook

Manage org resources

  1. 1Create a resource: POST /api/orgs/:orgId/resources
  2. 2Set weekly hours: POST /api/orgs/:orgId/resources/:id/availability
  3. 3Block a date: POST /api/orgs/:orgId/resources/:id/blocks
  4. 4Assign to a tour: PATCH /api/orgs/:orgId/tours/:tourId (resourceIds)

Session-cookie auth today, API keys soon.

V1 uses the same session cookies as the dashboard — POST /api/auth/login returns a cookie that all subsequent requests carry. Stateless API-key authentication (Bearer token) is on the Q3 roadmap, and will be a drop-in addition — no endpoint changes.

Role-based access on every route.

Org roles — OWNER › ADMIN › STAFF › TRUSTED_CONTRIBUTOR › CONTRIBUTOR — govern what each key can read and write. Create API keys with the minimum scope your integration needs. Public endpoints (availability, booking) require no auth.

Ready to build?

The full reference covers every endpoint, parameter, and response shape.