This article shows you how to add custom fields to a Wix API object using data extension schemas and the Data Extension Schema API.
First, determine the FQDN of the supported Wix API object you want to extend.
The examples in this article use the eCommerce Order object FQDN:
Call List Data Extension Schemas to check if a data extension schema already exists for the FQDN, and whether the _user_fields namespace is present. The _user_fields namespace is reserved for site-specific custom fields. If it exists, collect the data extension schema ID and its existing data for the next step.
Based on whether a site-specific _user_fields schema exists, you'll either create a new one or update the existing one.
Once you've added a custom field to an object, call the relevant method for the target API object to set the values of your custom fields. For example, when calling Create Order, include your custom field values in the method parameters:
As a result, the custom fields will be available in the extendedFields property of the API object. To access, call the relevant method for the target API object to get the values of your custom fields.
For example, when calling Get Order, the custom fields will appear as: