createSkuProperty
post
/ccadmin/v1/skuProperties
Create a new dynamic property on the SKU type. **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 : createSkuProperty_request
Type:
Show Source
object
-
default(optional):
string
Default value of this property.
-
id:
string
ID of this SKU 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.
-
productTypeId:
string
The ID of the product type on which this SKU property is defined.
-
searchable(optional):
boolean
Whether it can be searched in storefront.
-
type:
string
The data type of the property. Possible values are shortText, longText, richText, number, date or checkbox.
Example:
{
"uiEditorType":"shortText",
"default":"defaultValue",
"localizable":false,
"id":"upccode",
"label":"UpcCode",
"type":"shortText",
"searchable":false,
"productTypeId":"sampleProductType"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createSkuProperty_response
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.
-
editableAttributes(optional):
array editableAttributes
Attributes of this property that can be edited.
- hidden(optional): boolean
-
id(optional):
string
ID of this SKU dynamic property.
-
internalOnly(optional):
boolean
Flag to determine if the property is visible through only Admin or also Storefront.
-
itemType(optional):
string
The item type that the property is defined on. For example, if the product type is "SampleType" then this value would be "sku-SampleType".
-
label(optional):
boolean
The display label of the property.
-
length(optional):
integer
Maximum length of the property value.
-
listingVariant(optional):
boolean
Whether it is listing variant.
-
localizable(optional):
boolean
Flag indicating if the property value can be localized.
-
multiSelect(optional):
boolean
Whether the property is a multi-select search facet.
-
order(optional):
string
Relative order of the property among all of the SKU properties.
-
propertyType(optional):
string
Type of the property. It could be sku-custom for a custom level sku property or sku-base for a sku property defined at base product level.
-
required(optional):
boolean
Whether the property value is required.
-
searchable(optional):
boolean
Whether the property is searchable on the storefront.
-
textSearchable(optional):
boolean
Whether the property is text searchable on the storefront.
-
type(optional):
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.
-
variantBasedDisplay(optional):
boolean
Whether a variant based display should be allowed.
-
writable(optional):
boolean
Whether the property is writable.
Nested Schema : editableAttributes
Type:
array
Attributes of this property that can be edited.
Show Source
Example Response (application/json)
[
{
"itemType":"sku-sampleProductType",
"hidden":false,
"length":254,
"variantBasedDisplay":false,
"label":"UpcCode",
"type":"shortText",
"required":false,
"searchable":false,
"writable":true,
"internalOnly":false,
"default":"defaultValue",
"listingVariant":false,
"propertyType":"sku-base",
"localizable":false,
"textSearchable":false,
"id":"upccode",
"dimension":false,
"editableAttributes":[
"dimension",
"multiSelect",
"textSearchable",
"default",
"internalOnly",
"order",
"listingVariant",
"hidden",
"label",
"required",
"variantBasedDisplay",
"searchable"
],
"multiSelect":false
}
]
Default Response
The error response
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