Developer Platform & API Reference
Welcome to the SetSoon API reference. The platform is architected API-first: anything possible in the operational dashboard can be executed directly via REST endpoints, webhooks, and embeds.
Authentication
Authenticate requests by providing your API secret key in the Authorization header:
Copy
Authorization: Bearer sk_live_your_secret_key_here
1. Query Availability
POST /api/v1/availability/query
Calculates real-time bookable slots factoring in service duration, multi-resource constraints, buffers, and active temporary holds.
Copy
curl -X POST https://setsoon.odextra.com/api/v1/availability/query \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"service_id": "svc_strategy",
"start_date": "2026-09-24",
"end_date": "2026-09-25"
}'
2. Explainable Availability Inspector
POST /api/v1/availability/inspect
Inspects a specific time slot and breaks down evaluation results across staff, room, equipment, capacity, and enterprise policies.
Copy
curl -X POST https://setsoon.odextra.com/api/v1/availability/inspect \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"service_id": "svc_strategy",
"start_time": "2026-09-24 10:00:00"
}'
3. Booking Simulator
POST /api/v1/availability/simulate
Simulates changes to buffer times and staff capacity, reporting projected monthly slots and percentage capacity increase.
Copy
curl -X POST https://setsoon.odextra.com/api/v1/availability/simulate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"proposed_buffer_minutes": 15,
"add_staff_count": 1
}'
4. Temporary Holds
POST /api/v1/holds
Atomically holds a slot for 7 minutes to prevent race conditions during checkout.
Copy
curl -X POST https://setsoon.odextra.com/api/v1/holds \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"start_time": "2026-09-24 14:00:00",
"end_time": "2026-09-24 15:00:00",
"duration_minutes": 7
}'
5. Create Booking
POST /api/v1/bookings
Confirms an appointment transactionally, assigns resources, logs revenue, and dispatches domain events.
Copy
curl -X POST https://setsoon.odextra.com/api/v1/bookings \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: idemp_9381048" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"start_time": "2026-09-24 14:00:00",
"customer": {
"name": "Alex Rivera",
"email": "alex@company.com"
}
}'
6. Universal JavaScript Embed Widget
Embed seamless booking flows inside external websites with one script tag:
Copy
<!-- Inline Embed -->
<script src="https://setsoon.odextra.com/embed.js"></script>
<div data-setsoon-embed="demo"></div>
<!-- Modal Button Popup -->
<button onclick="SetSoon.openModal({ slug: 'demo' })">Book Now</button>