createProductTypeSpecification
post
/ccadmin/v1/productProperties
Create Product Type Specification. Create product type specification. **Requires the x-ccasset-language header so translated content can be set for a specific language.**
Request
Supported Media Types
- application/json
Query Parameters
-
allowNonUnderscoreNames(optional): boolean
If true, allow the creation of custom property names that do not contain an underscore('_').
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
Root Schema : createProductTypeSpecification_request
Type:
Show Source
object
-
default(optional):
string
Default value of this property.
-
dimension(optional):
boolean
Allow property to be a search facet on the storefront.
-
id:
string
ID of this dynamic property.
-
internalOnly(optional):
boolean
Flag to determine if the property is visible through only Admin or also Storefront.
-
label(optional):
string
The display label of the property.
-
localizable(optional):
boolean
Flag indicating if the property value can be localized.
-
multiSelect(optional):
boolean
Whether the property is a multi-select search facet.
-
productTypeId:
string
The ID of the product type on which this product property is defined.
-
required(optional):
boolean
Whether the property value is required.
-
searchable(optional):
boolean
Whether it can be searched in storefront.
-
textSearchable(optional):
boolean
Whether the property is text searchable on the storefront.
-
type:
string
The data type of the property. Possible values are shortText, longText, richText, number, date or checkbox.
-
uiEditorType(optional):
string
Type of UI editor to show for the property. Possible values are shortText, longText, richText, number, date or checkbox.
Example:
{
"uiEditorType":"shortText",
"default":"U.S.A",
"localizable":false,
"id":"origin",
"label":"origin",
"type":"shortText",
"required":"true",
"productTypeId":"MensApparel",
"searchable":true
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createProductTypeSpecification_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.
-
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 : specifications
Type:
array
List of specifications for user-defined product type.
Show Source
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
Repository ID of the Shopper Input
-
label(optional):
string
Display name of the Shopper Input
-
localizedValues(optional):
object localizedValues
Additional Properties Allowed: additionalPropertiesLocalized enumerated values map (base -> localized), returned when type=enumerated and there is localization.
-
name(optional):
string
Name of the Shopper Input
-
promptText(optional):
string
Helper text for the Shopper Input
-
required(optional):
boolean
Whether the Shopper Input is required
-
type(optional):
string
Data type of the Shopper Input such as shortText, longText, date, number, checkbox and enumerated
-
values(optional):
array values
List of values when the type=enumerated.
Nested Schema : localizedValues
Type:
object
Additional Properties Allowed
Show Source
Localized enumerated values map (base -> localized), returned when type=enumerated and there is localization.
Nested Schema : items
Type:
Show Source
object
-
default(optional):
string
Default specification of product type.
-
dimension(optional):
string
Dimension of specification.
-
editableAttributes(optional):
array editableAttributes
List of editable attributes
-
id(optional):
string
ID of specification.
-
internalOnly(optional):
boolean
Whether specification is internal.
-
itemType(optional):
string
Item type for user-defined product.
-
label(optional):
string
Label for new item type.
-
textSearchable(optional):
boolean
Whether text is searchable or not.
-
type(optional):
string
Data type of variant.
-
wildcardSearchable(optional):
boolean
Whether wildcard is searchable or not.
-
writable(optional):
string
Whether writable or not.
Nested Schema : items
Type:
Show Source
object
-
default(optional):
string
Default editable attribute.
-
dimension(optional):
string
Dimensions of item type.
- hidden(optional): boolean
-
internalOnly(optional):
boolean
Whether specifications are internal.
-
label(optional):
string
Label for the item type.
-
order(optional):
integer
Order count of item type.
-
required(optional):
boolean
Whether it is required or not.
-
searchable(optional):
boolean
Whether item searchable or not.
-
textSearchable(optional):
boolean
Whether variant is searchable or not.
-
wildcardSearchable(optional):
boolean
Whether wildcard searchable or not.
Nested Schema : items
Type:
Show Source
object
-
default(optional):
string
Default value of variant.
-
dimension(optional):
string
Dimension of variant.
-
editableAttributes(optional):
array editableAttributes
List of editable attributes
-
id(optional):
string
ID of variant.
-
internalOnly(optional):
boolean
Whether variant is internal.
-
itemType(optional):
string
Item type for user-defined product type.
-
label(optional):
string
Label for new product type.
-
listingVariant(optional):
boolean
Whether listing should be done based on this variant.
-
localizedValues(optional):
object localizedValues
Additional Properties Allowed: additionalPropertiesLocalized values for variant. Key is option value in default locale, value is option value in specified locale
-
textSearchable(optional):
boolean
Whether text is searchable or not.
-
type(optional):
string
Data type of variant.
-
values(optional):
array values
Values for variant.
-
variantBasedDisplay(optional):
boolean
Whether this variant based display should be allowed
-
wildcardSearchable(optional):
boolean
Whether wildcard is searchable or not.
-
writable(optional):
string
Whether writable or not.
Nested Schema : localizedValues
Type:
object
Additional Properties Allowed
Show Source
Localized values for variant. Key is option value in default locale, value is option value in specified locale
Nested Schema : items
Type:
Show Source
object
-
default(optional):
string
Default editable attribute.
-
dimension(optional):
string
Dimensions of item type.
- hidden(optional): boolean
-
internalOnly(optional):
boolean
Whether variant is internal.
-
label(optional):
string
Label for the item type.
-
listingVariant(optional):
boolean
Whether listing should be done based on this variant.
-
order(optional):
integer
Order count of item type.
-
required(optional):
boolean
Whether it is required or not.
-
searchable(optional):
boolean
Whether item searchable or not.
-
textSearchable(optional):
boolean
Whether variant is searchable or not.
-
variantBasedDisplay(optional):
boolean
Whether this variant based display should be allowed
-
wildcardSearchable(optional):
boolean
Whether wildcard searchable or not.
Example Response (application/json)
{
"skuProperties":[
],
"shopperInputs":[
],
"displayName":"Camera",
"count":6,
"id":"camera",
"variants":[
{
"itemType":"sku-camera",
"localizedValues":null,
"hidden":false,
"values":[
"Antique Brass",
"Apricot",
"Aquamarine"
],
"length":19,
"variantBasedDisplay":false,
"label":"color",
"type":"enumerated",
"required":false,
"searchable":false,
"writable":true,
"internalOnly":false,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"propertyType":"variant",
"localizable":false,
"textSearchable":false,
"id":"color",
"dimension":false,
"editableAttributes":[
"internalOnly",
"default",
"listingVariant",
"hidden",
"variantBasedDisplay",
"textSearchable",
"label",
"dimension",
"required",
"searchable",
"order",
"multiSelect"
],
"order":null,
"multiSelect":null
},
{
"itemType":"sku-camera",
"localizedValues":null,
"hidden":false,
"values":[
"14.1-megapixels",
"24.3-megapixels",
"30.8-megapixels"
],
"length":19,
"variantBasedDisplay":false,
"label":"resolution",
"type":"enumerated",
"required":false,
"searchable":false,
"writable":true,
"internalOnly":false,
"uiEditorType":null,
"default":null,
"listingVariant":false,
"propertyType":"variant",
"localizable":false,
"textSearchable":false,
"id":"resolution",
"dimension":false,
"editableAttributes":[
"internalOnly",
"default",
"listingVariant",
"hidden",
"variantBasedDisplay",
"textSearchable",
"label",
"dimension",
"required",
"searchable",
"order",
"multiSelect"
],
"order":null,
"multiSelect":null
}
],
"specifications":[
{
"itemType":"camera",
"hidden":false,
"length":1000,
"variantBasedDisplay":false,
"label":"Storage media",
"type":"shortText",
"required":false,
"searchable":false,
"writable":true,
"internalOnly":false,
"uiEditorType":null,
"default":"USB",
"listingVariant":false,
"localizable":false,
"textSearchable":false,
"id":"storageMedia",
"dimension":false,
"editableAttributes":[
"internalOnly",
"default",
"listingVariant",
"hidden",
"variantBasedDisplay",
"textSearchable",
"label",
"dimension",
"required",
"searchable",
"order",
"multiSelect"
],
"order":null,
"multiSelect":false
},
{
"itemType":"camera",
"hidden":false,
"length":1000,
"variantBasedDisplay":false,
"label":"origin",
"type":"shortText",
"required":false,
"searchable":false,
"writable":true,
"internalOnly":false,
"default":"U.S.A",
"listingVariant":false,
"localizable":false,
"textSearchable":false,
"id":"origin",
"dimension":false,
"editableAttributes":[
"internalOnly",
"default",
"listingVariant",
"hidden",
"variantBasedDisplay",
"textSearchable",
"label",
"dimension",
"required",
"searchable",
"order",
"multiSelect"
],
"order":null,
"multiSelect":false
}
]
}
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|
|------------------|------------------|
|20120|No property name supplied when adding dynamic property|
|20121|Property name can only contain alpha numeric characters, underscores ("_") without spaces.|
|20122|No property type supplied when adding dynamic property|
|20123|No item descriptor name supplied when adding dynamic property|
|20124|Property {0} already exists.|
|20125|Cannot create the required dynamic property {0}.{1} without a default value|
|20126|Property localized must be a boolean value|
|20127, 20128|Localized properties cannot be set to required or have a default value|
|20129|Localized properties are not supported.|
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