To use the generalInfo API, import wixSiteBackend
from the wix-site-backend
module:
Gets the physical address of the site's business.
The getAddress()
function returns a Promise that resolves to the site's
corresponding physical address information.
The retrieved address is the address that has been entered in the General Info section of your site's Dashboard.
function getAddress(): Promise<GeneralInfoAddress>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getAddress = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getAddress();
});
/*
* {
* "street": "235 W 23rd St",
* "city": "New York",
* "country": "USA",
* "state": "NY",
* "zip": "10011",
* "hint": {
* "text": "green building",
* "placement": "BEFORE"
* },
* "isPhysical": true,
* "googleFormattedAddress": "235 W 23rd St, New York, NY, 10011",
* "streetNumber": "235",
* "apartmentNumber": "12",
* "coordinates": {
* "latitude": "40.744869",
* "longitude": "-73.996736"
* }
* }
*/
Gets the site business name.
The getBusinessName()
function returns a Promise that resolves to the site's
business name information.
The retrieved business name is the name that has been entered in the General Info section of your site's Dashboard.
function getBusinessName(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getBusinessName = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getBusinessName(); // "My Business Name"
});
Gets the business hours of the site's business.
The getBusinessSchedule()
function returns a Promise that resolves to the site's
corresponding business hours information.
The retrieved schedule is the schedule that has been entered in the General Info section of your site's Dashboard.
function getBusinessSchedule(): Promise<GeneralInfoSchedule>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getBusinessSchedule = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getBusinessSchedule();
});
/*
* {
* "periods": [
* {
* "openDay": "MONDAY",
* "openTime": "08:00",
* "closeDay": "MONDAY",
* "closeTime": "17:00"
* },
* {
* "openDay": "THURSDAY",
* "openTime": "09:00",
* "closeDay": "THURSDAY",
* "closeTime": "18:00"
* }
* ],
* "specialHourPeriod": [
* {
* "startDate": "31-12-2018",
* "endDate": "01-01-2019",
* "isClosed": true,
* "comment": "new year eve"
* }
* ]
* }
*/
Gets the site category information.
The getCategories()
function returns a Promise that resolves to the site's
category information.
The retrieved category information is the information that has been entered in the General Info section of your site's Dashboard.
function getCategories(): Promise<GeneralInfoCategories>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getCategories = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getCategories();
});
/*
* {
* "primary": "business",
* "secondary": ["technology-apps"]
* }
*/
Gets the site description.
The getDescription()
function returns a Promise that resolves to the site's
description information.
The retrieved description is the description that has been entered in the General Info section of your site's Dashboard.
function getDescription(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getDescription = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getDescription(); // "Description text."
});
Gets the email address used for notifications of activities on your site.
The getEmail()
function returns a Promise that resolves to the site's
email information.
The retrieved email address is the address that has been entered in the General Info section of your site's Dashboard.
function getEmail(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getEmail = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getEmail(); // "some@email.com"
});
Gets the fax number used for notifications of activities on your site.
The getFax()
function returns a Promise that resolves to the site's
fax number information.
The retrieved fax number is the fax number that has been entered in the General Info section of your site's Dashboard.
function getFax(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getFax = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getFax(); // "+ 555-55-5556"
});
Gets site language information.
The getLanguage()
function returns a Promise that resolves to the site's
language information.
The retrieved language information is the information that has been entered in the General Info section of your site's Dashboard.
function getLanguage(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getLanguage = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getLanguage(); // "en"
});
Gets site locale information.
The getLocale()
function returns a Promise that resolves to the site's
locale information.
The retrieved locale information is the information that has been entered in the General Info section of your site's Dashboard.
function getLocale(): Promise<GeneralInfoLocale>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getLocale = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getLocale();
});
/*
* {
* "country": "US",
* "languageCode": "en"
* }
*/
Gets the site logo file name.
The getLogo()
function returns a Promise that resolves to the site's
logo file name information.
The retrieved logo is the logo that has been entered in the General Info section of your site's Dashboard.
function getLogo(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getLogo = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getLogo();
});
// "791f5e_3217d51097ed4ea7a51deaa583cfbe65~mv2.gif"
Gets site multilingual information.
The getMultilingual()
function returns a Promise that resolves to the site's
multilingual information.
The retrieved multilingual information is based on the languages set using Wix Multilingual.
function getMultilingual(): Promise<GeneralInfoLanguages>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getMultilingual = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getMultilingual();
});
/*
* {
* "supportedLanguages": [
* {
* "languageCode": "en",
* "locale": {
* "country": "US",
* "languageCode": "en"
* },
* "iconUrl": "someUrl",
* "isPrimary": true
* }
* ],
* "autoRedirect": true
* }
*/
Gets site payment currency information.
The getPaymentCurrency()
function returns a Promise that resolves to the site's
payment currency information.
The retrieved payment currency information is the information that has been entered in the General Info section of your site's Dashboard.
function getPaymentCurrency(): Promise<string>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getPaymentCurrency = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getPaymentCurrency(); // "USD"
});