getItemType
get
/ccagent/v1/itemTypes/{id}
Get Item Type. Get item type and base type info.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
ID of the item type.
Query Parameters
- includeBase
-
Type:
boolean
Set to true to get base type details.- parent
Type:string
Parent Type of current requested item type. It takes product as default parent for custom types.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getItemType_response
- base
-
Type:
array
baseAdditional Properties Allowed:Base type Details - count
-
Type:
integer
The count of items. - displayName
-
Type:
string
The display name of the item type - id
-
Type:
string
The ID of the item type. - specifications
-
Type:
array
specificationsAdditional Properties Allowed:List of properties for user-defined item type. - variants
-
Type:
array
variantsAdditional Properties Allowed:Variants of the product
Nested Schema : base
Nested Schema : specifications
Nested Schema : variants
Nested Schema : items
Type:
object
- default
-
Type:
string
Default specification of product type. - hidden
-
Type:
boolean
Whether item is hidden. - id
-
Type:
string
ID of specification. - itemType
-
Type:
string
Item type for user-defined product. - label
-
Type:
string
Label for new item type. - length
-
Type:
integer
The length property of the variant - listingVariant
-
Type:
boolean
Whether listing should be done based on this variant. - localizable
-
Type:
boolean
Whether Localizable or not. - order
-
Type:
integer
Order count of item type. - required
-
Type:
boolean
Whether it is required or not. - type
-
Type:
string
Data type of variant. - uiEditorType
-
Type:
string
The UIEditorType property of the variant - variantBasedDisplay
-
Type:
boolean
Whether this variant based display should be allowed - writable
-
Type:
string
Whether writable or not.
Nested Schema : items
Type:
object
- default
-
Type:
string
Default specification of product type. - hidden
-
Type:
boolean
Whether item is hidden. - id
-
Type:
string
ID of specification. - itemType
-
Type:
string
Item type for user-defined product. - label
-
Type:
string
Label for new item type. - length
-
Type:
integer
The length property of the variant - listingVariant
-
Type:
boolean
Whether listing should be done based on this variant. - localizable
-
Type:
boolean
Whether Localizable or not. - order
-
Type:
integer
Order count of item type. - required
-
Type:
boolean
Whether it is required or not. - type
-
Type:
string
Data type of variant. - uiEditorType
-
Type:
string
The UIEditorType property of the variant - variantBasedDisplay
-
Type:
boolean
Whether this variant based display should be allowed - writable
-
Type:
string
Whether writable or not.
Nested Schema : items
Type:
object
- default
-
Type:
string
Default specification of product type. - hidden
-
Type:
boolean
Whether item is hidden. - id
-
Type:
string
ID of specification. - itemType
-
Type:
string
Item type for user-defined product. - label
-
Type:
string
Label for new item type. - length
-
Type:
integer
The length property of the variant - listingVariant
-
Type:
boolean
Whether listing should be done based on this variant. - localizable
-
Type:
boolean
Whether Localizable or not. - order
-
Type:
integer
Order count of item type. - required
-
Type:
boolean
Whether it is required or not. - type
-
Type:
string
Data type of variant. - uiEditorType
-
Type:
string
The UIEditorType property of the variant - variantBasedDisplay
-
Type:
boolean
Whether this variant based display should be allowed - writable
-
Type:
string
Whether writable or not.
Example application/json
{
"displayName":"Tables",
"count":10,
"id":"Tables",
"specifications":[
{
"itemType":"Tables",
"hidden":false,
"length":1000,
"variantBasedDisplay":false,
"label":"Wood Species",
"type":"shortText",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"woodSpecies",
"order":null
},
{
"itemType":"Tables",
"hidden":false,
"length":10,
"variantBasedDisplay":false,
"label":"Seating Capacity",
"type":"number",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"seatingCapacity",
"order":null
},
{
"itemType":"Tables",
"hidden":false,
"length":19,
"variantBasedDisplay":false,
"label":"Handmade",
"type":"checkbox",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"handmade",
"order":null
},
{
"itemType":"Tables",
"hidden":false,
"length":1000,
"variantBasedDisplay":false,
"label":"Shape",
"type":"shortText",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"shape",
"order":null
}
],
"base":[
{
"itemType":"product",
"hidden":false,
"length":254,
"variantBasedDisplay":false,
"label":"Name",
"type":"shortText",
"required":true,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":true,
"id":"displayName",
"order":"0"
},
{
"itemType":"product",
"hidden":false,
"length":165,
"variantBasedDisplay":false,
"label":"Product ID",
"type":"shortText",
"required":true,
"writable":false,
"uiEditorType":null,
"default":"",
"listingVariant":false,
"localizable":false,
"id":"id",
"order":"10"
},
{
"itemType":"product",
"hidden":false,
"length":254,
"variantBasedDisplay":false,
"label":"Description",
"type":"shortText",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":true,
"id":"description",
"order":"10"
},
{
"itemType":"product",
"hidden":false,
"length":254,
"variantBasedDisplay":false,
"label":"Brand",
"type":"shortText",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":true,
"id":"brand",
"order":"15"
},
{
"itemType":"product",
"hidden":false,
"length":0,
"variantBasedDisplay":false,
"label":"List Price",
"type":"currencyMap",
"required":false,
"writable":true,
"default":{
},
"listingVariant":false,
"localizable":false,
"id":"listPrices",
"order":"19"
},
{
"itemType":"product",
"hidden":false,
"length":0,
"variantBasedDisplay":false,
"label":"Sale Price",
"type":"currencyMap",
"required":false,
"writable":true,
"default":{
},
"listingVariant":false,
"localizable":false,
"id":"salePrices",
"order":"20"
},
{
"itemType":"product",
"hidden":false,
"length":0,
"variantBasedDisplay":false,
"label":"Shipping Surcharge",
"type":"currencyMap",
"required":false,
"writable":true,
"default":{
},
"listingVariant":false,
"localizable":false,
"id":"shippingSurcharges",
"order":"20"
},
{
"itemType":"product",
"hidden":false,
"length":22,
"variantBasedDisplay":false,
"label":"List Price",
"type":"currency",
"required":true,
"writable":true,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"listPrice",
"order":"20"
},
{
"itemType":"product",
"hidden":false,
"length":22,
"variantBasedDisplay":false,
"label":"Sale Price",
"type":"currency",
"required":false,
"writable":true,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"salePrice",
"order":"20"
},
{
"itemType":"product",
"hidden":false,
"length":22,
"variantBasedDisplay":false,
"label":"Shipping Surcharge",
"type":"currency",
"required":false,
"writable":true,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"shippingSurcharge",
"order":"21"
},
{
"itemType":"product",
"hidden":false,
"length":254,
"variantBasedDisplay":false,
"label":"Product Tax Code",
"type":"shortText",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"taxCode",
"order":"25"
},
{
"itemType":"product",
"hidden":false,
"length":4000000,
"variantBasedDisplay":false,
"label":"Long Description",
"type":"richText",
"required":false,
"writable":true,
"default":null,
"listingVariant":false,
"localizable":true,
"id":"longDescription",
"order":"30"
},
{
"itemType":"product",
"hidden":false,
"length":1,
"variantBasedDisplay":false,
"label":"Active",
"type":"checkbox",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"active",
"order":"50"
},
{
"itemType":"product",
"hidden":false,
"length":7,
"variantBasedDisplay":false,
"label":"Arrival Date",
"type":"date",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"arrivalDate",
"order":"60"
},
{
"itemType":"product",
"hidden":false,
"length":12,
"variantBasedDisplay":false,
"label":"Height",
"type":"number",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"height",
"order":"70"
},
{
"itemType":"product",
"hidden":false,
"length":12,
"variantBasedDisplay":false,
"label":"Length",
"type":"number",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"length",
"order":"80"
},
{
"itemType":"product",
"hidden":false,
"length":12,
"variantBasedDisplay":false,
"label":"Width",
"type":"number",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"width",
"order":"90"
},
{
"itemType":"product",
"hidden":false,
"length":12,
"variantBasedDisplay":false,
"label":"Weight",
"type":"number",
"required":false,
"writable":true,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"weight",
"order":"100"
},
{
"itemType":"product",
"hidden":false,
"length":10,
"variantBasedDisplay":false,
"label":"Order Limit",
"type":"digit",
"required":false,
"writable":true,
"default":null,
"listingVariant":false,
"localizable":false,
"id":"orderLimit",
"order":"110"
}
]
}
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|
|------------------|------------------|
|20583|Could not find item type|
|20688|Parent Id does not match Item Type|
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 Response Payload returned by endpoint:
{ "displayName": "Tables", "count": 10, "id": "Tables", "specifications": [ { "itemType": "Tables", "hidden": false, "length": 1000, "variantBasedDisplay": false, "label": "Wood Species", "type": "shortText", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "woodSpecies", "order": null }, { "itemType": "Tables", "hidden": false, "length": 10, "variantBasedDisplay": false, "label": "Seating Capacity", "type": "number", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "seatingCapacity", "order": null }, { "itemType": "Tables", "hidden": false, "length": 19, "variantBasedDisplay": false, "label": "Handmade", "type": "checkbox", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "handmade", "order": null }, { "itemType": "Tables", "hidden": false, "length": 1000, "variantBasedDisplay": false, "label": "Shape", "type": "shortText", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "shape", "order": null } ], "base": [ { "itemType": "product", "hidden": false, "length": 254, "variantBasedDisplay": false, "label": "Name", "type": "shortText", "required": true, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": true, "id": "displayName", "order": "0" }, { "itemType": "product", "hidden": false, "length": 165, "variantBasedDisplay": false, "label": "Product ID", "type": "shortText", "required": true, "writable": false, "uiEditorType": null, "default": "", "listingVariant": false, "localizable": false, "id": "id", "order": "10" }, { "itemType": "product", "hidden": false, "length": 254, "variantBasedDisplay": false, "label": "Description", "type": "shortText", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": true, "id": "description", "order": "10" }, { "itemType": "product", "hidden": false, "length": 254, "variantBasedDisplay": false, "label": "Brand", "type": "shortText", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": true, "id": "brand", "order": "15" }, { "itemType": "product", "hidden": false, "length": 0, "variantBasedDisplay": false, "label": "List Price", "type": "currencyMap", "required": false, "writable": true, "default": {}, "listingVariant": false, "localizable": false, "id": "listPrices", "order": "19" }, { "itemType": "product", "hidden": false, "length": 0, "variantBasedDisplay": false, "label": "Sale Price", "type": "currencyMap", "required": false, "writable": true, "default": {}, "listingVariant": false, "localizable": false, "id": "salePrices", "order": "20" }, { "itemType": "product", "hidden": false, "length": 0, "variantBasedDisplay": false, "label": "Shipping Surcharge", "type": "currencyMap", "required": false, "writable": true, "default": {}, "listingVariant": false, "localizable": false, "id": "shippingSurcharges", "order": "20" }, { "itemType": "product", "hidden": false, "length": 22, "variantBasedDisplay": false, "label": "List Price", "type": "currency", "required": true, "writable": true, "default": null, "listingVariant": false, "localizable": false, "id": "listPrice", "order": "20" }, { "itemType": "product", "hidden": false, "length": 22, "variantBasedDisplay": false, "label": "Sale Price", "type": "currency", "required": false, "writable": true, "default": null, "listingVariant": false, "localizable": false, "id": "salePrice", "order": "20" }, { "itemType": "product", "hidden": false, "length": 22, "variantBasedDisplay": false, "label": "Shipping Surcharge", "type": "currency", "required": false, "writable": true, "default": null, "listingVariant": false, "localizable": false, "id": "shippingSurcharge", "order": "21" }, { "itemType": "product", "hidden": false, "length": 254, "variantBasedDisplay": false, "label": "Product Tax Code", "type": "shortText", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "taxCode", "order": "25" }, { "itemType": "product", "hidden": false, "length": 4000000, "variantBasedDisplay": false, "label": "Long Description", "type": "richText", "required": false, "writable": true, "default": null, "listingVariant": false, "localizable": true, "id": "longDescription", "order": "30" }, { "itemType": "product", "hidden": false, "length": 1, "variantBasedDisplay": false, "label": "Active", "type": "checkbox", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "active", "order": "50" }, { "itemType": "product", "hidden": false, "length": 7, "variantBasedDisplay": false, "label": "Arrival Date", "type": "date", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "arrivalDate", "order": "60" }, { "itemType": "product", "hidden": false, "length": 12, "variantBasedDisplay": false, "label": "Height", "type": "number", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "height", "order": "70" }, { "itemType": "product", "hidden": false, "length": 12, "variantBasedDisplay": false, "label": "Length", "type": "number", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "length", "order": "80" }, { "itemType": "product", "hidden": false, "length": 12, "variantBasedDisplay": false, "label": "Width", "type": "number", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "width", "order": "90" }, { "itemType": "product", "hidden": false, "length": 12, "variantBasedDisplay": false, "label": "Weight", "type": "number", "required": false, "writable": true, "uiEditorType": null, "default": null, "listingVariant": false, "localizable": false, "id": "weight", "order": "100" }, { "itemType": "product", "hidden": false, "length": 10, "variantBasedDisplay": false, "label": "Order Limit", "type": "digit", "required": false, "writable": true, "default": null, "listingVariant": false, "localizable": false, "id": "orderLimit", "order": "110" } ] }