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 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?