This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates an area.
When Arrivals is installed on a site, an area with one entrance, the default entrance of that location, is created at the site's default location. Both get a default name in the site's language ("Main area" and "Main entrance" in English), which the owner can rename. A site with no default location yet gets no area at install; the dashboard's setup creates it once the site has a location. Use Create Area for the other areas of a business. To take an area out of use later, call Archive Area.
The request body must include name and at least one entrance with a name; entrance IDs are assigned by
the server. Each location has at most one default entrance across its areas: marking an entrance defaultEntrance
makes it the default of the area's location and clears the entrance that was, in another area of that
location: that area's revision increments and an Area Updated event fires for it. Marking more than one fails with
MULTIPLE_DEFAULT_ENTRANCES. With none marked, the new area's first entrance becomes the default only when its
location has none. A new area is ACTIVE. A site can have at most 90 active areas: creating another fails with
MAX_AREAS_REACHED; archive or delete one first. A policy sent must name a formId on
every intake form (a form without blocksEntry only warns). Scheduled events admit only when
policy.scheduledEventsPolicy.entryGrantingAppIds names at least one app, and then policy.scheduledEventsPolicy.entryWindow
is required with both of its values; without it the call fails with ENTRY_WINDOW_REQUIRED, and with both values 0 it fails
with EMPTY_ENTRY_WINDOW. There is no default window on the server. An area created without a policy gets one where scheduled events do not admit and no form is required,
so a returned area always has a complete policy.
Which plans are allowed into the area is not set here: connect them on the plans' benefits, with the area's
id as the Benefit Programs item.
You can only call this method when authenticated as a Wix app or Wix user identity.
There are 6 errors with this status code.
There are 3 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.