updateItemType

put

/ccadmin/v1/itemTypes/{id}

Update an existing item type based on ID. Supported item types:
  • commerceItem
  • organization
  • promotion
  • gift-list
  • gift-item
  • organizationRequest
  • profileRequest
  • userSiteProperties
  • profileAgentComment
  • orderAgentComment
  • loyaltyPrograms
  • mailing
  • contactInfo
  • creditCard
  • tokenizedCreditCard
  • hardgoodShippingGroup
  • electronicShippingGroup
  • inStorePickupShippingGroup
  • invoiceRequest
  • onlinePaymentGroup
  • physicalGiftCard
  • customCurrencyPaymentGroup
  • quoteInfo
  • returnComment
  • returnItem
  • inStoreTakeWithShippingGroup
  • category
  • product
  • sku
  • Product sub-types
  • Sku sub-types
  • appeasement
  • appeasementComment
  • appeasementRefund
  • externalAppeasementRefund
  • creditCardAppeasementRefund
  • storeCreditAppeasementRefund
  • tokenizedCreditCardAppeasementRefund
  • onlinePaymentGroupAppeasementRefund
  • physicalGiftCardAppeasementRefund
  • customCurrencyAppeasementRefund

    Request

    Supported Media Types
    Path Parameters
    Query Parameters
    • If true, allow the creation of custom property names that do not contain an underscore('_').
    • Set to true to delete all data associated with any removed item type property. This parameter is only supported by product and sku types and sub-types.
    • Parent type of the item type. Only supported for product and sku types and sub-types. For product item type, its value should be 'product' and for sku item type, it should be 'sku'. Default value is 'product'.
    Header Parameters
    • The ID of the workset that this change will appear in. If this header is missing, the change will be made in the default workset.
    Body ()
    Root Schema : updateItemType_request
    Type: object
    Show Source
    Example:
    {
        "displayName":"TestItemType1",
        "count":0,
        "id":"TestItemType1",
        "variants":[
        ],
        "specifications":[
            {
                "validationPattern":null,
                "itemType":"TestItemType1",
                "hidden":false,
                "length":1000,
                "variantBasedDisplay":false,
                "label":"testProperty1",
                "required":false,
                "searchable":false,
                "writable":true,
                "internalOnly":false,
                "default":null,
                "listingVariant":false,
                "localizable":false,
                "textSearchable":false,
                "id":"testProperty1",
                "dimension":false,
                "multiSelect":false
            }
        ]
    }
    Nested Schema : specifications
    Type: array
    Array of specifications for this item type.
    Show Source
    Nested Schema : items
    Type: object
    Show Source
    • Default value for this specification.
    • Flag for if this specification is a dimension.
    • Flag for if the specification should be hidden on the UI
    • ID of the specification.
    • Flag for if this specification is internal only.
    • Type of the parent item type.
    • Label to display for this specification.
    • Maximum length of this specification
    • Flag for if this property can be localized.
    • Flag for if this property is multi-selectable.
    • Can be set to a single access right id, in which case a user must have that access right in order to read the property. (If readRole is also set, then a user can have the role OR the access right in order to access.)
    • Can be set to a single role id, in which case a user must have that role in order to read the property.
    • Can be set to "deny" or "ignore", with "ignore" being the default behavior. Ignore means that reads will return a masking value rather than the real value: null, default value, or a value set via the securityMaskingValue attribute. Deny means that the property will disappear entirely from responses and direct attempts to read it will result in an error. Deny security is only available on custom properties.
    • Flag to determine if this specification is required.
    • Flag for if this specification is searchable.
    • A value to return if the read fails the security check and the readSecurityLevel is ignore.
    • If set to true, Storefront users will be able to bypass any role or access right security when reading the property on their own profile.
    • If set to true, Storefront users will be able to bypass any role or access right security when writing the property on their own profile.
    • Flag for if this property is text searchable.
    • Data type of specification. Possible values are shortText, richText, number, date or checkbox. Additionally, for category item type, it also supports longText type. Its value must match the value of uiEditorType
    • The UI editor type. This property is for Item Types. Possible values are shortText, richText, number, date or checkbox. Additionally, for category item type, it also supports longText type. Its value must match the value of type
    • Regex string for the validations to be applied on the field. Applicable only for ContactInfo item type.
    • Flag for if this property is writable.
    • Can be set to a single access right id, in which case a user must have that access right in order to write the property. (If writeRole is also set, then a user can have the role OR the access right in order to write the property.)
    • Can be set to a single role id, in which case a user must have that role in order to write the property.
    • Can be set to "deny" or "ignore", with "ignore" being the default behavior. Ignore means that writes will fail silently. Deny means that attempts to write the property will result in an error.
    Back to Top

    Response

    Supported Media Types

    200 Response

    Following model is returned when operation succeeds.
    Body ()
    Root Schema : updateItemType_response
    Type: object
    Show Source
    Nested Schema : propertiesOrder
    Type: array
    List of properties in ascending order. This is for Item Types.
    Show Source
    Nested Schema : specifications
    Type: array
    List of specifications for user-defined item type.
    Show Source
    Nested Schema : variants
    Type: array
    List of variants for user-defined product type.
    Show Source
    Nested Schema : items
    Type: object
    Show Source
    Nested Schema : editableAttributes
    Type: array
    List of editable attributes
    Show Source
    Nested Schema : items
    Type: object
    Show Source
    Nested Schema : items
    Type: object
    Show Source
    Nested Schema : editableAttributes
    Type: array
    List of editable attributes
    Show Source
    Nested Schema : localizedValues
    Type: object
    Additional Properties Allowed
    Show Source
    Localized values for variant. Key is option value in default locale, value is option value in specified locale
    Nested Schema : values
    Type: array
    Values for variant.
    Show Source
    Nested Schema : items
    Type: object
    Show Source
    Example Response (application/json)
    {
        "displayName":"TestItemType1",
        "links":[
            {
                "rel":"self",
                "href":"http://localhost:9080/ccadminui/v1/itemTypes/TestItemType1"
            }
        ],
        "id":"TestItemType1",
        "specifications":[
            {
                "validationPattern":null,
                "itemType":"TestItemType1",
                "hidden":false,
                "length":1000,
                "variantBasedDisplay":false,
                "label":"testProperty1",
                "type":"shortText",
                "required":false,
                "searchable":false,
                "writable":true,
                "internalOnly":false,
                "default":null,
                "listingVariant":false,
                "localizable":false,
                "textSearchable":false,
                "id":"testProperty1",
                "dimension":false,
                "editableAttributes":[
                    "dimension",
                    "multiSelect",
                    "textSearchable",
                    "default",
                    "internalOnly",
                    "order",
                    "listingVariant",
                    "hidden",
                    "label",
                    "required",
                    "variantBasedDisplay",
                    "searchable"
                ],
                "multiSelect":false,
                "order":null
            }
        ]
    }

    Default Response

    The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |20195|Product Type named already exists| |20172|Blank item type id provided| |20194|Invalid product type name provided| |20170|Find Catalog Type Internal Error| |20192|Display name cannot be blank| |20191|Could not find item type| |20190|Update SubType Internal Error|
    Body ()
    Root Schema : errorModel
    Type: object
    Show Source
    Nested Schema : errors
    Type: array
    An optional list of errors if multiple errors were encountered
    Show Source
    Nested Schema : items
    Type: object
    Show Source
    Back to Top