Setup
To use the SiteProperties API, install the @wix/business-tools
package using npm or Yarn:
1npm install @wix/business-tools
or
1yarn add @wix/business-tools
Then import { siteProperties }
from @wix/business-tools
:
1import { siteProperties } from '@wix/business-tools'
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves site properties
The getSiteProperties()
function returns a promise that resolves to the site properties.
Permission Scopes
For app development, you must have one of the following permission scopes:function getSiteProperties(): Promise<PropertiesReadResponse>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a site's business contact information.
The updateBusinessContact()
function returns a Promise that resolves when the site's contact information is updated.
Note:
- Only the fields included in the
fields
parameter will be updated, even if they are included in thebusinessContact
parameter.
Permission Scopes
For app development, you must have one of the following permission scopes:function updateBusinessContact(businessContact: BusinessContactData): Promise<void>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a site's business profile information.
The updateBusinessProfile()
function returns a Promise that resolves when the site's business profile information is updated.
Note:
- Only the fields included in the
fields
parameter are updated, even if they are included in thebusinessProfile
parameter.
Permission Scopes
For app development, you must have one of the following permission scopes:function updateBusinessProfile(businessProfile: BusinessProfileData): Promise<void>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates the default location's business schedule.
The updateBusinessSchedule()
function returns a Promise that resolves when the site's business schedule is updated.
Note:
- The
updateBusinessSchedule()
function overwrites the current business schedule.businessSchedule
is an array, so it must be written in its entirety. Therefore, you must modify the existing array and pass it in the function call.
Permission Scopes
For app development, you must have one of the following permission scopes:function updateBusinessSchedule(businessSchedule: BusinessSchedule): Promise<void>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a site's consent policy.
The updateConsentPolicy()
function returns a Promise that resolves when the site's consent policy is updated.
Permission Scopes
For app development, you must have one of the following permission scopes:function updateConsentPolicy(consentPolicy: ConsentPolicy): Promise<void>