Every Wix API has a Wix object with predefined fields. Depending on your use case, you might want to add custom fields to an object. Data extension schemas let you define the structure of custom fields and add them to Wix objects for a specific site.
For example, if you run a furniture store, you might offer extended warranties. Using a data extension schema, you can define and add a warranty field to the product object.
You can work with data extension schemas in:
You can only extend objects that support data extension schemas. For the list of supported objects, see the Data Extension Schema API.
Supported objects contain an extendedFields property. When you create a data extension schema, you define extended fields that are stored in extendedFields. Extended fields can exist at the following levels:
extendedFields property.extendedFields property of items in an array. For example, each line item in an order has its own extendedFields property.You can manage extended fields for a site in the following ways:
Schemas added using these methods are stored in the _user_fields namespace.
The structure of extended fields is defined using a subset of JSON Schema. This schema acts as a blueprint that defines the data types and constraints for your extended fields.
The following are possible use cases for data extension schemas:
Root-level extensions
Nested field extensions