createResource( )


Developer Preview

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 events schedule is automatically created specific to this resource. This schedule will contain information on when the resource is booked in order to prevent double bookings. See Schedules API for more information.

  • If the request does not include the field locationOptions, then the service will create this field and set availableInAllLocations in this structure to true.
  • If the request includes one or more business location IDs in the locationOptions.specificLocationOptions.businessLocations field, then the field locationOptions.specificLocationOptions.availableInBusinessLocations must be set to true.
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
resourceResourceRequired

Resource to create.

Returns
Return Type:Promise<Resource>
Did this help?