updateItemType
put
/ccadmin/v1/itemTypes/{id}
Update Item Type. Update an existing item type based on ID.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueID of item type.
Body Parameter
Root Schema : updateItemType_request
{
"displayName":"TestItemType1",
"count":0,
"id":"TestItemType1",
"variants":[
],
"specifications":[
{
"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
}
]
}
- displayName
-
Type:
stringRequired:trueDisplay name of product type. - forceCascadeDelete
-
Type:
booleanSet to true to delete all data associated with any removed specifications. - id
-
Type:
stringID of existing product type. - parent
-
Type:
stringParent Type of current requested item type. It takes product as default parent for custom types. - specifications
-
Type:
arrayspecificationsAdditional Properties Allowed:Array of specifications for this item type.
Nested Schema : specifications
Nested Schema : items
Type:
object- default
-
Type:
stringDefault value for this specification. - dimension
-
Type:
booleanFlag for if this specification is a dimension. - hidden
-
Type:
booleanFlag for if the specification should be hidden on the UI - id
-
Type:
stringRequired:trueID of the specification. - internalOnly
-
Type:
booleanFlag for if this specification is internal only. - itemType
-
Type:
stringType of the parent item type. - label
-
Type:
stringRequired:trueLabel to display for this specification. - length
-
Type:
integerMaximum length of this specification - listingVariant
-
Type:
boolean - localizable
-
Type:
booleanFlag for if this property can be localized. - multiSelect
-
Type:
booleanFlag for if this property is multi-selectable. - required
-
Type:
booleanFlag to determine if this specification is required. - searchable
-
Type:
booleanFlag for if this specification is searchable. - textSearchable
-
Type:
booleanFlag for if this property is text searchable. - type
-
Type:
stringData type of specification. - uiEditorType
-
Type:
stringThe UI editor type.This property is for Item Types. - writable
-
Type:
booleanFlag for if this property is writable.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateItemType_response
- count
-
Type:
integerNumber of products of the current user-defined product type. - displayName
-
Type:
stringDisplay name of item type. - id
-
Type:
stringID of product type. - propertiesOrder
-
Type:
arraypropertiesOrderAdditional Properties Allowed:List of properties in ascending order. This is for Item Types. - specifications
-
Type:
arrayspecificationsAdditional Properties Allowed:List of specifications for user-defined item type. - variants
-
Type:
arrayvariantsAdditional Properties Allowed:List of variants for user-defined item type.
Nested Schema : propertiesOrder
Nested Schema : specifications
Nested Schema : variants
Nested Schema : items
Type:
object- default
-
Type:
stringDefault value of specificaiont. - dimension
-
Type:
stringDimension of specification. - editableAttributes
-
Type:
arrayeditableAttributesAdditional Properties Allowed:List of editable attributes - id
-
Type:
stringID of specification. - internalOnly
-
Type:
booleanWhether variant is internal. - itemType
-
Type:
stringItem type for user-defined type. - label
-
Type:
stringLabel for new item type. - length
-
Type:
booleanLength of type supported. - localizable
-
Type:
booleanWhether specification is localizable or not. - multiSelect
-
Type:
numberWhether multi-select search facet or not. - required
-
Type:
numberWhether specification is required or not. - searchable
-
Type:
booleanWhether item searchable or not. - textSearchable
-
Type:
booleanWhether text is searchable or not. - type
-
Type:
stringData type of specification. - uiEditorType
-
Type:
stringThe UI editor type.This property is for Item Types. - wildcardSearchable
-
Type:
booleanWhether wildcard is searchable or not. - writable
-
Type:
stringWhether writable or not.
Nested Schema : editableAttributes
Nested Schema : items
Type:
object- default
-
Type:
stringDefault editable attribute. - dimension
-
Type:
stringDimensions of item type. - hidden
-
Type:
booleanWhether item is hidden. - internalOnly
-
Type:
booleanWhether specifications are internal. - label
-
Type:
stringLabel for the item type. - order
-
Type:
integerOrder count of item type. - required
-
Type:
booleanWhether it is required or not. - searchable
-
Type:
booleanWhether item searchable or not. - textSearchable
-
Type:
booleanWhether variant is searchable or not. - wildcardSearchable
-
Type:
booleanWhether wildcard searchable or not.
Nested Schema : items
Type:
object- default
-
Type:
stringDefault value of variant. - dimension
-
Type:
stringDimension of variant. - editableAttributes
-
Type:
arrayeditableAttributesAdditional Properties Allowed:List of editable attributes - id
-
Type:
stringID of variant. - internalOnly
-
Type:
booleanWhether variant is internal. - itemType
-
Type:
stringItem type for user-defined product type. - label
-
Type:
stringLabel for new product type. - listingVariant
-
Type:
booleanWhether listing should be done based on this variant. - localizedValues
-
Type:
objectlocalizedValuesAdditional Properties Allowed:{ "type":"string" }Localized values for variant. Key is option value in default locale, value is option value in specified locale - textSearchable
-
Type:
booleanWhether text is searchable or not. - type
-
Type:
stringData type of variant. - values
-
Type:
arrayvaluesAdditional Properties Allowed:Values for variant. - variantBasedDisplay
-
Type:
booleanWhether this variant based display should be allowed - wildcardSearchable
-
Type:
booleanWhether wildcard is searchable or not. - writable
-
Type:
stringWhether writable or not.
Nested Schema : editableAttributes
Nested Schema : localizedValues
Type:
object-
Type:
string
Localized values for variant. Key is option value in default locale, value is option value in specified locale
Nested Schema : values
Nested Schema : items
Type:
object- default
-
Type:
stringDefault editable attribute. - dimension
-
Type:
stringDimensions of item type. - hidden
-
Type:
booleanWhether item is hidden. - internalOnly
-
Type:
booleanWhether variant is internal. - label
-
Type:
stringLabel for the item type. - listingVariant
-
Type:
booleanWhether listing should be done based on this variant. - order
-
Type:
integerOrder count of item type. - required
-
Type:
booleanWhether it is required or not. - searchable
-
Type:
booleanWhether item searchable or not. - textSearchable
-
Type:
booleanWhether variant is searchable or not. - variantBasedDisplay
-
Type:
booleanWhether this variant based display should be allowed - wildcardSearchable
-
Type:
booleanWhether wildcard searchable or not.
Example application/json
{
"displayName":"TestItemType1",
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadminui/v1/itemTypes/TestItemType1"
}
],
"id":"TestItemType1",
"specifications":[
{
"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- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"displayName": "TestItemType1",
"count": 0,
"id": "TestItemType1",
"variants": [],
"specifications": [{
"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
}]
}
Sample Response Payload returned by endpoint:
{
"displayName": "TestItemType1",
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccadminui/v1/itemTypes/TestItemType1"
}],
"id": "TestItemType1",
"specifications": [{
"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
}]
}