To add custom properties to a shopper type, issue a PUT request to the /ccadmin/v1/shopperTypes/{id} endpoint on the administration server. Use the following format:

The following example shows a sample request for adding two custom properties to the user shopper type:

PUT /ccadmin/v1/shopperTypes/user HTTP/1.1
Authorization: Bearer <access_token>
x-ccasset-language: en
Content-Type: application/json

{ "properties": {
     "loyaltyProgramMember": {
         "label": "Member of loyalty program?",
         "type": "checkbox",
         "uiEditorType": "checkbox",
         "internalOnly": true,
         "default": false,
         "required": true,
         "audienceVisibility": "all"
     },
     "favoriteWebSite": {
         "label": "Favorite Web Site",
         "type": "shortText",
         "uiEditorType": "shortText",
         "internalOnly": false,
         "default": null,
         "required": false,
         "audienceVisibility": "all"
}}}

See Settable attributes of shopper type properties for information about specifying the attribute values.

The following is a portion of the response that shows the new properties:

{
  ...
"properties": {
     ...
    "loyaltyProgramMember": {
         "writable": true,
         "localizable": false,
         "label": "Member of loyalty program?",
         "type": "checkbox",
         "uiEditorType": "checkbox",
         "textSearchable": false,
         "multiSelect": null,
         "dimension": false,
         "internalOnly": true,
         "default": false,
         "audienceVisibility": "all"
         "editableAttributes": [
             "textSearchable",
             "multiSelect",
             "dimension",
             "internalOnly",
             "default",
             "label",
             "required",
             "audienceVisibility",
             "searchable"
         ],
         "length": 19,
         "required": true,
         "searchable": false
         },
    "favoriteWebSite": {
         "writable": true,
         "localizable": false,
         "label": "Favorite Web Site",
         "type": "shortText",
         "uiEditorType": "shortText",
         "textSearchable": false,
         "multiSelect": null,
         "dimension": false,
         "internalOnly": false,
         "default": null,
         "audienceVisibility": "all"
         "editableAttributes": [
             "textSearchable",
             "multiSelect",
             "dimension",
             "internalOnly",
             "default",
             "label",
             "required",
             "audienceVisibility",
             "searchable"
         ],
         "length": 254,
         "required": false,
         "searchable": false
         },
         ...
     }
     ...
}

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