getPromotionTemplate
get
/ccadmin/v1/promotionTemplates/{id}
Get Promotion Template. Get a promotion template by path (type) and name.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The promotion template name.
Query Parameters
- format
-
Type:
boolean
Flag indicating that the response should follow standard formatting rules including an items and links array.- path
Type:string
The promotion template type (path).
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getPromotionTemplate_response
- items
-
Type:
array
itemsAdditional Properties Allowed:Array of templateValues placeholders which correspond to the templateValues input needed when creating a promotion using this template. - links
-
Type:
object
linksAdditional Properties Allowed: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:
array
Array of templateValues placeholders which correspond to the templateValues input needed when creating a promotion using this template.
-
Type:
string
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.
Example application/json
{
"links":[
{
"rel":"self",
"href":"/promotionTemplates/getItemDiscount?path=item"
}
],
"items":[
"discount_type_value",
"discount_value",
"no_of_items_to_discount",
"sort_order",
"PSC_Value"
]
}
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|
|------------------|------------------|
|21103|The promotion template is not supported for path {0} and name {1}.|
|21100|Promotion template path must be provided.|
|21009|Internal Error.|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "links": [{ "rel": "self", "href": "/promotionTemplates/getItemDiscount?path=item" }], "items": [ "discount_type_value", "discount_value", "no_of_items_to_discount", "sort_order", "PSC_Value" ] }