About the Resources API

The Resources API is an integral part of the Wix Bookings app, designed to manage and interact with various types of resources that can be booked by customers. These resources could include meeting rooms, equipment, event spaces, or any other assets that require scheduling and availability management.

The Resources API provides functionality to manage resources, including creating, updating, deleting, and querying resources.

Before you begin

It’s important to note the following points before starting to code:

  • Ensure that the Wix Bookings app is installed and configured on the site before using this API.
  • Resources API is part of the Resource Management feature in Wix Bookings. Learn more about managing your resources.
  • In order for a resource to be bookable and to avoid double bookings, it must be associated with a resource type. In turn, the resource type must be connected to the relevant services. Learn more about Resource Types and Services.
  • At least one resource of each resource type that is connected to a service must be available at the chosen time in order for customers to book.
  • Resources are only visible to the business. Customers are not able to see them when booking a service.
  • A resource that is associated with a staff member can only be managed via the Staff Member API. Learn more about managing your staff and Staff Member API.
  • Only a resource that is associated with a staff member has a working hours schedule to specify the availability. The availability of any other type of resource is solely based on their location.
  • When deleting a resource, the associated events schedule and any working hours schedule that is not shared are automatically cancelled.

Use Cases

Terminology

  • Resource: An asset or entity that can be reserved or booked for a specified period within Wix Bookings.
  • Resource type: A classification of resources. A resource must be associated with a resource type to be bookable.
  • Staff member: An individual who provides booking services on the site.
  • Working hours schedule: The schedule that defines when a resource is available for bookings. Currently, only a resource that is associated with a staff member can have a working hours schedule.
  • Location: A physical place where a resource is available for booking.
  • Events schedule: The schedule that contains all session in which a resource is booked.

For a comprehensive glossary of Wix Bookings terms, see Terminology.

See also

Did this help?

Resources API: Sample Use Cases and Flows

This article presents possible use cases that your app could support, along with sample flows to implement each use case. These examples can serve as a helpful starting point as you plan your app's functionality.

Create a bookable resource

You could create a resource that's bookable only at a specific location.

To create a bookable resource:

  1. Use Query Resource Types to retrieve the ID of the resource type.

  2. Use Query Locations to retrieve the ID of the business location.

  3. Use Create Resource to create the resource by providing a name, the ID of the resource type and the ID of the business location.

If the resource type of the created resource is not yet associated to the relevant services then perform the following steps:

  1. Use Query Services to retrieve the IDs of the relevant services that are not yet associated to the resource type. You can check this by inspecting the serviceResources.resourceType fields of the service. If this field does not contain the ID of the resource type then the service is not yet associated to the type.

  2. Use Update Service to associate each service to the resource type by providing the ID of the service and the ID of the resource type. To do so add an entry to the serviceResources array of which the resourceType.id field is set to the ID of the resource type.

Did this help?

Resources Errors

This article outlines error messages that might be issued when calling endpoints of the Resources API.

Create Resource Errors

The Create Resource and Bulk Create Resource endpoints might issue the following error messages:

HTTP status
Error code
Error message
Troubleshooting
INVALID_ARGUMENT (400)RESOURCE_LOCATION_ID_IS_REQUIREDlocationId is a required field of locationOptions.specificLocationOptions.businessLocationsMake sure that each element in the businessLocations array contains a non-empty ID.
INVALID_ARGUMENT (400)RESOURCE_SPECIFIC_LOCATION_OPTIONS_NOT_ALLOWEDspecificLocationOptions of locationOptions cannot be set if availableInAllLocations is trueMake sure that a resource is specified to be available at all locations by setting availableInAllLocations to true or at specific locations only by setting specificLocationOptions.
INVALID_ARGUMENT (400)RESOURCE_SPECIFIC_LOCATION_OPTIONS_MUST_BE_SETspecificLocationOptions of locationOptions must be set if availableInAllLocations is false or emptyIf the resource is not available at any location, then supply the specificLocationOptions field to specify the locations the resource is available.
INVALID_ARGUMENT (400)RESOURCE_AVAILABLE_IN_BUSINESS_LOCATION_MUST_BE_TRUEavailable_in_business_locations in locationOptions.specificLocationOptions must be set to trueWhen availableInAllLocations is false or empty then available_in_business_locations must be set to true.
INVALID_ARGUMENT (400)RESOURCE_WORKING_HOURS_NOT_SUPPORTED_IN_BULK_REQUESTworkingHoursSchedules is currently not supported in bulk requestsAt this time it is not possible to include a resource with working hour schedules in a call to Bulk Create Resources.

Update Resource Errors

The Update Resource endpoint might issue the following error messages:

HTTP status
Error code
Error message
Troubleshooting
INVALID_ARGUMENT (400)RESOURCE_NAME_IS_REQUIRED'name' is a required field of ResourceWhen updating the name of the resource make sure that the new name is not empty.
INVALID_ARGUMENT (400)RESOURCE_LOCATION_ID_IS_REQUIREDlocationId is a required field of locationOptions.specificLocationOptions.businessLocationsMake sure that each element in the businessLocations array contains a non-empty value.
INVALID_ARGUMENT (400)RESOURCE_SPECIFIC_LOCATION_OPTIONS_NOT_ALLOWEDspecificLocationOptions of locationOptions cannot be set if availableInAllLocations is trueMake sure that a resource is specified to be available at all locations by setting availableInAllLocations to true or at specific locations only by setting specificLocationOptions.
INVALID_ARGUMENT (400)RESOURCE_SPECIFIC_LOCATION_OPTIONS_MUST_BE_SETspecificLocationOptions of locationOptions must be set if availableInAllLocations is false or emptyIf the resource is not available at any location, then supply the specificLocationOptions field to specify the locations the resource is available.
INVALID_ARGUMENT (400)RESOURCE_AVAILABLE_IN_BUSINESS_LOCATION_MUST_BE_TRUEavailable_in_business_locations in locationOptions.specificLocationOptions must be set to trueWhen availableInAllLocations is false or empty then available_in_business_locations must be set to true.
INVALID_ARGUMENT (400)RESOURCE_WORKING_HOURS_SCHEDULE_ID_IS_REQUIREDscheduleId is a required field of workingHoursSchedules.valuesWhen updating the working hour schedules of a resource make sure that scheduleId has a non-empty value.
INVALID_ARGUMENT (400)RESOURCE_WORKING_HOURS_SHARED_IS_REQUIREDshared is a required field of workingHoursSchedules.valuesWhen updating the working hour schedules of a resource make sure that shared has a non-empty value.
INVALID_ARGUMENT (400)RESOURCE_TYPE_IS_IMMUTABLEtype is an immutable field and can therefore not be modifiedThe type field of a resource cannot be updated.
Did this help?

Resources: Filtering and Sorting

Query endpoints allow you to filter and sort results based on resource properties. This article covers field support for filtering and sorting.

Filtering

Specify the filter object in the following format:

Copy
{ "filter": { "fieldName": { "$eq": "value" } } }

The following table shows field support for filters and sorting for the Resource object:

FieldSupported FiltersSortable
id$eq, $ne, $exists, $in, $nin, $startsWithSortable
name$eq, $ne, $exists, $in, $nin, $isEmpty
typeId$eq, $ne, $exists, $in, $nin, $startsWith, $isEmptySortable
locationOptions.availableInAllLocations$eq, $ne, $exists, $in, $ninSortable
locationOptions.specificLocationOptions.availableInBusinessLocations$eq, $ne, $exists, $in, $ninSortable
locationOptions.specificLocationOptions.businessLocations.locationId$eq, $ne, $isEmpty, $hasAll, $hasSomeSortable
eventsSchedule.scheduleId$eq, $ne, $exists, $in, $nin, $startsWithSortable

Sorting

Results 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:

Copy
{ "sort": [ { "fieldName": "typeId", "order": "DESC" } ] }

Related content:

Did this help?

Resource Object


A resource represents an entity that can be scheduled for use, such as a room or a staff member. The availability of a resource is tracked to ensure that it can be allocated at a requested time slot and to prevent double bookings. Read more about resources in this article.

Properties
idstringRead-onlyformat GUID

Resource ID.


revisionintegerRead-onlyformat int64

Revision number, which increments by 1 each time the resource is updated. To prevent conflicting changes, the current revision must be passed when updating the resource.


createdDatestringRead-onlyformat date-time

Represents the time in YYYY-MM-DDThh:mm:ss.sssZ format this resource was created.


updatedDatestringRead-onlyformat date-time

Represents the time in YYYY-MM-DDThh:mm:ss.sssZ format this resource was last updated.


namestringmaxLength 40minLength 1

Name of the resource.


typeIdstringformat GUID

ID of the resource type.

Once a type has been set it can't be modified. You can create a resource without specifying a type. However, such resources cannot be booked.


workingHoursSchedulesWorkingHoursSchedules

Schedule details that specify the working hours and locations of this resource.

Resources without this field are available 24/7 at the locations specified in the field locationOptions. When both workingHoursSchedules and locationOptions are set then workingHoursSchedules takes precedence.


locationOptionsLocationOptions

Location details that specify where this resource is available.


eventsScheduleEventsScheduleRead-only

This schedule contains the sessions in which this resource has been booked.


extendedFieldsExtendedFields

Extensions enabling users to save custom data related to the resource.

Resource
JSON
{ "resource": { "id": "ffedf9dc-932d-439f-b1f4-e42b2a5a8bb5", "revision": "1", "createdDate": "2024-11-22T13:36:47.104Z", "updatedDate": "2024-11-22T13:36:47.104Z", "name": "Meeting room with conference system", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "1295e5ff-ecb3-41bc-8b6f-7345792e5ec0" } ] } }, "eventsSchedule": { "scheduleId": "e263b1ca-a1e9-45bf-a39c-044e97c63500" } } }
Did this help?

POST

Create Resource


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.
Endpoint
POST
https://www.wixapis.com/bookings/v2/resources

Body Params
resourceResourceRequired

Resource to create.

Response Object
resourceResource

The created resource.

This is a minimal example of creating a resource. By default this resource is available in all locations. Only when the type field is provided can the resource be used for bookings.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/bookings/v2/resources' \ -H 'Authorization: <AUTH>' \ -d '{ "resource": { "name": "Some name" } }'
Response
JSON
{ "resource": { "id": "77c7a7d1-0045-47eb-bef7-f1bcac5f68e1", "revision": "1", "createdDate": "2024-11-22T13:28:29.869Z", "updatedDate": "2024-11-22T13:28:29.869Z", "name": "Some name", "locationOptions": { "availableInAllLocations": true }, "eventsSchedule": { "scheduleId": "c0091359-7007-4288-be59-dccade075472" } } }
Event TriggersThis method triggers the following events:
Did this help?

POST

Bulk Create Resources


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 multiple resources.

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.
Endpoint
POST
https://www.wixapis.com/bookings/v2/bulk/resources/create

Body Params
resourcesArray <Resource>RequiredmaxItems 50

Resources to create.


returnEntityboolean

Whether to include the created resources in the response. Default: false

Response Object
resultsArray <BulkResourceResult>

The result of each resource creation.


bulkActionMetadataBulkActionMetadata

Create statistics.

Create multiple resources.
Request
cURL
curl -X POST \ 'https://www.wixapis.com/bookings/v2/bulk/resources/create' \ -H 'Authorization: <AUTH>' \ -d '{ "resources": [ { "name": "Small meeting room", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "location_options": { "specific_location_options": { "business_locations": [ { "location_id": "808dfb00-0a74-4e70-bb3b-f96ff6ba1246" } ], "available_in_business_locations": true } } } ], "return_entity": "true" }'
Response
JSON
{ "results": [ { "itemMetadata": { "id": "ef5f8d3d-9269-490c-a067-a3d226fcb5d8", "originalIndex": 0, "success": true }, "item": { "id": "ef5f8d3d-9269-490c-a067-a3d226fcb5d8", "revision": "1", "createdDate": "2024-11-22T14:02:34.993Z", "updatedDate": "2024-11-22T14:02:34.993Z", "name": "Small meeting room", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "808dfb00-0a74-4e70-bb3b-f96ff6ba1246" } ] } }, "eventsSchedule": { "scheduleId": "ee500718-7ce3-478a-89fb-1d839a37e324" } } } ], "bulkActionMetadata": { "totalSuccesses": 1, "totalFailures": 0, "undetailedFailures": 0 } }
Event TriggersThis method triggers the following events:
Did this help?

GET

Get Resource


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a resource by ID.

Permissions
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/bookings/v2/resources/{resourceId}

Path Params
resourceIdstringRequired

ID of the resource to retrieve.

Response Object
resourceResource

The retrieved resource.

Retrieve a resource.
Request
cURL
curl -X GET \ 'https://www.wixapis.com/bookings/v2/resources/ffedf9dc-932d-439f-b1f4-e42b2a5a8bb5' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "resource": { "id": "ffedf9dc-932d-439f-b1f4-e42b2a5a8bb5", "revision": "1", "createdDate": "2024-11-22T13:36:47.104Z", "updatedDate": "2024-11-22T13:36:47.104Z", "name": "Meeting room with conference system", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "1295e5ff-ecb3-41bc-8b6f-7345792e5ec0" } ] } }, "eventsSchedule": { "scheduleId": "e263b1ca-a1e9-45bf-a39c-044e97c63500" } } }
Did this help?

DELETE

Delete Resource


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes a resource.

Also cancels the associated events schedule and any working hours schedule that isn’t shared among multiple resources.

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.
Endpoint
DELETE
https://www.wixapis.com/bookings/v2/resources/{resourceId}

Path Params
resourceIdstringRequired

ID of the resource to delete.

Response Object
Returns an empty object.
Delete a resource.
Request
cURL
curl -X DELETE \ 'https://www.wixapis.com/bookings/v2/resources/ffedf9dc-932d-439f-b1f4-e42b2a5a8bb5' \ -H 'Authorization: <AUTH>'
Response
JSON
{}
Event TriggersThis method triggers the following events:
Did this help?

PATCH

Update Resource


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates a resource.

Each time the resource is updated, revision increments by 1. You must include the current revision of the resource when updating it. This ensures you're working with the latest service information and prevents unintended overwrites.

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.
Endpoint
PATCH
https://www.wixapis.com/bookings/v2/resources/{resource.id}

Path Params
resource.idstringRequired

Resource ID.

Body Params
resourceResourceRequired

Resource to be updated, may be partial.

Response Object
resourceResource

The updated resource.

Update a resource.

To update a resource the fields id and revision are required. Partial updates are supported.

Request
cURL
curl -X PATCH \ 'https://www.wixapis.com/bookings/v2/resources/77c7a7d1-0045-47eb-bef7-f1bcac5f68e1' \ -H 'Authorization: <AUTH>' \ -d '{ "resource": { "id": "77c7a7d1-0045-47eb-bef7-f1bcac5f68e1", "revision": "1", "name": "Updated name" } }'
Response
JSON
{ "resource": { "id": "77c7a7d1-0045-47eb-bef7-f1bcac5f68e1", "revision": "2", "createdDate": "2024-11-22T13:28:29.869Z", "updatedDate": "2024-11-22T15:08:44.446Z", "name": "Updated name", "locationOptions": { "availableInAllLocations": true }, "eventsSchedule": { "scheduleId": "c0091359-7007-4288-be59-dccade075472" } } }
Event TriggersThis method triggers the following events:
Did this help?

POST

Bulk Delete Resources


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes multiple resources.

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.
Endpoint
POST
https://www.wixapis.com/bookings/v2/bulk/resources/delete

Body Params
idsArray <string>Requiredformat GUIDmaxItems 50

The IDs of the resources to delete.

Response Object
resultsArray <BulkResourceResult>

The result of each resource removal.


bulkActionMetadataBulkActionMetadata

Delete statistics.

Bulk Delete Resources Example 1
Request
cURL
Title: Delete multiple resources.
Response
JSON
curl -X POST \ 'https://www.wixapis.com/bookings/v2/bulk/resources/delete' \ -H 'Authorization: <AUTH>' \ -d '{ "ids": [ "133b8ace-64c9-45c7-bb7e-e667f29a4e8c", "3cb4338c-3792-44ba-9259-c73c86b0cd89" ] }'
Event TriggersThis method triggers the following events:
Did this help?

POST

Query Resources


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Query resources using WQL - Wix Query Language.

For field support for filters and sorting, see Resources: Filtering and Sorting.

Permissions
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v2/resources/query

Body Params
queryQuery

WQL expression.

Response Object
resourcesArray <Resource>

The retrieved Resources.


pagingMetadataPagingMetadata

Paging metadata

Query resources, filtering by resource type and providing a limit to the number of results returned.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/bookings/v2/resources/query' \ -H 'Authorization: <AUTH>' \ -d '{ "query": { "filter": { "type": { "$eq": "dd7790c7-f3ac-4821-accb-52ed385fd932" } }, "cursorPaging": { "cursor": null, "limit": 100 } } }'
Response
JSON
{ "resources": [ { "id": "ef5f8d3d-9269-490c-a067-a3d226fcb5d8", "revision": "1", "createdDate": "2024-11-22T14:02:34.993Z", "updatedDate": "2024-11-22T14:02:34.993Z", "name": "Small meeting room", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "808dfb00-0a74-4e70-bb3b-f96ff6ba1246" } ] } }, "eventsSchedule": { "scheduleId": "ee500718-7ce3-478a-89fb-1d839a37e324" } }, { "resource": { "id": "ffedf9dc-932d-439f-b1f4-e42b2a5a8bb5", "revision": "1", "createdDate": "2024-11-22T13:36:47.104Z", "updatedDate": "2024-11-22T13:36:47.104Z", "name": "Meeting room with conference system", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "1295e5ff-ecb3-41bc-8b6f-7345792e5ec0" } ] } }, "eventsSchedule": { "scheduleId": "e263b1ca-a1e9-45bf-a39c-044e97c63500" } } } ], "pagingMetadata": { "count": 2, "cursors": {}, "hasNext": false } }
Did this help?

POST

Count Resources


Developer Preview

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.

Use WQL filter to define the criteria.

Permissions
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v2/resources/count

Body Params
filterstruct

Filter to apply on resources to count.


searchSearchdeprecated
Response Object
countinteger

The number of resources matching the given filter.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/bookings/v2/resources/count' \ -H 'Authorization: <AUTH>' \ -d '{}'
Response
JSON
{ "count": 4 }
Did this help?

Resource Created


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered for each resource that is created.

This event has the same structure as Resource Created.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.resources.v2.resource.


slugstring

Event name. Expected created.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


createdEventCreatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.resources.v2.resource_created", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

ResourceCreated
JSON
{ "id": "02c1a7da-18fb-4e5e-b32f-49a19fd722a7", "entityFqdn": "wix.bookings.resources.v2.resource", "slug": "created", "entityId": "40435ea0-f5d3-448b-977a-2e3e365075e0", "createdEvent": { "entity": { "id": "40435ea0-f5d3-448b-977a-2e3e365075e0", "revision": "1", "createdDate": "2024-11-25T15:45:16.540Z", "updatedDate": "2024-11-25T15:45:16.540Z", "name": "Room 1", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "7a02a881-9711-489a-9a37-eef331acff8e" } ] } }, "eventsSchedule": { "scheduleId": "354e9dbc-4005-4019-85c6-2c0dcdae198b" } } }, "eventTime": "2024-11-25T15:45:16.671040653Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "1" }
Did this help?

Resource Deleted


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered for reach resource that is deleted.

This event has the same structure as Resource Deleted.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.resources.v2.resource.


slugstring

Event name. Expected deleted.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


deletedEventstruct

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.resources.v2.resource_deleted", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

ResourceDeleted
JSON
{ "id": "11ac4dce-969c-42e2-a031-fbea25dde2f9", "entityFqdn": "wix.bookings.resources.v2.resource", "slug": "deleted", "entityId": "40435ea0-f5d3-448b-977a-2e3e365075e0", "deletedEvent": { "movedToTrash": true }, "eventTime": "2024-11-25T16:00:06.736054548Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "12" }
Did this help?

Resource Updated


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a resource is updated.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.resources.v2.resource.


slugstring

Event name. Expected updated.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


updatedEventUpdatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.resources.v2.resource_updated", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

ResourceUpdated
JSON
{ "id": "6be1f920-3773-4b33-a3da-c36f29e5245f", "entityFqdn": "wix.bookings.resources.v2.resource", "slug": "updated", "entityId": "40435ea0-f5d3-448b-977a-2e3e365075e0", "updatedEvent": { "currentEntity": { "id": "40435ea0-f5d3-448b-977a-2e3e365075e0", "revision": "2", "createdDate": "2024-11-25T15:45:16.540Z", "updatedDate": "2024-11-25T15:53:54.620Z", "name": "Room 2nd floor", "typeId": "dd7790c7-f3ac-4821-accb-52ed385fd932", "locationOptions": { "availableInAllLocations": false, "specificLocationOptions": { "availableInBusinessLocations": true, "businessLocations": [ { "locationId": "7a02a881-9711-489a-9a37-eef331acff8e" } ] } }, "eventsSchedule": { "scheduleId": "354e9dbc-4005-4019-85c6-2c0dcdae198b" } } }, "eventTime": "2024-11-25T15:53:54.736149543Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "2" }
Did this help?