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
- application/json
Path Parameters
-
id: string
ID of the item type.
Query Parameters
-
allowNonUnderscoreNames(optional): boolean
If true, allow the creation of custom property names that do not contain an underscore('_').
-
forceCascadeDelete: boolean
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: string
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'.
Root Schema : updateItemType_request
Type:
Show Source
object
-
displayName:
string
Display name of item type.
-
specifications(optional):
array specifications
Array of specifications for this item type.
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 : items
Type:
Show Source
object
-
default(optional):
string
Default value for this specification.
-
dimension(optional):
boolean
Flag for if this specification is a dimension.
- hidden(optional): boolean
-
id:
string
ID of the specification.
-
internalOnly(optional):
boolean
Flag for if this specification is internal only.
-
itemType(optional):
string
Type of the parent item type.
-
label:
string
Label to display for this specification.
-
length(optional):
integer
Maximum length of this specification
-
listingVariant(optional):
boolean
-
localizable(optional):
boolean
Flag for if this property can be localized.
-
multiSelect(optional):
boolean
Flag for if this property is multi-selectable.
-
readAccessRight(optional):
string
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.)
-
readRole(optional):
string
Can be set to a single role id, in which case a user must have that role in order to read the property.
-
readSecurityLevel(optional):
string
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.
-
required(optional):
boolean
Flag to determine if this specification is required.
-
searchable(optional):
boolean
Flag for if this specification is searchable.
-
securityMaskingValue(optional):
string
A value to return if the read fails the security check and the readSecurityLevel is ignore.
-
shopperReadable(optional):
string
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.
-
shopperWritable(optional):
string
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.
-
textSearchable(optional):
boolean
Flag for if this property is text searchable.
-
type(optional):
string
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
-
uiEditorType(optional):
string
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
-
validationPattern(optional):
string
Regex string for the validations to be applied on the field. Applicable only for ContactInfo item type.
-
writable(optional):
boolean
Flag for if this property is writable.
-
writeAccessRight(optional):
string
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.)
-
writeRole(optional):
string
Can be set to a single role id, in which case a user must have that role in order to write the property.
-
writeSecurityLevel(optional):
string
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.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : updateItemType_response
Type:
Show Source
object
-
count(optional):
integer
Number of products of the current user-defined product type.
-
displayName(optional):
string
Display name of item type.
-
id(optional):
string
ID of item type.
-
propertiesOrder(optional):
array propertiesOrder
List of properties in ascending order. This is for Item Types.
-
specifications(optional):
array specifications
List of specifications for user-defined item type.
-
variants(optional):
array variants
List of variants for user-defined product type.
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 : items
Type:
Show Source
object
-
default(optional):
string
Default value of specificaiont.
-
dimension(optional):
string
Dimension of specification.
-
editableAttributes(optional):
array editableAttributes
List of editable attributes
-
id(optional):
string
ID of specification.
-
internalOnly(optional):
boolean
Whether variant is internal.
-
itemType(optional):
string
Item type for user-defined type.
-
label(optional):
string
Label for new item type.
-
length(optional):
boolean
Length of type supported.
-
localizable(optional):
boolean
Whether specification is localizable or not.
-
multiSelect(optional):
number
Whether multi-select search facet or not.
-
required(optional):
number
Whether specification is required or not.
-
searchable(optional):
boolean
Whether item searchable or not.
-
textSearchable(optional):
boolean
Whether text is searchable or not.
-
type(optional):
string
Data type of specification.
-
uiEditorType(optional):
string
The UI editor type.This property is for Item Types.
-
validationPattern(optional):
string
Regex string for the validations to be applied on the field. Applicable only for ContactInfo item type.
-
wildcardSearchable(optional):
boolean
Whether wildcard is searchable or not.
-
writable(optional):
string
Whether writable or not.
Nested Schema : items
Type:
Show Source
object
-
default(optional):
string
Default editable attribute.
-
dimension(optional):
string
Dimensions of item type.
- hidden(optional): boolean
-
internalOnly(optional):
boolean
Whether specifications are internal.
-
label(optional):
string
Label for the item type.
-
order(optional):
integer
Order count of item type.
-
required(optional):
boolean
Whether it is required or not.
-
searchable(optional):
boolean
Whether item searchable or not.
-
textSearchable(optional):
boolean
Whether variant is searchable or not.
-
wildcardSearchable(optional):
boolean
Whether wildcard searchable or not.
Nested Schema : items
Type:
Show Source
object
-
default(optional):
string
Default value of variant.
-
dimension(optional):
string
Dimension of variant.
-
editableAttributes(optional):
array editableAttributes
List of editable attributes
-
id(optional):
string
ID of variant.
-
internalOnly(optional):
boolean
Whether variant is internal.
-
itemType(optional):
string
Item type for user-defined product type.
-
label(optional):
string
Label for new product type.
-
listingVariant(optional):
boolean
Whether listing should be done based on this variant.
-
localizedValues(optional):
object localizedValues
Additional Properties Allowed: additionalPropertiesLocalized values for variant. Key is option value in default locale, value is option value in specified locale
-
textSearchable(optional):
boolean
Whether text is searchable or not.
-
type(optional):
string
Data type of variant.
-
values(optional):
array values
Values for variant.
-
variantBasedDisplay(optional):
boolean
Whether this variant based display should be allowed
-
wildcardSearchable(optional):
boolean
Whether wildcard is searchable or not.
-
writable(optional):
string
Whether writable or not.
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 : items
Type:
Show Source
object
-
default(optional):
string
Default editable attribute.
-
dimension(optional):
string
Dimensions of item type.
- hidden(optional): boolean
-
internalOnly(optional):
boolean
Whether variant is internal.
-
label(optional):
string
Label for the item type.
-
listingVariant(optional):
boolean
Whether listing should be done based on this variant.
-
order(optional):
integer
Order count of item type.
-
required(optional):
boolean
Whether it is required or not.
-
searchable(optional):
boolean
Whether item searchable or not.
-
textSearchable(optional):
boolean
Whether variant is searchable or not.
-
variantBasedDisplay(optional):
boolean
Whether this variant based display should be allowed
-
wildcardSearchable(optional):
boolean
Whether wildcard searchable or not.
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|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code