API Client
API functions for cases where you need lower-level control than hooks provide.
Bookables
import { fetchBookables, createBookable, updateBookable, deleteBookable,} from '@wpappointments/data';
// Listconst { data, totalItems } = await fetchBookables({ type: 'court', page: 1 });
// Createconst court = await createBookable({ type: 'court', title: 'Court 1', meta: { surface: 'hard', indoor: true },});
// Updateawait updateBookable(court.id, { title: 'Court 1 (Renovated)' });
// Deleteawait deleteBookable(court.id);Variants
import { fetchVariants, fetchVariantAvailability } from '@wpappointments/data';
const variants = await fetchVariants(entityId);const availability = await fetchVariantAvailability(variantId, { startDate: '2026-03-21', endDate: '2026-03-28',});Bookable Types
import { fetchBookableTypes } from '@wpappointments/data';
const types = await fetchBookableTypes();// [{ slug: 'service', label: 'Service' }, { slug: 'court', label: 'Court' }]