createPromotionClaimable
post
/ccadmin/v1/claimables
Create Promotion Claimable. Create a new coupon using the given promotion
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : createPromotionClaimable_request
{
"maxUses":"50",
"useMaxUses":true,
"id":"10OffMyOrder",
"promotionId":"SamplePromotion",
"startDate":"2016-03-23T11:56:00.000-04:00"
}
- id
-
Type:
stringRequired:trueThe ID of the coupon to create. Also serves as the claim code. - maxUses
-
Type:
integerSpecifies the number of uses a coupon has. This is required if 'useMaxUses' is set to true. - promotionId
-
Type:
stringID corresponding to the promotion which the coupon will use. Use either promotionId or promotions, not both. - promotions
-
Type:
arraypromotionsAdditional Properties Allowed:List of promotions with which to associate the coupon. Use either promotionId or promotions, not both. - startDate
-
Type:
stringWhen this claimable becomes active. - useMaxUses
-
Type:
booleanActivates validation of maxUses property.
Nested Schema : promotions
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringRequired:trueThe promotion's repository ID
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createPromotionClaimable_response
- repositoryId
-
Type:
stringThe Claimable id.
Example application/json
{
"repositoryId":"10OffMyOrder"
}
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|
|------------------|------------------|
|21131|Create claimable id already exists|
|21130|Create claimable promotion not found|
|21139|Create claimable internal error|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"maxUses": "50",
"useMaxUses": true,
"id": "10OffMyOrder",
"promotionId": "SamplePromotion",
"startDate": "2016-03-23T11:56:00.000-04:00"
}
Sample Response Payload returned by endpoint:
{"repositoryId": "10OffMyOrder"}