addShopperInput
post
/ccadmin/v1/productTypes/{typeId}/shopperInputs
Adds a Shopper Input to Product Type.
Request
Supported Media Types
- application/json
Path Parameters
-
typeId: string
ID of product type to which shopper input is to be attached.
Root Schema : addShopperInput_request
Type:
Show Source
object
-
id:
string
ID of Shopper Input to be attached to product type.
Example:
{
"id":"giftMessage"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : addShopperInput_response
Type:
Show Source
object
-
displayName(optional):
string
Display name of product type.
-
id(optional):
string
ID of the product type to which shopper input is attached.
-
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
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
-
values(optional):
array values
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.
Example Response (application/json)
{
"shopperInputs":[
{
"values":[
],
"name":"Gift Message",
"id":"giftMessage",
"label":"Gift Message",
"type":"shortText",
"promptText":"Enter the gift message:",
"required":false
}
],
"displayName":"New Product Type",
"count":0,
"id":"NewProductType",
"variants":[
{
"itemType":"sku-NewProductType",
"localizedValues":{
"red":"rojo",
"blue":"azul"
},
"hidden":false,
"values":[
"red",
"blue"
],
"variantBasedDisplay":"false",
"wildcardSearchable":null,
"label":"color",
"type":"enumerated",
"required":false,
"searchable":null,
"writable":"true",
"internalOnly":null,
"default":null,
"listingVariant":"true",
"textSearchable":null,
"id":"color",
"dimension":null,
"editableAttributes":[
"textSearchable",
"dimension",
"internalOnly",
"default",
"order",
"listingVariant",
"hidden",
"label",
"required",
"variantBasedDisplay",
"wildcardSearchable",
"searchable"
],
"order":null
}
],
"specifications":[
{
"itemType":"NewProductType",
"hidden":false,
"wildcardSearchable":true,
"label":"New Property",
"type":"shortText",
"required":true,
"searchable":"true",
"writable":"true",
"internalOnly":"false",
"default":"null",
"textSearchable":"true",
"id":"newProperty",
"dimension":"false",
"editableAttributes":[
"textSearchable",
"dimension",
"internalOnly",
"default",
"order",
"hidden",
"label",
"required",
"wildcardSearchable",
"searchable"
],
"order":null
}
],
"skuPropeties":[
]
}
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|
|------------------|------------------|
|20581|Could not find product type|
|26402|Cannot find shopper input|
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