About Schema Plugin Extensions

Every Wix API has a service object with predefined fields, which can’t be removed or changed. But sometimes, the fields that the object provides aren’t enough. For example, if your app uses the Booking object to help outdoor adventure companies book their services, you may want to include equipment rental as part of the booking. However, the Booking object doesn’t have a field for rentals.

Schema plugins solve this problem. You can use schema plugins to extend an object with additional fields. This allows you to store data that the object doesn’t otherwise support.

As an app developer, you can build upon the base object by adding fields that your app specifically requires. Once added, these fields can be read and written using the object's regular endpoints, just like any other field in the object.

Returning to the Booking object example from before, if your app needs an equipment field in the Booking object, you can add it with a schema plugin. The equipment field becomes a part of the object, and you can use it with the Bookings APIs.

When to use schema plugins

Use a schema plugin when an object doesn’t have a field to support your data. Be aware that many objects contain nested fields that may already meet your app’s needs. Before creating a schema plugin, check the object to make sure you don’t add fields that already exist.

Here are a few possible use cases for schema plugins:

  • Include accessories (such as sports equipment) in the Bookings object.
  • Add a warranty field to the eCommerce Order object.
  • Add a field to the Checkout object giving users the option to send products as a gift.

You’re not restricted to these examples. You can add a schema plugin to any object that supports it and use them in any way that you need.

See also

Currently, you can add extend the following objects with schema plugins:

To learn more about using schema plugins, see:

Did this help?