About the Data Extension Schema API

A data extension schema allows you to define and validate the structure of additional custom fields that can be dynamically added to Wix API objects. This schema acts as a blueprint, describing the properties, data types, and constraints for these custom extendedFields fields, based on a JSON schema as part of the schema plugin extension. For example, a data extension schema can describe custom shipping data added to the Wix eCommerce Checkout object.

The Data Extension Schema API enables you to:

Learn more about reading and writing schema plugin fields.

User-defined data extension schemas

A user-defined data extension schema is created when a Wix user creates their own extended fields. This schema is saved under a dedicated _user_fields namespace. For example, Wix users can add their own fields to the checkout flow in the site's dashboard under Settings > Checkout > Checkout form when they edit the checkout form:

Checkout extended fields

The resulting user-defined data extension is saved in the _user_fields namespace.

Before you begin

It's important to note the following before starting to code:

  • App schema plugin extensions, including their JSON schemas, are created and maintained in an app dashboard. This API only supports creating and updating user-defined schemas.
  • Schema plugin extensions are supported by select Wix API objects. Always check that the object you would like to extend includes a property named extendedFields.
  • This API supports retrieving data extension schemas from multiple namespaces in a single call.
  • Data extension schemas are supported by select Wix API service entities. Always check that the service object you would like to extend supports this functionality.
  • namespace name limitations:
    • Can't include "Wix".
    • Only supports lowercase letters, numbers, hyphens, and underscores.
    • Max length: 164 characters.
    • Once set, namespace names can't be changed.

Use cases

Terminology

  • Data extension schema: A JSON schema defining the data structure of the custom fields to add to a Wix object.
  • FQDN: Fully qualified domain name, a unique identifier for a Wix object. Learn more about FQDNs.
  • Namespace: A unique identifier for your app or project. Expected format is @myCompany/myAppName. See limitations in the Before you begin section above.
  • Schema plugin extension: Specific functionality that extends a Wix object with custom fields, nested in the object called extendedFields.
  • User-defined schema: The schema created when a Wix user creates their own extended fields. This schema is created with the namespace: _user_fields.
Did this help?