createPromotion

post

/ccadmin/v1/promotions

Create a new promotion. **Requires the x-ccasset-language header so translated content can be set for a specific language.**

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : createPromotion_request
Type: object
Show Source
Example:
{
    "endDate":"2014-04-29T19:30:00.000-04:00",
    "filterForQualifierZeroPrices":null,
    "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"
        },
        {
            "repositoryId":"anotherFunSite"
        }
    ],
    "global":false,
    "enabled":true,
    "cardIINRanges":[
        "456789",
        "9878",
        "987634-987648"
    ],
    "filterForQualifierNegativePrices":null,
    "filterForQualifierOnSale":null,
    "parentFolder":{
        "repositoryId":"promoFolder100001"
    },
    "audiences":[
        {
            "repositoryId":"audienceId1"
        },
        {
            "repositoryId":"audienceId2"
        }
    ],
    "giveToAnonymousProfiles":false,
    "filterForQualifierActedAsQualifier":null,
    "shippingMethods":[
        "priorityShippingMethod",
        "groundShippingMethod"
    ],
    "priority":1,
    "filterForQualifierDiscountedByAny":null,
    "templatePath":"order",
    "excludedPromotions":[
        {
            "repositoryId":"explicitItemFixedDiscount"
        },
        {
            "repositoryId":"bogoPromotion"
        }
    ],
    "allowMultiple":false,
    "templateName":"spendYGetOrderDiscount",
    "uses":2,
    "maxUsesPerOrder":3,
    "startDate":"2014-04-25T17:30:00.000-04:00"
}
Nested Schema : audiences
Type: array
List of audiences to which the promotion is limited. An empty list implies no restrictions.
Show Source
Nested Schema : cardIINRanges
Type: array
List of issuer identification numbers including wildcards and ranges for which the promotion should be applied.
Show Source
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.
Show Source
Nested Schema : parentFolder
Type: object
Map of promotion folder's repository ID key and value. In order to have no folder assignment, set parentFolder to null e.g. "parentFolder": null or skip the property completely.
Show Source
Nested Schema : priceListGroups
Type: array
The price List Groups
Show Source
Nested Schema : shippingMethods
Type: array
Shipping Methods for which the promotion should be applied
Show Source
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.
Show Source
Nested Schema : templateValues
Type: object
Specifies the template values that are used as part of the promotion to control its behavior
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : condition_psc_value
Type: object
The condition product set criteria value
Show Source
Nested Schema : discountStructure
Type: object
The discount structure
Show Source
Nested Schema : gwpItem
Type: object
The gift with promotion configuration details
Show Source
Nested Schema : offer_psc_value
Type: object
The offer product set criteria values
Show Source
Nested Schema : optional_offer_psc_value
Type: object
The offer product set criteria values
Show Source
Nested Schema : PSC_value
Type: object
The product set criteria values
Show Source
Nested Schema : excludedCategories
Type: array
The excluded categories
Show Source
Nested Schema : excludedProducts
Type: array
The excluded products
Show Source
Nested Schema : excludedSkus
Type: array
The excluded SKU IDs
Show Source
Nested Schema : includedCategories
Type: array
The included categories
Show Source
Nested Schema : includedProducts
Type: array
The included products
Show Source
Nested Schema : includedSkus
Type: array
The included SKU IDs
Show Source
Nested Schema : discount_details
Type: array
The discount details
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : excludedCategories
Type: array
The excluded categories
Show Source
Nested Schema : excludedProducts
Type: array
The excluded products
Show Source
Nested Schema : excludedSkus
Type: array
The excluded SKU IDs
Show Source
Nested Schema : includedCategories
Type: array
The included categories
Show Source
Nested Schema : includedProducts
Type: array
The included products
Show Source
Nested Schema : includedSkus
Type: array
The included SKU IDs
Show Source
Nested Schema : excludedCategories
Type: array
The excluded categories
Show Source
Nested Schema : excludedProducts
Type: array
The excluded products
Show Source
Nested Schema : excludedSkus
Type: array
The excluded SKU IDs
Show Source
Nested Schema : includedCategories
Type: array
The included categories
Show Source
Nested Schema : includedProducts
Type: array
The included products
Show Source
Nested Schema : includedSkus
Type: array
The included SKU IDs
Show Source
Nested Schema : excludedCategories
Type: array
The excluded categories
Show Source
Nested Schema : excludedProducts
Type: array
The excluded products
Show Source
Nested Schema : excludedSkus
Type: array
The excluded SKU IDs
Show Source
Nested Schema : includedCategories
Type: array
The included categories
Show Source
Nested Schema : includedProducts
Type: array
The included products
Show Source
Nested Schema : includedSkus
Type: array
The included SKU IDs
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createPromotion_response
Type: object
Show Source
Nested Schema : audiences
Type: array
List of audiences to which the promotion is limited. An empty list implies no restrictions.
Show Source
Nested Schema : cardIINRanges
Type: array
List of issuer identification numbers including wildcards and ranges for which the promotion should be applied.
Show Source
Nested Schema : parentFolder
Type: object
Map of promotion folder's repository ID key and value.
Show Source
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.
Show Source
Nested Schema : stackingRule
Type: object
Represents a rule to determine a group of promotions that can be used together.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "filterForQualifierZeroPrices":null,
    "displayName":"10% Off Orders Over $100 ",
    "global":false,
    "type":9,
    "filterForQualifierDiscountedByAny":null,
    "enabled":true,
    "cardIINRanges":[
        "456789",
        "9878",
        "987634-987648"
    ],
    "filterForQualifierNegativePrices":null,
    "parentFolder":null,
    "filterForQualifierOnSale":null,
    "allowMultiple":false,
    "audiences":[
        {
            "repositoryId":"audienceId1"
        },
        {
            "repositoryId":"audienceId2"
        }
    ],
    "uses":2,
    "id":"promo20014",
    "giveToAnonymousProfiles":false,
    "filterForQualifierActedAsQualifier":null
}

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| |------------------|------------------| |21247|Invalid format for parentFolder property| |21244|No item found for the following type and ID: promotionFolder,invalidId| |21110|Invalid data error. The exact error message will vary based on the property.| |21174|incompatiblePromotionId : Promotion type item can not be included/excluded with the given promotion type : {item/order or discount}.| |21171|No item found for the following type and ID: promotion, invalidPromotion.|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top