You can now use the Wix JavaScript SDK instead of the Velo API for most functionality when developing sites or building apps with Blocks. Learn more about developing websites with the SDK.
Wix's transition to the SDK is a gradual process. At this stage, not all Velo APIs have equivalent SDK modules that can be used for site development or for app creation with Blocks. For functionality that is not yet supported in the SDK, use Velo APIs alongside the SDK.
This article outlines which Velo APIs you should continue to use, and how to find your Velo APIs' functionality in the SDK.
The Velo APIs that should still be used at this stage fall into 2 categories:
APIs that are imported from Velo modules that the SDK doesn't support their functionality: You can find these APIs in the Velo-Only APIs section of the Velo API reference.
$w
$widget
wix-configs-backend
wix-http-functions
wix-realtime-backend
wix-application
: Most wix-application
functionality is not yet available in the SDK. Currently the SDK supports functionality for getDecodedAppInstance()
:
getAppInstance()
from the app-management.appInstances
SDK submodule.wix-editor
wix-widget
: Most wix-widget
functionality is not yet available in the SDK. Currently the SDK supports functionality for:
getProps()
: Use getProp()
from the editor.widget
SDK submodule.setProps()
: Use setProp()
from the editor.widget
SDK submodule.APIs that work by file and name conventions: These APIs may have SDK counterparts, but the SDK versions don't work for site development and for app creation with Blocks. You can find them in the Events & Service Plugins section of the Velo API reference.
The functionality of the Velo APIs listed in the APIs section of the Velo API reference are mostly supported by the SDK. These APIs each fall into one of the following categories:
To learn how to migrate your code from Velo to SDK, see Migrate from Velo to the SDK.
Velo APIs that end in .v2
, such as wix-bookings.v2
, are universal APIs. wix-blog-backend
, wix-ecom-backend
, wix-pro-gallery-backend
, and wix-tags.v1
are also universal APIs.
Universal APIs have direct equivalents in the SDK. These are the backend SDK modules with similar naming to the Velo counterparts. For example, the bookings
SDK module is a direct replacement for the Velo wix-bookings.v2
API.
wix-secrets-backend.v2
: This is a backend API, but it does have an equivalent SDK module.Note: Because the Wix SDK continues to be updated, an equivalent SDK module may have more functionality than its equivalent Velo API, so they may not look identical.
Velo APIs that end in -backend
, such as wix-bookings-backend
, are backend APIs.
Most backend APIs have corresponding universal APIs that contain the same functionality. For example, wix-bookings.v2
contains wix-bookings-backend
functionality. To migrate your code that uses backend APIs to the SDK, use the corresponding universal API's equivalent SDK module. For example, use the bookings
SDK module instead of the Velo wix-bookings-backend
API.
Backend Velo APIs use the suppressAuth
property to prevent permission checks from running. The equivalent functionality in the SDK is elevation. Learn more about elevated permissions.
wix-blog-backend
: This is a universal API.wix-cache-backend
: The cache
SDK module contains this API's functionality.wix-chat-backend
: The inbox.messages
SDK submodule contains this API's functionality.wix-ecom-backend
: This is a universal API.wix-pay-backend
: This API doesn't currently have an SDK replacement. For now, continue using the Velo API.wix-payment-provider-backend
: The payments.pspCallbacks
SDK submodule contains this API's functionality.wix-pro-gallery-backend
: This is a universal API.wix-site-backend
: Migrating this API is a unique case.Velo APIs that end in -frontend
, such as wix-bookings-frontend
, are frontend APIs. wix-mobile
and wix-navigate-mobile
are also frontend APIs.
Frontend APIs have direct equivalents in the SDK. These are the frontend SDK modules with similar naming to the Velo counterparts. For example, the bookings
SDK frontend module is a direct replacement for the Velo wix-bookings-frontend
API.
Frontend SDK methods are asynchronous, even when the Velo equivalent is synchronous.
wix-pay-frontend
: Migrating this API is a unique case.wix-storage-frontend
: This API's equivalent SDK module, storage
, has asynchronous methods. The equivalent Velo methods are synchronous.The following Velo APIs have a unique way to implement their functionality in the SDK.
wix-auth
The wix-auth
Velo API has equivalent functionality in the essentials.auth
SDK submodule.
wix-bookings.v1
The wix-bookings.v1
Velo API has a corresponding universal API, wix-bookings.v2
. Therefore, use the the bookings
SDK module instead of wix-bookings.v1
.
wix-dashboard
The wix-dashboard
Velo API has an equivalent dashboard
SDK module. This module is a host module.
wix-data
The wix-data
Velo API has a replacement items
SDK submodule in the data
SDK module. Note that while this submodule closely mirrors wix-data
, it's not a direct equivalent.
Learn more about migrating from wix-data
to the Data Items SDK.
wix-fetch
Use the native fetch()
to access the functionality of wix-fetch
in the SDK.
The wix-fetch
Velo API has no SDK replacement. This API contains 2 methods:
fetch()
: You can use the native fetch()
by calling this method on the frontend or backend without importing it when using the SDK.getJSON()
: This method does not exist in the SDK. You can convert your getJSON()
calls to fetch()
instead. To get the JSON data from the fetch()
response, call the json()
method.wix-pay-frontend
The wix-pay-frontend
Velo API has 2 sections and each section is handled differently:
startPayment()
: This Velo method doesn't currently have an SDK replacement. For now, continue using the Velo method.currencies
: This Velo API has an equivalent pay.currencies
SDK frontend submodule.wix-search
The wix-search
Velo API doesn't currently have an SDK replacement. For now, continue using the Velo API.
wix-site-backend
The wix-site-backend
Velo API has 2 sections and each section is handled differently:
invalidateCache()
: This Velo method doesn't currently have an SDK replacement. For now, continue using the Velo method.GeneralInfo
: This functionality can be implemented using getSiteProperties()
from the business-tools.siteProperties
SDK submodule.wix-web-module
The wix-web-module
Velo API has an equivalent web-methods
SDK module. This module is a core module.
wix-site-plugins.v1
The wix-site-plugins.v1
Velo API has an equivalent site-plugins
SDK module.
Velo packages don't currently have equivalent SDK packages. In the future, equivalent SDK packages will gradually be released.