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 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 ID of a custom property must include the underscore character (_). This ensures that the ID will not conflict with any properties that Commerce Cloud adds to orders in the future. The endpoint produces an error if you attempt to create a custom property without an underscore in its ID.

The following example shows a sample request for adding a custom property to the order order type:

{
 "properties": {
     "gift_message": {
         "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": {
     ...
       "gift_message": {
            "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
         },
         ...
     }
     ...
}

Copyright © 1997, 2019 Oracle and/or its affiliates. All rights reserved. Legal Notices