Introduction

 

Developer Preview
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.

 

Note: This module is universal. Functions in this module can run on both the backend and frontend, unless specified otherwise.

With Locations, you can define multiple physical locations for their business. You can also set individual opening hours for each location.

The Locations API allows you to:

Read more about how site owners can manage their location-specific bookings.

To use the Locations API, import { locations } from wix-business-tools.v2:

Copy

Before you begin

It’s important to note the following points before starting to code:

  • The Wix Bookings API doesn't support the businessSchedule object.
  • You can't delete a location. Instead, you can archive a location using the archiveLocation() function.
  • You can't archive the default location.
  • You can't unarchive an archived location.
  • You must pass the full location object in the location parameter when using the updateLocation() function. Currently, you can't partially update a location.
  • locationType isn't currently supported.
  • The status INACTIVE isn't currently supported.

Terminology

  • Type: Describes whether a location is an office, reception, branch or the headquarters.
  • Status: Indicates whether a location is ACTIVE or INACTIVE.

Permissions information

Functions in the Locations API are restricted and only run if you elevate permissions using the wix-auth elevate() function.

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

Was this helpful?
Yes
No