This recipe answers two related questions, in order of how often they're asked:
Don't diagnose by default. If the owner just wants to know the status and the service is bookable, answer that and stop.
You are talking to a site owner, not a developer. Use everything below — endpoints, JSON, reason codes, suggestedAction values, field names — only to do the work. Your reply must be plain language.
Keep it short and only say what's relevant:
Never put any of these in your reply: endpoint paths or curl, JSON, reason-code names (e.g. RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION), suggestedAction enums, or field names. Translate them. See Presenting to the user.
✅ "Your staff don't have working hours at the location this service is offered at, so there's nothing to book. Want me to add hours there?"
❌ "DiagnoseAvailability returned RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION / CHECK_WORK_LOCATIONS."
Scope: appointment-based services.
13d21c63-b5ec-5912-8397-c3a5ddb27a97).Note: If Bookings APIs return errors, the app may not be installed. Use List Installed Apps to verify and Install Wix Apps to install it.
Typically the serviceId (optionally with a staff member's resourceId to scope to one provider). A resourceId on its own is also supported for the staff editor, where no service is in context — see Which inputs to pass.
Authorization (diagnosis only): to call DiagnoseAvailability the caller needs the bookings:availability:v2:time_slot:diagnose_availability permission. A plain site/owner token can come back 403 (empty body) if that permission isn't granted — that's an auth problem, not "no cause found." Ensure the calling context carries the permission before treating a 403 as inconclusive.
This is the default answer. Find out whether customers can actually book the service right now, then say so plainly.
ListAvailabilityTimeSlots — the same slots a customer sees. See End-to-End Booking Flow for the request shape. Query the service over a sensible upcoming window (e.g. the next few weeks) in the site's time zone.Interpret the result:
| What comes back | Availability status | What to do |
|---|---|---|
| One or more bookable slots | Bookable. | Tell the owner in a sentence and stop — no diagnosis needed unless they ask why/how to change something. |
Slots exist but none are bookable (nonBookableReasons / bookingPolicyViolations set) | Not bookable — policy/capacity. | This is the cause. Surface it directly (policy/capacity causes). No need to run DiagnoseAvailability. |
| No slots at all | No availability. | Diagnose: go to Step 2. |
The hidden-service trap. A service that's hidden from the site, or has online booking turned off, can still list slots here — so bookable slots do not prove customers can book it. When the complaint is "customers can't book / can't find this service" (as opposed to "the calendar is empty"), run Step 2 before trusting the slot count — it's the single most common cause and neither ListAvailabilityTimeSlots nor DiagnoseAvailability detects it.
If no slots come back at all, also sanity-check the inputs before concluding "no availability": the queried window isn't entirely in the past, and any locations filter is actually offered by the service.
Do the following only when Step 1 found no availability, or the owner asks why there are no times / how to fix it / why customers can't book. Run the checks in order — cheapest, most common blockers first.
Two service settings block booking entirely, regardless of staff availability, and are invisible to DiagnoseAvailability. Check them first with a single read of the service.
GET https://www.wixapis.com/_api/bookings/v2/services/{serviceId}Inspect two fields on the returned service:
| Field | Blocking value | What it means (the "Visible on your site and app" toggle is hidden inverted) |
|---|---|---|
hidden | true | The service is hidden from the site and app. Customers can't see or book it. In the dashboard this is the "Visible on your site and app" toggle turned off. |
onlineBooking.enabled | false | Online booking is turned off for this service. It may be visible, but customers can't book it online (staff can still book it manually). |
hidden: true → that's the cause. Stop here. Fix: make the service visible (offer to flip the toggle for them).onlineBooking.enabled: false → that's the cause (for "can't book online"). Fix: turn online booking on.hidden: false, onlineBooking.enabled: true) → proceed to Step 3. Don't announce that they're fine — just move on.Why this comes first: a hidden service can still have staff, working hours, and internally-generated time slots — so ListAvailabilityTimeSlots and DiagnoseAvailability will happily report on those slots (including policy details like "too late to book"). None of that is the real reason the customer can't book. Confirming visibility first prevents a confidently-wrong answer.
DiagnoseAvailability is a read-only custom action that explains why availability is empty rather than returning slots.
POST https://www.wixapis.com/_api/service-availability/v2/time-slots/diagnosediagnoseAvailabilityEndpoint feature toggle (deployed and available in production). If it returns no reasons for a service you'd expect to be broken, treat the result as inconclusive and go to Step 4.hasAvailability is set true only on the service paths, when the availability-window check confirms real availability — and for serviceId-only, only when the service needs a single staff resource type. It is never asserted true for serviceId+resourceId (one resource can't confirm the whole service) or for resource-only. So hasAvailability: false with an empty reasons array means inconclusive ("no blocking cause found"), not necessarily "no availability."Prefer passing serviceId — on its own, or together with a resourceId to scope to one provider. resourceId alone is a valid mode (it serves the staff editor, where there is no service context) but is shallower; use it when a service genuinely isn't available.
The service is what makes the diagnosis deep. Only the service paths run the L2 availability-window check — it needs the service configuration (duration, buffer, offered locations, resource types) to actually verify the resource has real windows in the range and at the right locations. That L2 check is what produces NO_RESOURCE_AVAILABILITY_WINDOWS, RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION, and REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE.
| Inputs | Diagnoses | Depth | hasAvailability |
|---|---|---|---|
serviceId + resourceId (preferred) | Why a specific provider has no slots for the service | L1 setup + L2 window/location | never asserted true |
serviceId only | Whole-service availability across assigned staff/locations | L1 setup + L2 window/location | true only if the service needs a single staff resource type |
resourceId only | Staff-editor check, no service context | L1 setup + missing/empty working-hours check (no window/location; deep not allowed) | never asserted true |
Resource-only is a valid mode, but lighter. It exists for contexts where there is no service — e.g. the staff editor, diagnosing a staff member on their own. It catches a missing or empty working-hours schedule (RESOURCE_HAS_NO_WORKING_HOURS), but with no service configuration it can't run the availability-window or location checks, can't resolve locations, and can't use deep. So problems that only surface against a service — no windows despite having hours, a location mismatch, duration/buffer — are caught only when a serviceId is supplied.
serviceId.serviceId + resourceId (use a service they're assigned to) for the fullest diagnosis.resourceId is available (e.g. from the staff editor, with no service in context) → use resource-only; it flags missing/empty working hours, but treat an inconclusive result with care — it can't check windows, locations, or run deep. When you can, re-run with a service the resource is assigned to.| Field | Notes |
|---|---|
serviceId | Service to diagnose. Provide this or resourceId. |
resourceId | Staff member / resource to diagnose. Pair it with serviceId (see Which inputs to pass). Resource-only (no serviceId) runs a lighter check — missing/empty working hours only, no window/location/deep — and can miss service-dependent problems. |
fromLocalDate | YYYY-MM-DDThh:mm:ss (ISO-8601). Optional; defaults to now. |
toLocalDate | Optional; defaults to fromLocalDate + 90 days. |
timeZone | IANA tz (e.g. America/New_York). Defaults to the site's time zone. |
locations | Locations to diagnose. Empty ⇒ all locations the service offers. |
deep | Optional (default false). Set true with a serviceId to refine a "no availability windows" result into why — outside working hours vs. blocked/busy time. Extra sampling call; only acts when no windows exist; rejected on the resource-only path (MISSING_ARGUMENTS). See Deep mode. |
reasons are ordered most-specific first. Fix the first, then re-run.resolvedContext echoes the inputs actually used (resolved locations, duration, buffer, window, time zone) — use it to confirm you diagnosed what you meant to.reasons ⇒ inconclusive → go to Step 4.This table is for your interpretation only. Map the returned code to the plain-language cause and fix, then write the reply in everyday words — the code names and suggestedAction values must not appear in your response. See Presenting to the user.
code | suggestedAction | Meaning & fix |
|---|---|---|
NO_ASSIGNED_STAFF_OR_RESOURCES | ASSIGN_STAFF_OR_RESOURCES | No staff/resources assigned to the service. Assign at least one. |
RESOURCE_NOT_ASSIGNED_TO_SERVICE | ASSIGN_RESOURCE_TO_SERVICE | The given resource isn't assigned to the service. Assign it, or diagnose a resource that is. |
RESOURCE_HAS_NO_WORKING_HOURS | CHECK_STAFF_WORKING_HOURS | The staff member has no working-hours schedule. Configure working hours — see Bookings Staff Setup. |
RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION | CHECK_WORK_LOCATIONS | Assigned resources have availability windows, but none at a location the service offers. Add working hours at an offered location, offer the service where the staff works, or assign a provider who works at the offered location. |
NO_RESOURCE_AVAILABILITY_WINDOWS | CHECK_STAFF_WORKING_HOURS | No availability windows exist anywhere in the diagnosed range. Add working hours, or widen the range. |
REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE | CHECK_SERVICE_LOCATIONS | A requested locations filter isn't offered by the service. Drop the filter or fix the service's locations. |
DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS | REDUCE_DURATION_OR_BUFFER | The service is longer than every free window. Shorten it or lengthen working hours. |
BUFFER_TIME_ELIMINATES_WINDOWS | REDUCE_DURATION_OR_BUFFER | Buffer time consumes all otherwise-free windows. Reduce the buffer or lengthen working hours. |
SERVICE_AVAILABILITY_CONFIGURATION_MISSING | — | The service's availability configuration is missing. |
RESOURCE_TYPE_RESOLUTION_FAILED | — | The service's resource types couldn't be resolved. |
RESOURCE_NOT_IN_WORKING_HOURS | CHECK_STAFF_WORKING_HOURS | The resource works, but not during the empty range — it's outside their working hours. Reported only with deep: true. Fix: adjust/extend working hours. |
RESOURCE_BLOCKED | CHECK_BLOCKED_TIME | The resource is within working hours but blocked by existing bookings, calendar events, or an external calendar. Reported only with deep: true. Fix: free up the blocked time. |
| HTTP | application_code | Cause |
|---|---|---|
| 400 | MISSING_ARGUMENTS | Neither serviceId nor resourceId provided; or deep: true sent without a serviceId. |
| 400 | INVALID_TIME_ZONE | timeZone isn't a valid IANA zone. |
| 400 | INVALID_SERVICE_IDS_PROVIDED | The serviceId doesn't resolve to a service on the site. In practice a well-formed-but-nonexistent serviceId (not only a malformed one) currently surfaces here rather than as a 404 — re-check the ID. |
| 404 | SERVICE_NOT_FOUND / RESOURCE_NOT_FOUND | Service / staff record missing. (A missing serviceId may instead surface as the 400 INVALID_SERVICE_IDS_PROVIDED above.) |
| 404 | NO_IMPLEMENTERS_FOUND / MULTIPLE_IMPLEMENTERS_FOUND | No / multiple availability providers configured. |
| 403 | UNAUTHORIZED_OPERATION | Caller lacks bookings:availability:v2:time_slot:diagnose_availability. |
deep: true (with a serviceId) refines a no-availability-windows result — it tells you why there are no windows: the staff are outside their working hours for that range (RESOURCE_NOT_IN_WORKING_HOURS) vs. within hours but blocked/busy (RESOURCE_BLOCKED, e.g. existing bookings or an external calendar).
NO_RESOURCE_AVAILABILITY_WINDOWS and you want to tell the owner whether to add hours or free up blocked time.serviceId (resource-only + deep → MISSING_ARGUMENTS); it's a best-effort refinement and silently falls back to the generic NO_RESOURCE_AVAILABILITY_WINDOWS cause if the sampling is inconclusive.Empty reasons + still no bookable slots usually means the cause is one DiagnoseAvailability doesn't evaluate: booking policy or remaining capacity. You may already have this from the ListAvailabilityTimeSlots call in Step 1 — if not, call it again for the same service and window and inspect the returned slots.
nonBookableReasons — noRemainingCapacity, violatesBookingPolicy, reservedForWaitingList, eventCancelled.bookingPolicyViolations — tooEarlyToBook, tooLateToBook, bookOnlineDisabled.If no slots come back at all, re-check the inputs: the diagnosed window isn't entirely in the past, and any locations filter is actually offered by the service.
See End-to-End Booking Flow for the ListAvailabilityTimeSlots request shape.
Whether you're reporting status or a cause, reply in plain, friendly language and keep it short.
suggestedAction enums, raw JSON, endpoint names, or field paths.resolvedLocations.reasons), say only that you couldn't find a blocking problem, and describe what you'll check next (policy/capacity, or re-run against a service for a resource-only check). Do not state or imply that anything is set up correctly — an empty reasons array means "no blocker detected," not "working hours / locations / setup are present." On the resource-only path never say the staff "have working hours set"; the check doesn't verify that.Plain-language phrasing per outcome:
| Outcome | Say something like |
|---|---|
| Service is bookable (status) | "Yes — [service] has open times customers can book (the next one is [day/time])." |
Service is hidden from the site (hidden: true) | "This service is currently hidden from your site and app, so customers can't see or book it. Want me to make it visible?" |
Online booking turned off (onlineBooking.enabled: false) | "Online booking is turned off for this service, so customers can't book it themselves online (you can still book it for them manually). Want me to turn online booking on?" |
| No staff/resources on the service | "This service doesn't have any staff assigned yet, so there's nothing to book. Want me to help you add someone?" |
| Provider isn't on the service | "That staff member isn't assigned to this service, so their times don't show. I can add them to it." |
| Provider has no working hours | "The staff for this service don't have any working hours set, so there are no times to offer. Let's set their hours." |
| Provider works only at other locations | "Your staff have working hours, but not at the location(s) this service is offered at. We can either add hours at one of the service's locations, or offer the service where they already work." |
| No working-hours windows in range | "None of the staff for this service have working hours in the dates you're checking. Let's add or extend their hours — or try a different date range." |
| Outside working hours (deep) | "For those dates, your staff simply aren't scheduled to work, so there's nothing to offer. Let's add working hours in that period." |
| Within hours but blocked/busy (deep) | "Your staff are scheduled to work then, but that time is already taken up — by existing bookings or events on their calendar. Freeing some of it up will open slots." |
| Service too long / buffer too large | "The service is longer than any open gap in your staff's schedule (the duration plus buffer doesn't fit). Shortening it a bit, or widening working hours, would open up slots." |
| Requested location not offered | "This service isn't offered at the location you picked. Want me to add that location to the service, or check a different one?" |
| Slots exist but aren't bookable | "There are times available, but customers can't book them right now — [e.g. they're fully booked / it's too early or late to book per your policy]. Here's how to adjust that." |
Example conversational reply (for a location-mismatch result):
I looked into why no times are showing for [service name]. Your staff do have working hours, but none of them are at the locations this service is offered at (Jerusalem2 and Holon) — so there's nothing available to book.
To fix it you can either add working hours for a staff member at Jerusalem2 or Holon, or offer the service at the location where your staff already work. Want me to set that up?
Popular reasons a service shows no availability, and where each surfaces:
| Situation | Where it surfaces | Fix |
|---|---|---|
| Service is bookable | Step 1 — ListAvailabilityTimeSlots returns bookable slots | Nothing — report the status. |
| Service hidden from the site/app | Step 2 — service.hidden: true | Make the service visible ("Visible on your site and app" toggle). |
| Online booking turned off | Step 2 — service.onlineBooking.enabled: false | Turn online booking on for the service. |
| No staff/resources on the service | NO_ASSIGNED_STAFF_OR_RESOURCES | Assign staff/resources. |
| Provider isn't on the service | RESOURCE_NOT_ASSIGNED_TO_SERVICE | Assign the provider. |
| Provider has no working hours | RESOURCE_HAS_NO_WORKING_HOURS | Configure working hours. |
| Provider works only at other locations | RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION | Align staff work locations with the service's offered locations. |
| No working-hours windows in range | NO_RESOURCE_AVAILABILITY_WINDOWS | Add working hours / widen the range. |
| No windows — outside working hours (deep) | RESOURCE_NOT_IN_WORKING_HOURS (deep: true) | Add or extend working hours in the range. |
| No windows — within hours but blocked/busy (deep) | RESOURCE_BLOCKED (deep: true) | Free up blocked time / check the external calendar. |
| Service too long / buffer too large for the windows | DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS, BUFFER_TIME_ELIMINATES_WINDOWS | Shorten duration/buffer or lengthen hours. |
| Requested location not offered | REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE | Fix the location filter or the service's locations. |
| Slots exist but aren't bookable (fully booked, too early/late, online booking off) | Step 1 / Step 4 — ListAvailabilityTimeSlots nonBookableReasons / bookingPolicyViolations | Adjust capacity or booking policy. |
hidden: true (or onlineBooking.enabled: false) blocks booking entirely, but a hidden service can still list slots — so ListAvailabilityTimeSlots and DiagnoseAvailability will report on those slots and their policy details (e.g. "too late to book"), none of which is the real reason. When the complaint is "customers can't book / can't see this service," run Step 2 first.hasAvailability: false + empty reasons ≠ a confirmed problem. It means "no blocking cause detected." Always confirm with ListAvailabilityTimeSlots.DiagnoseAvailability is ALPHA and feature-toggled. If it returns nothing for an obviously broken service, the diagnoseAvailabilityEndpoint toggle may be off — fall back to Step 4.bookings:availability:v2:time_slot:diagnose_availability permission; a caller without it gets a 403 with an empty body. Don't read that as "no cause found" — confirm the caller has the permission (see Prerequisites).deep: true needs a serviceId (resource-only + deep → MISSING_ARGUMENTS) and only refines a "no windows" result — it does nothing when windows already exist.DiagnoseAvailability ignores booking policy and capacity — those come from ListAvailabilityTimeSlots (Step 1 / Step 4).resourceId without serviceId catches missing/empty working hours but skips the window, location, and deep checks, so it can return "inconclusive" for service-dependent problems. Valid when there's no service context (e.g. the staff editor); otherwise pair the resource with a service.Last updated: 15 July 2026