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:
string
Required:true
The ID of the coupon to create. Also serves as the claim code. - maxUses
-
Type:
integer
Specifies the number of uses a coupon has. This is required if 'useMaxUses' is set to true. - promotionId
-
Type:
string
ID corresponding to the promotion which the coupon will use. Use either promotionId or promotions, not both. - promotions
-
Type:
array
promotionsAdditional Properties Allowed:List of promotions with which to associate the coupon. Use either promotionId or promotions, not both. - startDate
-
Type:
string
When this claimable becomes active. - useMaxUses
-
Type:
boolean
Activates validation of maxUses property.
Nested Schema : promotions
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Required:true
The 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:
string
The 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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"}