getPromotion

get

/ccadmin/v1/promotions/{id}

Get Promotion. Get a promotion by id. Optionally takes the x-ccasset-language header to get translated content in another language.

Request

Supported Media Types
  • application/json
Path Parameters
id
Type: string
Required: true
ID corresponding to the promotion to get.
Query Parameters
enableConversion
Type: boolean
Enables promotion data conversion for promotions based on upgraded templates. Default value is 'false'.
Header Parameters
X-CCAsset-Language
Type: string
The asset language of the request

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getPromotion_response
Nested Schema : audiences
Type: array
List of audiences to which the promotion is limited. An empty list implies no restrictions.
Nested Schema : cardIINRanges
Type: array
List of issuer identification numbers including wildcards and ranges for which the promotion should be applied.
Nested Schema : claimables
Type: array
The list of single coupon codes.
Nested Schema : couponBatches
Type: array
This will list coupon batch details.
Nested Schema : excludedPromotions
Type: array
List of promotions to be excluded from the current promotion. Item promotions can exclude promotions of type: item, order, shipping. Order promotions can exclude promotion of type order and shipping. Shipping promotions can only exclude another shipping promotions.
Nested Schema : includedPromotions
Type: array
List of promotions to be included in the current promotion.
Nested Schema : parentFolder
Type: object
Parent Folder object of the current promotion.
Nested Schema : priceListGroups
Type: array
The list of price list groups to which promotion is associated.
Nested Schema : shippingMethods
Type: array
Array of shipping methods for which the promotion should be applied.
Nested Schema : sites
Type: array
This will limit the promotion to being applicable only to the 1+ specified sites. An empty array means the promotion applies to all sites.
Nested Schema : stackingRule
Type: object
Represents a rule to determine a group of promotions that can be used together.
Nested Schema : templateValues
Type: object
Specifies the template values that are used as part of the promotion to control its behavior
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : condition_psc_value
Type: object
The condition product set criteria value
Nested Schema : discountStructure
Type: object
The discount structure
Nested Schema : gwpItem
Type: object
The gift with promotion configuration details
Nested Schema : offer_psc_value
Type: object
The offer product set criteria values
Nested Schema : optional_offer_psc_value
Type: object
The offer product set criteria values
Nested Schema : PSC_value
Type: object
The product set criteria values
Nested Schema : excludedCategories
Type: array
The excluded categories
Nested Schema : excludedProducts
Type: array
The excluded products
Nested Schema : includedCategories
Type: array
The included categories
Nested Schema : includedProducts
Type: array
The included products
Nested Schema : discount_details
Type: array
The discount details
Nested Schema : items
Type: object
Nested Schema : excludedCategories
Type: array
The excluded categories
Nested Schema : excludedProducts
Type: array
The excluded products
Nested Schema : includedCategories
Type: array
The included categories
Nested Schema : includedProducts
Type: array
The included products
Nested Schema : excludedCategories
Type: array
The excluded categories
Nested Schema : excludedProducts
Type: array
The excluded products
Nested Schema : includedCategories
Type: array
The included categories
Nested Schema : includedProducts
Type: array
The included products
Nested Schema : excludedCategories
Type: array
The excluded categories
Nested Schema : excludedProducts
Type: array
The excluded products
Nested Schema : includedCategories
Type: array
The included categories
Nested Schema : includedProducts
Type: array
The included products
Example application/json

{
    "template":"/order/spendYGetOrderDiscount.pmdt",
    "endDate":"2014-04-29T19:30:00.000-04:00",
    "displayName":"10% Off Orders Over $100 ",
    "templateValues":{
        "spend_value":"100",
        "discount_value":"10",
        "discount_type_value":"percentOff"
    },
    "description":"Spend $100 today and get 10% off your order!",
    "sites":[
        {
            "repositoryId":"funSite"
        }
    ],
    "priority":1,
    "type":9,
    "enabled":true,
    "cardIINRanges":[
        "456789",
        "9878",
        "987634-987648"
    ],
    "excludedPromotions":[
        {
            "repositoryId":"bogoPromotion"
        },
        {
            "repositoryId":"explicitItemFixedDiscount"
        }
    ],
    "parentFolder":{
        "repositoryId":"200002"
    },
    "stackingRule":{
        "maxPromotions":-1,
        "displayName":"TEST2",
        "repositoryId":"100002",
        "id":"100002"
    },
    "startDate":"2014-04-25T17:30:00.000-04:00",
    "shippingMethods":[
    ]
}
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| |------------------|------------------| |21001|Promotion Id is invalid.| |21009|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:

{
  "template": "/order/spendYGetOrderDiscount.pmdt",
  "endDate": "2014-04-29T19:30:00.000-04:00",
  "displayName": "10% Off Orders Over $100 ",
  "templateValues": {
    "spend_value": "100",
    "discount_value": "10",
    "discount_type_value": "percentOff"
  },
  "description": "Spend $100 today and get 10% off your order!",
  "sites": [{"repositoryId": "funSite"}],
  "priority": 1,
  "type": 9,
  "enabled": true,
  "cardIINRanges": [
    "456789",
    "9878",
    "987634-987648"
  ],
  "excludedPromotions": [
    {"repositoryId": "bogoPromotion"},
    {"repositoryId": "explicitItemFixedDiscount"}
  ],
  "parentFolder": {"repositoryId": "200002"},
  "stackingRule": {
    "maxPromotions": -1,
    "displayName": "TEST2",
    "repositoryId": "100002",
    "id": "100002"
  },
  "startDate": "2014-04-25T17:30:00.000-04:00",
  "shippingMethods": []
}