This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.
If you have multiple event sites using your app, you may need to sync event categories across these sites. For example, if you've added a new city for some of your concerts, such as "Chicago," you’ll need to create a new category named "Chicago" and apply this change to other sites as well.
To sync the category across all sites:
Call Query Categories on the site where you created a new category.
Extract the entire category
object. Remove unnecessary fields, like createdDate
.
For all other sites, call Query Events and extract the IDs of all relevant events.
Call Create Category on the other sites, passing the new category to each.
Call Bulk Assign Events and assign the new category to all the previously extracted events.
Category ID.
Category name.
Date and time when category was created.
The total number of draft and published events assigned to the category.
Category state. Possible values:
MANUAL
: Category is created manually by the user.
AUTO
: Category is created automatically.
RECURRING_EVENT
: Category is created automatically when publishing recurring events.
HIDDEN
: Category can't be seen.
Default: MANUAL
.
Note: The WIX_EVENTS.MANAGE_AUTO_CATEGORIES permission scope is required to use states other than MANUAL
.
Creates a category.
You can only call this method when authenticated as a Wix app or Wix user identity.
Category to create.
Created category.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Creates multipe categories at once.
You can only call this method when authenticated as a Wix app or Wix user identity.
Categories to create.
Bulk create results.
Metadata of results.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Updates an existing category.
You can only call this method when authenticated as a Wix app or Wix user identity.
Category ID.
Category to update.
Updated category.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.