createProductType
post
/ccadmin/v1/productTypes
Create Product Type. Create a new user-defined product type based on ID.
Request
Supported Media Types
- application/json
Root Schema : createProductType_request
Type:
Show Source
object
-
displayName:
string
Display name of product type.
-
id:
string
ID of product type.
Example:
{
"displayName":"Sample Product",
"id":"sampleProductType"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createProductType_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 product type.
-
shopperInputs(optional):
array shopperInputs
List of Shopper Inputs for user-defined product type.
-
skuProperties(optional):
array skuProperties
List of SKU properties for user-defined product type.
-
specifications(optional):
array specifications
List of specifications for user-defined product type.
-
variants(optional):
array variants
List of variants for user-defined product type
Nested Schema : shopperInputs
Type:
array
List of Shopper Inputs for user-defined product type.
Show Source
Nested Schema : skuProperties
Type:
array
List of SKU properties for user-defined product type.
Show Source
Nested Schema : specifications
Type:
array
List of specifications for user-defined product type.
Show Source
Example Response (application/json)
[
{
"skuProperties":[
],
"shopperInputs":[
],
"displayName":"Sample Product",
"count":0,
"id":"sampleProductType",
"variants":[
],
"specifications":[
]
}
]
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|
|------------------|------------------|
|20123|No item descriptor name supplied when adding dynamic property|
|20122|No property type supplied when adding dynamic property|
|20177|Invalid product type name provided|
|20176|Cannot create duplicate product type|
|20120|No property name supplied when adding dynamic property|
|20174|Display name cannot be blank|
|20634|Attempt to create a variant option with invalid type, Valid values are: enumerated.|
|33013|Get ItemDescriptor Error|
|20173|No display name provided|
|20195|Product Type named already exists|
|20172|Blank product type id provided|
|20171|No product type id provided|
|20170|Find Catalog 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