batchGrantPromotions
post
/ccadmin/v1/profiles/batchGrantPromotions
Grant Promotions for Profile(s).
Request
Supported Media Types
- application/json
Header Parameters
-
X-CCAsset-Language(optional): string
The asset language of the request
Root Schema : batchGrantPromotions_request
Type:
Show Source
object
-
profileIds:
array profileIds
An array of profile id(s)
-
promotionIds:
array promotionIds
An array of promotion id(s)
-
sourceId(optional):
string
optional id associated with the source that initiated the batching requestExample:
src10001
Example:
{
"sourceId":"src10001",
"profileIds":[
"profile1",
"profile2"
],
"promotionIds":[
"promo1001",
"promo1002"
]
}
Nested Schema : profileIds
Type:
array
An array of profile id(s)
Show Source
Example:
[
"profile1",
"profile2"
]
Nested Schema : promotionIds
Type:
array
An array of promotion id(s)
Show Source
Example:
[
"promo1001",
"promo1002"
]
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds in initiating batch grant promotions to an array of given profiles
Example Response (application/json)
{
"links":[
{
"method":"POST",
"rel":"/rels/batchGrantPromotions",
"href":"http://localhost:9080/ccadmin/v1/profiles/batchGrantPromotions"
}
]
}
400 Response
The response has the ability to return single error messages or multi exception error messages.
Example Response (application/json)
{
"Single error response example":{
"errorCode":"21171",
"message":"promo1001 is not a valid promotion id",
"status":"400"
},
"Multiple error response example":[
{
"errorCode":"00000000",
"message":"promo1001 is not a valid promotion id",
"errors":[
{
"errorCode":"21171",
"message":"promo1001 is not a valid promotion id",
"status":"400"
},
{
"errorCode":"21171",
"message":"promo1002 is not a valid promotion id",
"status":"400"
}
],
"status":"400"
}
]
}
401 Response
The following response occurs if there is not a valid bearer token present in request authorization header
Example Response (application/json)
{
"errorCode":"60006000",
"message":"The user is not authenticated.",
"status":"401"
}