To add custom properties to an order type, issue a PUT request to the /ccadmin/v1/orderTypes/{id}
endpoint on the administration server. Use the following format:
The request header must specify the
x-ccasset-language
value.The request body is a map where each key is the name of a new property, and each value is an object that specifies the values of the attributes of the property.
Each object is also a map, with each key being the name of an attribute and each value being the corresponding attribute value.
The attributes of order type properties that you can set through Order Types endpoints are the same as the attributes of shopper type properties you can set through Shopper Types endpoints. See Settable attributes of shopper type properties for descriptions of these properties.
The following example shows a sample request for adding a custom property to the order
order type:
{ "properties": { "giftMessage": { "label": "Enter an optional gift message here:", "type": "richText", "uiEditorType": "richText", "internalOnly": false, "required": false } } }
The following is a portion of the response that shows the new property:
{ ... "properties": { ... "giftMessage": { "writable": true, "localizable": false, "label": "Enter an optional gift message here:", "type": "richText", "uiEditorType": "richText", "textSearchable": false, "multiSelect": null, "dimension": false, "internalOnly": false, "default": null, "editableAttributes": [ "textSearchable", "multiSelect", "dimension", "internalOnly", "default", "label", "required", "searchable" ], "length": 4000000, "required": false, "searchable": false }, ... } ... }