createResourceType( )


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 type.

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
function createResourceType(resourceType: ResourceType): Promise<ResourceType>;
Method Parameters
resourceTypeResourceTypeRequired

Resource type to be created.

Returns
Return Type:Promise<ResourceType>
JavaScript
import { resourceTypes } from "@wix/bookings"; async function createResourceType(resourceType) { const response = await resourceTypes.createResourceType(resourceType); }
Errors
409Already Exists

There is 1 error with this status code.

429Resource Exhausted

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?