Velo to SDK API Mapping

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.

Velo APIs you should continue to use

The Velo APIs that should still be used at this stage fall into 2 categories:

Finding SDK replacements for Velo APIs

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.

Universal APIs

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.

Exceptions:

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.

Backend APIs

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.

Exceptions:

Frontend APIs

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.

Exceptions:

Unique cases

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.

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

Velo packages don't currently have equivalent SDK packages. In the future, equivalent SDK packages will gradually be released.

See also

Did this help?