This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Archives an area.
An archived area no longer appears in setup or on the scanner, can't be picked in the plan editor, and can't
record new arrivals, but past arrivals that reference it keep resolving. Shortly after the area is archived, it
is removed from every plan benefit that grants entry into it, while Pricing Plans is enabled on the site; a plan
that still holds it shows it in the plan editor by its name followed by "(archived)" in the caller's language, as
in "Pool (archived)" in English, so it can be removed. Unarchiving with
Unarchive Area
does not put it back, so connect it to the
plans' benefits again, with the area's id as the Benefit Programs item.
Archiving and unarchiving are the only ways to change an area's status. Delete Area removes the area itself;
past arrivals keep its ID and name either way.
If the area holds its location's default entrance, the default moves to the first entrance of another active
area at that location: that area's revision increments and an Area Updated event fires for it. With no
other active area there, the location has no default until an area is created, unarchived or moved there.
Archiving an area that is already archived fails with AREA_ALREADY_ARCHIVED. Archiving the site's last
active area fails with LAST_ACTIVE_AREA: create or unarchive another area first. The rule counts the
site's active areas, not a location's: a location can be left with no active area. If the area changes while
it is being archived, the call fails with ALREADY_EXISTS and application code INVALID_REVISION; call it
again.
You can only call this method when authenticated as a Wix app or Wix user identity.
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.