Setting the file. One moment.
Subchapter 1.40
references/context-provider/vertical-contexts/bookings/service-2.mdMarkdown9 KBView on GitHub
@wix/bookings/context/service (part 2 of 5)This context’s reference is split across 5 files: service.md, , , , .
Read Importing a Context in Code first. Import only the hook, from @wix/bookings/context/service.
| Property | Type | Description |
|---|---|---|
_id | string | null | undefined | Service ID. |
appId | string | null | undefined | ID of the app associated with the service. You can’t update appId. Services are displayed in Wix Bookings only if they are associated with the Wix Bookings appId or have no associated app ID. Default: 13d21c63-b5ec-5912-8397-c3a5ddb27a97 (Wix Bookings app ID) For services from Wix apps, the following values apply: - Wix Bookings: "13d21c63-b5ec-5912-8397-c3a5ddb27a97" - Wix Services: "cc552162-24a4-45e0-9695-230c4931ef40" - Wix Meetings: "6646a75c-2027-4f49-976c-58f3d713ed0f". Full list of apps created by Wix (opens in a new tab). |
createdByAppId | string | null | undefined | ID of the app that created the service. This field is used for analytics, auditing, and tracking creation sources. This read-only field is automatically populated during service creation by checking these sources in order: 1. The caller’s App ID from the request identity context. 2. The service’s appId field. 3. The Wix Bookings App ID (13d21c63-b5ec-5912-8397-c3a5ddb27a97) as the final fallback. |
type | ServiceTypeWithLiterals | undefined | Service type. Learn more about service types (opens in a new tab). |
sortOrder | number | null | undefined | Order of the service within a category (opens in a new tab). |
name | string | null | undefined | Service name. |
description | string | null | undefined | Service description. For example, High-class hair styling, cuts, straightening and color. |
tagLine | string | null | undefined | Short service description, such as Hair styling. |
defaultCapacity | number | null | undefined | Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity. |
media | Media | undefined | Media associated with the service. |
hidden | boolean | null | undefined | Whether the service is hidden from Wix Bookings pages and widgets. |
category | V2Category | undefined | Category (opens in a new tab) the service is associated with. Services aren’t automatically assigned to a category. Without an associated category, the service isn’t visible on the live site. |
form | Form | undefined | Form the customer filled out when booking the service. |
payment | Payment | undefined | Payment options for booking the service. Learn more about service payments (opens in a new tab). |
onlineBooking | OnlineBooking | undefined | Online booking settings. |
conferencing | Conferencing | undefined | Conferencing options for the service. |
locations | V2Location[] | undefined | The locations this service is offered at. Read more about service locations (opens in a new tab). |
bookingPolicy | BookingPolicy | undefined | Policy (opens in a new tab) determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins. |
schedule | Schedule | undefined | The service’s schedule (opens in a new tab), which can be used to manage the service’s events (opens in a new tab). |
staffMemberIds | string[] | undefined | IDs of the resources (opens in a new tab) associated with the staff members (opens in a new tab) providing the service. Note that these are the resource IDs, not the staff member IDs. For appointment-based services, set this field when creating or updating the service. For classes and courses, this field is read-only and is automatically derived from staff assigned to the service’s recurring scheduled sessions. Staff assigned only to single, non-recurring events are not included. Once all of a staff member’s upcoming recurring sessions have ended, their ID is removed from this field. To retrieve the full list of staff for classes or courses, query the service’s calendar events instead. Learn more about retrieving staff for classes and courses (opens in a new tab). |
staffMemberDetails | StaffMemberDetails | undefined | Staff members details. Returned only if STAFF_MEMBER_DETAILS conditional field was specified. |
serviceResources | ServiceResource[] | undefined | Information about which resources must be available so customers can book the service. For example, a meeting room or equipment. Some nested fields are only returned when specific conditional fields are requested: pass RESOURCE_TYPE_DETAILS to retrieve resourceType.name, and RESOURCE_DETAILS to retrieve resourceDetails.resources. |
supportedSlugs | Slug[] | undefined | A slug is the last part of the URL address that serves as a unique identifier of the service. The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner. |
mainSlug | Slug | undefined | Active slug for the service. Learn more about service slugs (opens in a new tab). |
urls | URLs | undefined | URLs to various service-related pages, such as the calendar page and the booking page. |
extendedFields | ExtendedFields$1 | undefined | Extensions enabling users to save custom data related to the service. |
seoData | SeoSchema | undefined | Custom SEO data for the service. |
_createdDate | Date | null | undefined | Date and time the service was created in YYYY-MM-DDThh:mm:ss.sssZ format. |
_updatedDate | Date | null | undefined | Date and time the service was updated in YYYY-MM-DDThh:mm:ss.sssZ format. |
revision | string | null | undefined | Revision number, which increments by 1 each time the service is updated. To prevent conflicting changes, the existing revision must be used when updating a service. |
addOnGroups | AddOnGroup[] | undefined | Information about the add-on groups (opens in a new tab) associated with the service. |
addOnDetails | AddOnDetails[] | undefined | Details about all add-ons (opens in a new tab) customers can choose when booking the service. |
taxableAddress | TaxableAddress | undefined | Taxable address used to calculate tax |
primaryResourceType | string | null | undefined | ID of the resource type (opens in a new tab) that serves as the primary resource for this appointment service. The primary resource type determines which resources drive slot assignment and availability resolution. For example, when set to a “Meeting Rooms” resource type, availability is calculated based on the rooms’ schedules rather than staff schedules. Default: The staff resource type. |