listPromotionTemplates
get
/ccadmin/v1/promotionTemplates
List Promotion Templates. Get a list of promotions promotion templates. The list of results will be paginated based on query parameters.
Request
Supported Media Types
- application/json
Query Parameters
-
limit(optional): integer
The number of promotion templates to return from this request.
-
offset(optional): integer
The starting index/offset to be returned from this request.
-
totalResults(optional): integer
The total number of promotion templates.
-
type(optional): string
One of three types of promotion templates to return: item, order, shipping.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : listPromotionTemplates_response
Type:
Show Source
object
-
items(optional):
array items
The promotion templates returned by the listing.
-
limit(optional):
integer
The number of promotion templates intended to be returned in the response.
-
links(optional):
object links
The links referring to this response, and any applicable next or previous parts of the response. This is based on the total results, limit, and offset.
-
offset(optional):
integer
The starting index/offset within the complete list of of promotion templates.
-
total(optional):
integer
The total number of promotion templates. DEPRECATED.
-
totalResults(optional):
integer
The total number of promotion templates.
Nested Schema : links
Type:
object
The links referring to this response, and any applicable next or previous parts of the response. This is based on the total results, limit, and offset.
Nested Schema : items
Type:
Show Source
object
-
displayName(optional):
string
The localized display name of the promotion template.
-
id(optional):
string
The promotion template ID.
-
name(optional):
string
The system name of the promotion template.
-
type(optional):
string
The system type of the promotion template.
Example Response (application/json)
{
"total":7,
"totalResults":7,
"offset":0,
"limit":3,
"links":[
{
"rel":"self",
"href":"/ccadminui/v1/promotionTemplates?limit=3"
},
{
"rel":"next",
"href":"/ccadminui/v1/promotionTemplates?limit=3&offset=3"
}
],
"items":[
{
"displayName":"Get Item Discount",
"name":"getItemDiscount",
"id":"item.getItemDiscount",
"type":"item"
},
{
"displayName":"Buy One Get One",
"name":"bogo",
"id":"item.bogo",
"type":"item"
},
{
"displayName":"Gift with Item Purchase",
"name":"getGiftWithPurchase",
"id":"item.getGiftWithPurchase",
"type":"item"
}
]
}
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|
|------------------|------------------|
|10002|The value {0} for parameter {1} is invalid.|
|21019|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