updateBusinessProfile( )


Developer Preview

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.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Business Profile
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
function updateBusinessProfile(
  businessProfile: BusinessProfileData,
  options: UpdateBusinessProfileOptions,
): Promise<void>;
Method Parameters
businessProfileBusinessProfileDataRequired

The site's business profile.


optionsUpdateBusinessProfileOptions
This example uses elevate(), which enables site visitors to call functions without the required permissions. Exercise caution when using elevate() to prevent security vulnerabilities.
JavaScript
import { siteProperties } from "wix-business-tools.v2"; import { elevate } from "wix-auth"; /* Sample businessProfile value: * { * description: 'Whatever the occasion, we have what you need.', * logo: 'a8a52b_bf5596e614d8484e9f1d429ac256e1ad~mv2.jpeg' * } * * Sample fields value: ['description', 'logo'] */ export async function myUpdateBusinessProfileFunction(businessProfile, fields) { try { const elevatedUpdateBusinessProfile = elevate( siteProperties.updateBusinessProfile, ); await elevatedUpdateBusinessProfile(businessProfile, fields); console.log("Successfully updated business profile"); return true; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to void */
Errors
401Unauthenticated

There is 1 error with this status code.

403Permission Denied

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?