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: integer
The number of promotion templates to return from this request.
-
offset: integer
The starting index/offset to be returned from this request.
-
totalResults: integer
The total number of promotion templates.
-
type: 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:
array items
The promotion templates returned by the listing.
-
limit:
integer
The number of promotion templates intended to be returned in the response.
-
links:
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:
integer
The starting index/offset within the complete list of of promotion templates.
-
total:
integer
The total number of promotion templates. DEPRECATED.
-
totalResults:
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:
string
The localized display name of the promotion template.
-
id:
string
The promotion template ID.
-
name:
string
The system name of the promotion template.
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code