Areas: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Set up a new business

A business that just installed Arrivals needs its areas, entrances, and plans in place before site collaborators can scan clients in. Most sites already have their first area, created at install.

To set up a new business, your app can:

  1. Call Query Areas to get the area created when Arrivals was installed, with one entrance (the location's default entrance), at the site's default location. Both have a default name in the site's language; the response below is from an English site ("Main area", "Main entrance"). When the site already has an area, your app doesn't create the first one; creating one of its own leaves the site with two. The response carries the area's id, locationId, revision, and its entrance's id:

    Copy

    If Query Areas returns no areas, the site had no default location when Arrivals was installed: a site gets one once its business info has an address. Have the business add its address or a location (in its business info, or with the Locations API's Create Location, with an address: a default location without one isn't kept). Then call Create Area at the new location's id, with one entrance, and continue with its id, revision, and entrance id:

    Copy
  2. Connect the business's active pricing plans to the area. An area is a benefit item of a plan: the business owner connects it in the plan editor of the Pricing Plans dashboard, or your app calls Benefit Programs' Add Items to Benefit. poolDefinitionId and benefitKey identify the plan's benefit (from Get Pool Definition or Query Pool Definitions), and itemReferences[].externalId is the area's id. The benefit's provider app must be Arrivals, and the item appears shortly after the call, not in the same request:

    Copy

    A plan created later is connected the same way; nothing connects automatically after setup.

  3. Optionally, call Update Area to rename the area and its entrance, and to move the area to another location of the business. Send the revision from step 1 and the whole entrances list, with the existing entrance's id:

    Copy
  4. Call Create Area for each further part of the business, such as a pool or a cycle studio, with its own entrances. A location keeps its default entrance unless you mark another of its entrances defaultEntrance, which moves the default there; an area at a location with no area yet gets it.

Add an entrance to an area

A business opens a second way into an area, such as a side door, and pairs a new device to it.

To add the entrance, your app can:

  1. Call Get Area to read the current entrances and revision.

  2. Call Update Area with the whole list: every existing entrance with its id, and the new one without it:

    Copy
  3. The response carries the new entrance with the ID the server assigned. When a guest arrives at it, pass that ID as arrival.area.entranceId to Create Arrival and as entranceId to Check Eligibility.

Build the scanner's picker

Site collaborators who scan clients in pick the entrance they are standing at once per scanning position.

To show them where they can scan, your app can:

  1. Call Query Areas filtered to active areas at the current location:

    Copy
  2. Offer each area with its entrances; preselect the location's default entrance, the one whose defaultEntrance is true.

  3. A location can have no active area: LAST_ACTIVE_AREA protects only the site's last active area, so on a site with several locations one can be left with none. When the query returns nothing, show site collaborators that there is nowhere to scan at this location, and point the owner to the dashboard to add or unarchive an area.

  4. Hide the picker entirely when the location has a single active area with a single entrance.

List the forms an area will require

A pool will require a signed swim waiver before a client swims, and a photo consent that doesn't block entry. Intake forms aren't checked at entry yet: they're validated and stored on the area's policy, and until the check ships a client is evaluated on their plans and scheduled events only.

Prerequisite: The forms must already exist in the Intake Forms app, installed on the site: create them there first and use their IDs. Otherwise Update Area fails with INTAKE_FORM_NOT_FOUND or INTAKE_FORM_APP_NOT_INSTALLED.

To list the forms on the pool's policy, your app can:

  1. Call Update Area for the pool with its policy.intakeForms:

    Copy

    The response returns the area with both forms on its policy.

Let booked clients in on their class

A studio wants clients who booked a class to get in on that booking, without spending a plan credit.

To let a client who is booked into a class enter on that booking, your app can:

  1. Call Get Area to read the current revision.

  2. Call Update Area with policy.scheduledEventsPolicy naming Wix Bookings' app ID and an entry window, here from 15 minutes before the start until 10 minutes after:

    Copy

    From the next scan, a client booked into a scheduled event at the area's location is admitted on it inside the window, and nothing is redeemed. Sending entryGrantingAppIds without an entryWindow fails with ENTRY_WINDOW_REQUIRED, and an entryWindow with both values 0 fails with EMPTY_ENTRY_WINDOW.

Retire an area without losing its history

A business closes a part of it, such as a studio room, and wants its past arrivals to stay in reports.

To retire the area, your app can:

  1. Call Archive Area with the area's ID. The area's status becomes ARCHIVED. While Pricing Plans is enabled on the site, the area is also removed from every plan benefit that grants entry into it; unarchiving doesn't put it back. Archiving the site's last active area fails with LAST_ACTIVE_AREA: create or unarchive another area first.

  2. Refresh the scanner's picker with Query Areas. The archived area no longer appears among active areas. Past arrivals recorded in the area keep referencing it, so history and reports stay intact.

Remove an area created by mistake

An owner created an area by mistake and wants it gone, not archived.

To remove the area, your app can:

  1. Call Delete Area with the area's ID. The area is removed, and the Area Deleted event fires. While Pricing Plans is enabled on the site, it is also removed from every plan benefit that grants entry into it. Deleting the site's last active area fails with LAST_ACTIVE_AREA: create or unarchive another area first. Arrivals already recorded in the area keep its ID and name.

To close an area and keep the option to bring it back, call Archive Area instead, as in the previous flow.

Last updated: 30 November 2026

Did this help?