batchGrantPromotions

post

/ccadmin/v1/profiles/batchGrantPromotions

Grant Promotions for Profile(s).

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : batchGrantPromotions_request
Type: object
Show Source
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"
]
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds in initiating batch grant promotions to an array of given profiles
Body
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.
Body
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
Body
Example Response (application/json)
{
    "errorCode":"60006000",
    "message":"The user is not authenticated.",
    "status":"401"
}
Back to Top