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
Nested Schema : specifications
Type: array
Array of specifications for this item type.
Nested Schema : items
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateItemType_response
Nested Schema : propertiesOrder
Type: array
List of properties in ascending order. This is for Item Types.
Nested Schema : specifications
Type: array
List of specifications for user-defined item type.
Nested Schema : variants
Type: array
List of variants for user-defined item type.
Nested Schema : items
Type: object
Nested Schema : editableAttributes
Type: array
List of editable attributes
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : editableAttributes
Type: array
List of editable attributes
Nested Schema : localizedValues
Type: object
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.
Nested Schema : items
Type: object
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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
  }]
}