This article presents a possible use case that you could support, along with a sample flow to implement it. This examples can serve as a helpful starting point as you plan your implementation.
You could create a resource that's bookable only at a specific location.
To create a bookable resource:
name
, the ID of the resource type and
the ID of the business location.serviceResources.resourceType
is set to the correct
resource Type ID.resourceType
,
call Update Service
(SDK | REST).
Specify the correct resource Type ID in serviceResources.resourceType
.This article covers field support for filtering in Query Resources (SDK | REST), Search Resources (SDK | REST), and Count Resources (SDK | REST).
Specify the filter
object in the following format:
The following table shows field support for filters and sorting for the
resource
object:
Field | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $exists , $in , $nin , $startsWith | Sortable |
name | $eq , $ne , $exists , $in , $nin , $isEmpty | |
typeId | $eq , $ne , $exists , $in , $nin , $startsWith , $isEmpty | Sortable |
locationOptions.availableInAllLocations | $eq , $ne , $exists , $in , $nin | Sortable |
locationOptions.specificLocationOptions.availableInBusinessLocations | $eq , $ne , $exists , $in , $nin | Sortable |
locationOptions.specificLocationOptions.businessLocations.locationId | $eq , $ne , $isEmpty , $hasAll , $hasSome | Sortable |
eventsSchedule.scheduleId | $eq , $ne , $exists , $in , $nin , $startsWith | Sortable |
Results in Query Resources
(SDK | REST)
and Search Resources
(SDK | REST)
are sorted by the id
field in ascending order by default.
To sort by a different field, use the sort
object in the following format:
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Resources to create.
There are 5 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
IDs of the resources to delete.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Counts resources according to given criteria.
Refer to the supported filters article (SDK | REST) for a complete list of supported filters and sorting options.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a new resource.
A new event schedule (SDK | REST) is automatically created for the resource.
If you don't specify locationOptions
, Wix Bookings automatically sets
locationOptions.availableInAllLocations
to true
.
If you specify 1 business location ID in locationOptions.specificLocationOptions.businessLocations
,
you must specify locationOptions.specificLocationOptions.availableInBusinessLocations
as true
. Currently, you can specify only a single business location.
Resource to create.
There are 4 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.