SSpiderIQ
SSpiderIQ

Docs / api-reference/booking

booking

2 endpoints from the published OpenAPI import.

POST/api/v1/booking/{flow_id}/hold-slot

Reserve a booking slot for 10 minutes

Create a 10-minute hold for (flow_id, slot_start, staff_id).

Concurrency: create_hold() serializes through a per-slot advisory lock, so two simultaneous calls for the same slot resolve deterministically — first wins with 201, second gets 409.

Parameters

NameInTypeRequiredDescription
flow_idpathstringtrue
Try it
Query

Examples

cURL
curl -X POST 'https://spideriq.ai/api/v1/booking/{flow_id}/hold-slot' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "slot_start": "2026-01-01T00:00:00Z",
  "slot_end": "2026-01-01T00:00:00Z",
  "service_id": "00000000-0000-0000-0000-000000000000",
  "staff_id": "00000000-0000-0000-0000-000000000000"
}'
Python
import httpx

resp = httpx.post(
    "https://spideriq.ai/api/v1/booking/{flow_id}/hold-slot",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"slot_start": "2026-01-01T00:00:00Z", "slot_end": "2026-01-01T00:00:00Z", "service_id": "00000000-0000-0000-0000-000000000000", "staff_id": "00000000-0000-0000-0000-000000000000"},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/booking/{flow_id}/hold-slot", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"slot_start": "2026-01-01T00:00:00Z", "slot_end": "2026-01-01T00:00:00Z", "service_id": "00000000-0000-0000-0000-000000000000", "staff_id": "00000000-0000-0000-0000-000000000000"})
});
const data = await resp.json();
console.log(data);
Go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"slot_start": "2026-01-01T00:00:00Z", "slot_end": "2026-01-01T00:00:00Z", "service_id": "00000000-0000-0000-0000-000000000000", "staff_id": "00000000-0000-0000-0000-000000000000"}`)
	req, _ := http.NewRequest("POST", "https://spideriq.ai/api/v1/booking/{flow_id}/hold-slot", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}

Responses

StatusDescription
201Successful Response
409An active hold already exists for this slot.
404Flow not found or inactive.
429IP rate limit exceeded.
422Validation Error
POST/api/v1/booking/holds/{hold_id}/release

Release a slot hold (internal)

Idempotent release. Called from the P3.3 public submit endpoint after a successful Cal.com booking-create — returning the slot to availability immediately instead of waiting for the 10-minute TTL or the cleanup cron.

Parameters

NameInTypeRequiredDescription
hold_idpathstringtrue
Try it
Query

Examples

cURL
curl -X POST 'https://spideriq.ai/api/v1/booking/holds/{hold_id}/release' \
  -H 'Authorization: Bearer <token>'
Python
import httpx

resp = httpx.post(
    "https://spideriq.ai/api/v1/booking/holds/{hold_id}/release",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/booking/holds/{hold_id}/release", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
Go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://spideriq.ai/api/v1/booking/holds/{hold_id}/release", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}

Responses

StatusDescription
200Successful Response
404Hold not found.
422Validation Error