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:
string
Required:true
ID 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:
string
Required:true
Display name of product type. - forceCascadeDelete
-
Type:
boolean
Set to true to delete all data associated with any removed specifications. - id
-
Type:
string
ID of existing product type. - parent
-
Type:
string
Parent Type of current requested item type. It takes product as default parent for custom types. - specifications
-
Type:
array
specificationsAdditional Properties Allowed:Array of specifications for this item type.
Nested Schema : specifications
Nested Schema : items
Type:
object
- default
-
Type:
string
Default value for this specification. - dimension
-
Type:
boolean
Flag for if this specification is a dimension. - hidden
-
Type:
boolean
Flag for if the specification should be hidden on the UI - id
-
Type:
string
Required:true
ID of the specification. - internalOnly
-
Type:
boolean
Flag for if this specification is internal only. - itemType
-
Type:
string
Type of the parent item type. - label
-
Type:
string
Required:true
Label to display for this specification. - length
-
Type:
integer
Maximum length of this specification - listingVariant
-
Type:
boolean
- localizable
-
Type:
boolean
Flag for if this property can be localized. - multiSelect
-
Type:
boolean
Flag for if this property is multi-selectable. - required
-
Type:
boolean
Flag to determine if this specification is required. - searchable
-
Type:
boolean
Flag for if this specification is searchable. - textSearchable
-
Type:
boolean
Flag for if this property is text searchable. - type
-
Type:
string
Data type of specification. - uiEditorType
-
Type:
string
The UI editor type.This property is for Item Types. - writable
-
Type:
boolean
Flag 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:
integer
Number of products of the current user-defined product type. - displayName
-
Type:
string
Display name of item type. - id
-
Type:
string
ID of product type. - propertiesOrder
-
Type:
array
propertiesOrderAdditional Properties Allowed:List of properties in ascending order. This is for Item Types. - specifications
-
Type:
array
specificationsAdditional Properties Allowed:List of specifications for user-defined item type. - variants
-
Type:
array
variantsAdditional 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:
string
Default value of specificaiont. - dimension
-
Type:
string
Dimension of specification. - editableAttributes
-
Type:
array
editableAttributesAdditional Properties Allowed:List of editable attributes - id
-
Type:
string
ID of specification. - internalOnly
-
Type:
boolean
Whether variant is internal. - itemType
-
Type:
string
Item type for user-defined type. - label
-
Type:
string
Label for new item type. - length
-
Type:
boolean
Length of type supported. - localizable
-
Type:
boolean
Whether specification is localizable or not. - multiSelect
-
Type:
number
Whether multi-select search facet or not. - required
-
Type:
number
Whether specification is required or not. - searchable
-
Type:
boolean
Whether item searchable or not. - textSearchable
-
Type:
boolean
Whether text is searchable or not. - type
-
Type:
string
Data type of specification. - uiEditorType
-
Type:
string
The UI editor type.This property is for Item Types. - wildcardSearchable
-
Type:
boolean
Whether wildcard is searchable or not. - writable
-
Type:
string
Whether writable or not.
Nested Schema : editableAttributes
Nested Schema : items
Type:
object
- default
-
Type:
string
Default editable attribute. - dimension
-
Type:
string
Dimensions of item type. - hidden
-
Type:
boolean
Whether item is hidden. - internalOnly
-
Type:
boolean
Whether specifications are internal. - label
-
Type:
string
Label for the item type. - order
-
Type:
integer
Order count of item type. - required
-
Type:
boolean
Whether it is required or not. - searchable
-
Type:
boolean
Whether item searchable or not. - textSearchable
-
Type:
boolean
Whether variant is searchable or not. - wildcardSearchable
-
Type:
boolean
Whether wildcard searchable or not.
Nested Schema : items
Type:
object
- default
-
Type:
string
Default value of variant. - dimension
-
Type:
string
Dimension of variant. - editableAttributes
-
Type:
array
editableAttributesAdditional Properties Allowed:List of editable attributes - id
-
Type:
string
ID of variant. - internalOnly
-
Type:
boolean
Whether variant is internal. - itemType
-
Type:
string
Item type for user-defined product type. - label
-
Type:
string
Label for new product type. - listingVariant
-
Type:
boolean
Whether listing should be done based on this variant. - localizedValues
-
Type:
object
localizedValuesAdditional Properties Allowed:{ "type":"string" }
Localized values for variant. Key is option value in default locale, value is option value in specified locale - textSearchable
-
Type:
boolean
Whether text is searchable or not. - type
-
Type:
string
Data type of variant. - values
-
Type:
array
valuesAdditional Properties Allowed:Values for variant. - variantBasedDisplay
-
Type:
boolean
Whether this variant based display should be allowed - wildcardSearchable
-
Type:
boolean
Whether wildcard is searchable or not. - writable
-
Type:
string
Whether 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:
string
Default editable attribute. - dimension
-
Type:
string
Dimensions of item type. - hidden
-
Type:
boolean
Whether item is hidden. - internalOnly
-
Type:
boolean
Whether variant is internal. - label
-
Type:
string
Label for the item type. - listingVariant
-
Type:
boolean
Whether listing should be done based on this variant. - order
-
Type:
integer
Order count of item type. - required
-
Type:
boolean
Whether it is required or not. - searchable
-
Type:
boolean
Whether item searchable or not. - textSearchable
-
Type:
boolean
Whether variant is searchable or not. - variantBasedDisplay
-
Type:
boolean
Whether this variant based display should be allowed - wildcardSearchable
-
Type:
boolean
Whether 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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 }] }