createPromotionCouponBatch

post

/ccadmin/v1/couponBatches

Create Promotion Coupon Batch. Create a new coupon batch using the given promotion.

Request

Supported Media Types
Body ()
Root Schema : createPromotionCouponBatch_request
Type: object
Show Source
Example:
{
    "maxUses":"1",
    "prefix":"SpecialEvent",
    "numberOfCoupons":"5000",
    "promotionId":"PromoFor10PercentOff",
    "startDate":"2016-03-23T11:56:00.000-04:00"
}
Nested Schema : promotions
Type: array
List of promotions with which to associate the coupon batch. Use either promotionId or promotions, not both.
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createPromotionCouponBatch_response
Type: object
Show Source
Example Response (application/json)
{
    "repositoryId":"44d23",
    "links":[
        {
            "method":"POST",
            "rel":"self",
            "href":"/couponBatches"
        }
    ]
}

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| |------------------|------------------| |21134|ID value is too long: {0}| |21122|Promotion ID cannot be blank.| |21133|Max uses is missing from the input data.| |21121|Claimable ID {0} is invalid. Claimable IDs may not contain forwardslash or backslash characters.| |21132|Specified property is not permitted for coupon batches: {0}| |21131|ID already exists for coupon batch {0}.| |21153|Prefix has an invalid format. Can only be alphanumeric with no special characters: {0}| |21164|Number of Coupons not in the valid range. It must be in the range: 1, 1006632| |21139|Internal error when creating a batch.| |21130|Promotion {0} could not be found.| |21152|Prefix already exists.| |21163|Coupon batch prefix is too long. Maximum: {0}. Actual: {1}.| |21162|Missing expected property: {0}| |21150|Required property cannot be blank: {0}| |21161|Coupon batch properties cannot be empty or null.| |21160|Coupon batch property does not exist, or value is invalid: {0}, {1}|
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