Skip to content

Management ​

Staff-facing endpoints for managing a business. All require authentication (JWT or API key with write/admin scopes).

Business Info ​

GET /v1/manage/business ​

Returns the current business's basic info.

json
{
  "id": "uuid",
  "name": "Demo Salon",
  "slug": "demo-salon"
}

GET /v1/manage/restaurant ​

Same as /v1/manage/business. Kept for backwards compatibility — this endpoint is deprecated and may be removed in a future version. Use /v1/manage/business instead.

Subscription ​

GET /v1/manage/subscription ​

Current plan, trial status, and resource usage.

json
{
  "subscription_status": "trial",
  "subscription_plan_id": "trial",
  "trial_ends_at": "2026-06-07T12:00:00Z",
  "trial_days_remaining": 29,
  "resource_count": 2,
  "deposits_enabled": false
}

deposits_enabled is true when the business has completed Stripe Connect onboarding.

Staff Availability ​

GET /v1/manage/availability ​

Returns real-time slot availability for a given date and party size. Same logic as the public availability endpoint, but requires authentication.

ParamTypeRequiredDescription
booking_datedateYesDate to check (YYYY-MM-DD)
capacityintYesParty size (1–50)

Response:

json
{
  "slots": [
    {"time": "10:00", "available": true},
    {"time": "10:30", "available": true},
    {"time": "11:00", "available": false}
  ]
}

available is true when at least one resource can accommodate the requested capacity at that time. Uses the business's operating hours, slot interval, and existing bookings to calculate availability.

Resources ​

GET /v1/manage/resources ​

List all resources for the current business. Cursor-paginated.

json
{
  "items": [
    {
      "id": "uuid",
      "name": "Maria",
      "resource_type": "staff",
      "capacity_min": 1,
      "capacity_max": 1,
      "section": "Main Floor",
      "display_order": 1,
      "is_active": true
    },
    {
      "id": "uuid",
      "name": "Room A",
      "resource_type": "room",
      "capacity_min": 1,
      "capacity_max": 3,
      "section": null,
      "display_order": 2,
      "is_active": true
    }
  ],
  "next_cursor": null,
  "has_more": false
}

POST /v1/manage/resources ​

Create a resource.

json
{
  "name": "New Stylist",
  "capacity_min": 1,
  "capacity_max": 1,
  "section": "Main Floor",
  "display_order": 3
}
FieldTypeRequiredDescription
namestringYesResource name
capacity_minintYesMinimum capacity
capacity_maxintYesMaximum capacity
sectionstringNoGrouping label (e.g. "Main Floor")
display_orderintNoSort order. Auto-assigned to last+1 if omitted

capacity_min must not exceed capacity_max.

PATCH /v1/manage/resources/{resource_id} ​

Update a resource. All fields optional — only send what changed.

json
{
  "name": "Maria K.",
  "capacity_max": 2,
  "section": "VIP Room",
  "is_active": false
}
FieldTypeDescription
namestringNew display name
capacity_minintMin capacity
capacity_maxintMax capacity
sectionstringSection label
display_orderintSort order
is_activeboolSoft disable (hides from availability)

Setting is_active: false hides the resource from availability without deleting it.

DELETE /v1/manage/resources/{resource_id} ​

Hard-delete a resource. Returns 204 No Content.

Guard: Returns 409 Conflict if the resource has upcoming active bookings (non-cancelled, future-dated). Cancel those bookings first.

Settings ​

GET /v1/manage/settings ​

Get current booking settings for the business.

json
{
  "default_slot_interval_minutes": 60,
  "default_slot_duration_minutes": 90,
  "booking_window_days": 90,
  "min_notice_hours": 2,
  "max_capacity": 10,
  "min_capacity": 1,
  "auto_confirm_bookings": true,
  "default_deposit_amount_cents": 20
}

PATCH /v1/manage/settings ​

Update settings. All fields are optional — only send what changed.

bash
curl -X PATCH https://api.availengine.com/v1/manage/settings \
  -H "Authorization: Bearer avail_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "default_slot_interval_minutes": 30,
    "default_deposit_amount_cents": 10,
    "auto_confirm_bookings": false
  }'
FieldTypeRangeDescription
default_slot_interval_minutesint15–120Gap between available time slots
default_slot_duration_minutesint15–360How long a booking takes
booking_window_daysint1–365How far into the future bookings are accepted
min_notice_hoursint0–168Minimum notice before a booking start time
max_capacityint1–50Maximum party size
min_capacityint1–20Minimum party size
auto_confirm_bookingsbool—Auto-confirm bookings from the public widget
default_deposit_amount_centsint5–500Deposit amount in EUR cents (e.g. 20 = €0.20)

Operating Hours ​

GET /v1/manage/hours ​

Returns operating hours for all 7 days (0=Sunday, 6=Saturday).

PUT /v1/manage/hours ​

Replace all 7 days at once. Send a bare array of 7 day entries.

json
[
  {"day_of_week": 0, "is_open": false},
  {"day_of_week": 1, "is_open": true, "open_time": "09:00", "close_time": "17:00", "last_booking_time": "16:00"},
  {"day_of_week": 2, "is_open": true, "open_time": "09:00", "close_time": "17:00", "last_booking_time": "16:00"},
  {"day_of_week": 3, "is_open": true, "open_time": "09:00", "close_time": "17:00", "last_booking_time": "16:00"},
  {"day_of_week": 4, "is_open": true, "open_time": "09:00", "close_time": "17:00", "last_booking_time": "16:00"},
  {"day_of_week": 5, "is_open": true, "open_time": "09:00", "close_time": "17:00", "last_booking_time": "16:00"},
  {"day_of_week": 6, "is_open": false}
]
FieldTypeDescription
day_of_weekint0=Sunday through 6=Saturday
is_openboolWhether open this day
open_timetimeWhen the business opens (HH:MM)
close_timetimeWhen the business closes (HH:MM)
last_booking_timetimeLatest time a booking can start (HH:MM)

API Keys ​

Manage API keys for the current business. See Authentication for the full API key format, scopes, and management flow.

MethodPathDescription
POST/v1/manage/api-keysCreate a key (returns full key once)
GET/v1/manage/api-keysList keys (full key never returned)
DELETE/v1/manage/api-keys/{key_id}Revoke a key (sets is_active: false)

Stats ​

GET /v1/manage/stats ​

Returns booking statistics, revenue, rates, capacity, and trends for the business. Perfect for management dashboards.

ParamTypeRequiredDefaultDescription
from_datedateNo1st of monthStart of period (YYYY-MM-DD)
to_datedateNoTodayEnd of period (YYYY-MM-DD)
bash
curl "https://api.availengine.com/v1/manage/stats?from_date=2026-06-01&to_date=2026-06-12" \
  -H "Authorization: Bearer avail_live_YOUR_KEY"

Response:

json
{
  "period": {"from": "2026-06-01", "to": "2026-06-12"},
  "bookings": {
    "total": 342,
    "pending": 0,
    "confirmed": 50,
    "checked_in": 180,
    "completed": 170,
    "cancelled": 12,
    "no_show": 8
  },
  "revenue": {
    "deposits_captured_cents": 16000,
    "deposits_held_cents": 4000,
    "deposits_released_cents": 2400
  },
  "rates": {
    "no_show_pct": 2.3,
    "cancellation_pct": 3.5,
    "completion_pct": 49.7
  },
  "capacity": {
    "avg_party_size": 2.4,
    "total_covers": 820
  },
  "busy_hours": [
    {"hour": 19, "count": 85},
    {"hour": 20, "count": 78}
  ],
  "busy_days": [
    {"date": "2026-06-07", "day_name": "Saturday", "count": 48}
  ],
  "top_resources": [
    {
      "resource_id": "uuid",
      "resource_name": "Table 1",
      "booking_count": 52,
      "utilization_pct": 68.0
    }
  ]
}

Use this endpoint to build:

  • "Tonight at a glance" — bookings, covers, no-shows
  • Revenue dashboards — deposits captured vs held
  • Performance tracking — no-show rate over time, busiest days
  • Resource planning — which tables/stylists are over or under utilized

Blackout Dates ​

Block off dates when the business is closed. See Blackout Dates for the full reference.

MethodPathDescription
GET/v1/manage/blackout-datesList all, cursor-paginated
POST/v1/manage/blackout-datesCreate a date range
PATCH/v1/manage/blackout-dates/{id}Update date range or reason
DELETE/v1/manage/blackout-dates/{id}Remove, returns 204

Waitlist ​

GET /v1/manage/waitlist ​

List waitlist entries. Cursor-paginated, ordered by creation date. Optional ?preferred_date= filter returns entries for that date plus entries with no preferred date.

DELETE /v1/manage/waitlist/{entry_id} ​

Remove a waitlist entry. Returns 204 No Content.

Audit Logs ​

GET /v1/manage/audit-logs ​

Cursor-paginated log of all staff actions, newest first. Every state change, resource modification, and settings update is recorded.

json
{
  "items": [
    {
      "id": "uuid",
      "user_email": "owner@example.com",
      "action": "booking.status_changed",
      "entity_type": "booking",
      "entity_id": "uuid",
      "before_state": {"status": "confirmed"},
      "after_state": {"status": "checked_in"},
      "meta": {"code": "AV-ABC123", "guest": "Jane Doe"},
      "created_at": "2026-05-15T14:05:00Z"
    }
  ],
  "next_cursor": null,
  "has_more": false
}

Common audit actions ​

ActionWhen
booking.created_by_staffStaff creates a booking
booking.created_by_staff_with_depositStaff creates a deposit booking
booking.status_changedBooking status transitions
booking.resource_movedBooking reassigned to different resource
booking.capacity_changedParty size changed
booking.notes_savedStaff notes saved
booking.hold_capturedNo-show hold charged
booking.hold_releasedAuthorization hold released
resource.createdNew resource added
resource.updatedResource fields changed
resource.toggledResource enabled/disabled
resource.deletedResource hard-deleted
settings.updatedBooking settings changed
settings.hours_updatedOperating hours changed
settings.blackout_addedBlackout date range created
settings.blackout_removedBlackout date range deleted

Released under the MIT License.