Skip to content
Knowledge ERP Docs
API Reference ↗
Appointments

Appointment Types

The bookable service catalog for your scheduling module — each type defines the duration, concurrent capacity, and equipment-selection behavior for one kind of customer visit.

An appointment type is the template from which individual appointments are booked. Before a customer can schedule a visit, you need at least one type that says what the visit is — how long it takes, how many customers can be in that slot at once, which location it belongs to, and whether the customer can pick specific equipment. The actual appointment records simply point to a type and inherit all of those rules.

Types are per-location. A type is always tied to one location, so "60-min Fitting" at your downtown shop and "60-min Fitting" at your east-side shop are two separate types. This lets each location have its own schedule, capacity, and staff pool.

Creating an appointment type #

Navigate to Appointments → Appointment Types → New Appointment Type. The form collects a small but important set of fields:

  • Location — which inventory location this type is offered at. Only locations with Enable Appointments turned on appear in the list.
  • Name — the label customers and staff see, e.g. Initial Consultation or Equipment Fitting.
  • Duration (minutes) — how long one appointment of this type takes. Must be at least 1 minute. This value drives scheduling math — back-to-back bookings are blocked unless this many minutes separate them.
  • Concurrent Slots — the maximum number of appointments of this type that can run at the same time. Leave blank for unlimited (shown as ∞ in the list). Set it to 1 for a one-at-a-time service; set it higher for group sessions or multi-lane setups.
  • Sort Order — an integer that controls how types are presented in drop-downs and public booking flows. Lower numbers appear first. Defaults to 0.
  • Allow Equipment Selection — when enabled, the booking flow can ask the customer (or the staff member creating the appointment) to choose specific equipment units for the visit. Useful when the appointment is tied to a particular tool or loaned asset.
  • Next-step flagsBorrow → Loan, Rent → Rental, Purchase → Sales Order, and Return → Customer Return. Tick the flows this type is for; a confirmed appointment offers a one-click action to create each enabled document, pre-filled with the customer and requested equipment. The flags also narrow equipment selection — loan/rental types only offer returnable gear, purchase types only sale goods. See Appointments.
  • Active — inactive types are hidden from booking forms and new appointment creation. Flip this off to retire a type without deleting it or affecting its historical appointments.

How availability is calculated #

Availability for a type at a given date and time is the lower of two values:

  1. Available staff — employees assigned to this type who don't already have an appointment at that exact slot.
  2. Concurrent slot cap — if set, the cap minus the number of appointments already booked at that time.

The model exposes openSlotsAt() and availableEmployeesAt() for this logic, which the scheduling UI calls when it checks whether a time slot can be offered. A slot that returns 0 is shown as full.

Tip: assigning staff to a type (via the pivot relationship) is the primary way to control capacity. If no employees are assigned, the available count is zero regardless of the slot cap.

The appointment types list #

Appointments → Appointment Types lists every type with its Location, Duration (min), Slots (∞ for unlimited), Order, and an Active icon. The list defaults to sorting by sort_order, so the display order you've configured is what you see. Use the Trashed filter to show soft-deleted types if you need to restore one.

Editing and deactivating #

Open any type to view its details, then use Edit to change any field. Setting Active to off is the preferred way to retire a type — existing appointments keep their reference intact, the type just stops appearing in booking forms. A Delete action soft-deletes the record; it can be restored from the trashed filter view.

Relation to appointments and location hours #

Every appointment belongs to exactly one type. When a staff member creates an appointment, they first pick the Location, which filters the type list to only active types at that location. The location hours for that location then constrain which dates and times are offerable — an appointment type may allow 60-minute bookings, but if the location closes at 5 pm the last slot will be cut off accordingly.

Appointment types also appear in the loan agreements module, where a loan or checkout can optionally be tied to an appointment.

Doing it from the API #

# List active appointment types at a location
curl "https://your-domain.com/api/v1/appointment-types?location_id=<location-id>&active=true" \
  -H "Authorization: Bearer $TOKEN"

# Create an appointment type
curl -X POST "https://your-domain.com/api/v1/appointment-types" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "location_id": "<location-id>",
    "name": "Equipment Fitting",
    "duration_minutes": 45,
    "concurrent_slots": 2,
    "allow_equipment_selection": true,
    "is_active": true,
    "sort_order": 10
  }'

The list endpoint accepts a location_id query parameter (filter by location) and an active boolean to narrow results. Results are paginated at 50 per page and sorted by sort_order. A DELETE request soft-deletes the type; existing appointment records that reference it are preserved.