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
Type: integer
The number of promotion templates to return from this request.
offset
Type: integer
The starting index/offset to be returned from this request.
totalResults
Type: integer
The total number of promotion templates.
type
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.
Body
Root Schema : listPromotionTemplates_response
Nested Schema : items
Type: array
The promotion templates returned by the listing.
Nested Schema : items
Type: object
Example 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.|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "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"
    }
  ]
}