createShopperInput
post
/ccadmin/v1/shopperInputs
Create a new Shopper Input. Creates a new Shopper Input based on request parameters. **Requires the x-ccasset-language header so translated content can be set for a specific language.**
Request
Supported Media Types
- application/json
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
Root Schema : ShopperInput_request
Type:
Show Source
object
-
id(optional):
string
ID of the Shopper Input
-
label:
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:
string
Data type of the Shopper Input. The valid types are shortText, longText, date, number, checkbox and enumerated. The type enumerated is for Single Selection List.
-
uiEditorType(optional):
string
UI editor type of the Shopper Input. The valid types are shortText, longText, date, number, checkbox and singleSelectionList.
-
values(optional):
array values
Values when the type=enumerated. Can also be set as a map of base -> localized values, for localization. For other data types array will be empty.
Example:
{
"name":"Gift Message",
"id":"giftMessage",
"label":"Gift Message",
"type":"shortText",
"promptText":"Enter the gift message",
"required":false
}
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 : values
Type:
array
Values when the type=enumerated. Can also be set as a map of base -> localized values, for localization. For other data types array will be empty.
Show Source
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : ShopperInput_response
Type:
Show Source
object
-
label(optional):
string
Display name of the Shopper Input
-
name(optional):
string
Name of the Shopper Input
-
promptText(optional):
string
Helper text for the Shopper Input
-
repositoryId(optional):
string
Repository ID of the Shopper Input
-
required(optional):
boolean
Whether the Shopper Input is required
-
type(optional):
string
Data type of the Shopper Input. The valid types are shortText, longText, date, number, checkbox and enumerated. The type enumerated is for Single Selection List.
-
uiEditorType(optional):
string
UI editor type of the Shopper Input. The valid types are shortText, longText, date, number, checkbox and singleSelectionList.
-
values(optional):
array values
Values when the type=enumerated. Can also be set as a map of base -> localized values, for localization. For other data types array will be empty.
Nested Schema : values
Type:
array
Values when the type=enumerated. Can also be set as a map of base -> localized values, for localization. For other data types array will be empty.
Show Source
Example Response (application/json)
{
"uiEditorType":null,
"values":[
],
"name":"Gift Message",
"id":"giftMessage",
"label":"Gift Message",
"type":"shortText",
"promptText":"Enter the gift message",
"required":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|
|------------------|------------------|
|26400|Invalid data error. The exact error message will vary based on the property.|
|26409|Id of a Shopper Input must be unique.|
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