This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Restores the event's default values from the relevant schedule or MASTER
event.
You must provide fields
to specify which inheritedFields
are restored.
For example, if you've created an event that takes place in a non-default
location with a custom title and capacity, but you want to reset only title
and capacity to default values without affecting the location, provide the
event ID and set fields
to ["TITLE", "CAPACITY"]
.
Refer to the default values article for more information.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the event for which to restore default values.
Fields for which to restore default values.
TIME
restores default values for start
and end
.
Min: 1 field
Information about whether participants of the updated event are notified and the message they receive.
Time zone in IANA tz database format
for calculating adjustedStart
and adjustedEnd
. For example,
America/New_York
or UTC
.
Default: timeZone
specified in the business site properties.
Updated event.
Restores an event's capacity to its default value
curl -X POST \
'https://www.wixapis.com/calendar/v3/events/VYAN5iNZkOn1SQ5LLJVWXxdGqRfcnyxpZ2STCAr7l6SOGCQpMD5CUFjFhdm0f6qhxEBOZWEc3KmJRcx3YgBNyyrcncCZJZkHM9GRGmgUmMJl9lqarOixyy/restore-defaults' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
"fields": [
"CAPACITY"
]
}'
{
"event": {
"id": "VYAN5iNZkOn1SQ5LLJVWXxdGqRfcnyxpZ2STCAr7l6SOGCQpMD5CUFjFhdm0f6qhxEBOZWEc3KmJRcx3YgBNyyrcncCZJZkHM9GRGmgUmMJl9lqarOixyy",
"scheduleId": "132db383-1378-4903-820b-4eebf4242de2",
"externalScheduleId": "4187d1f3-38a2-4cfd-b8f1-6333cd012e33",
"scheduleName": "Hip Hop Groove",
"type": "CLASS",
"status": "CONFIRMED",
"title": "Hip Hop Groove",
"start": {
"localDate": "2024-10-08T11:00:00",
"timeZone": "Europe/Dublin",
"utcDate": "2024-10-08T10:00:00Z"
},
"end": {
"localDate": "2024-10-08T12:00:00",
"timeZone": "Europe/Dublin",
"utcDate": "2024-10-08T11:00:00Z"
},
"adjustedStart": {
"localDate": "2024-10-08T11:00:00",
"timeZone": "Europe/Dublin"
},
"adjustedEnd": {
"localDate": "2024-10-08T12:00:00",
"timeZone": "Europe/Dublin"
},
"timeZone": "Europe/Dublin",
"recurrenceType": "EXCEPTION",
"recurrenceRule": {
"frequency": "WEEKLY",
"interval": 1,
"days": ["TUESDAY"]
},
"recurringEventId": "132db38313784903820b4eebf4242de2d21ab38e72d54c728074f106b33e6c25",
"transparency": "OPAQUE",
"location": {
"type": "BUSINESS"
},
"resources": [
{
"id": "76570209-101f-409b-af97-b445bdb63125",
"name": "Staff Member #1",
"type": "1cd44cf8-756f-41c3-bd90-3e2ffcaf1155",
"scheduleId": "e73bf671-bb59-4488-8d1f-afcf0ebe8d27",
"transparency": "OPAQUE",
"permissionRole": "WRITER"
}
],
"totalCapacity": 50,
"remainingCapacity": 50,
"inheritedFields": [
"TITLE",
"CAPACITY",
"LOCATION",
"TIME_ZONE",
"CONFERENCING_DETAILS",
"RESOURCES",
"PARTICIPANTS",
"TIME"
],
"appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
"permissions": [],
"revision": "4",
"createdDate": "2024-10-07T08:15:05.502Z",
"updatedDate": "2024-10-07T08:16:43.045Z"
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.