Accept or Reject Recommendations
Users can Apply (accept) or Reject (dismiss) recommendations using this endpoint
Request Parameters
| Parameter | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | Advertiser Id | integer | Y | valid advertiser ID |
| actions | List of actions to perform on recommendations. .**_ | Array | Y |
actions Objects
| Parameter | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| recommendationId | ID of the recommendation to act upon | string | Y | valid advertiser ID |
| action | Action to perform on the recommendation | string | Y | ACCEPT, REJECT |
- Only ACTIVE recommendation IDs are allowed in the actions list.
- The same recommendationId must not appear with both ACCEPT and REJECT in the same request.
- Duplicate recommendationId values are not allowed within the request.
- Recommendations may overlap (for example, a campaign-level change may supersede an ad group-level change). When you act on one recommendation, any overlapping recommendations may be automatically marked invalid and removed from the active set
Sample Request : Act on active recommendations
curl --location --request POST 'https://developer.api.us.walmart.com/api-proxy/service/display/api/v1/api/v1/recommendations/action' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_CONSUMER.ID: abcde-v123-fa2r-a1fs-asd45f6qef' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "advertiserId": 12345, "actions": [ { "recommendationId": "6f0a9153-8049-4dca-97b7-35be7dec9710-targeting", "action": "ACCEPT" }, { "recommendationId": "f37c9a1e-eec1-4727-b7b0-37aebb2e3780-targeting", "action": "REJECT" } ]
}'Sample Request : Act on invalid recommendationIds OR Act on recommendations that were already applied or rejected before
curl --location --request POST 'https://developer.api.us.walmart.com/api-proxy/service/display/api/v1/api/v1/recommendations/action' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_CONSUMER.ID: abcde-v123-fa2r-a1fs-asd45f6qef' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "advertiserId": 12345, "actions": [ { "recommendationId": "6f0a9153-8049-4dca-97b7-35be7dec9710-targeting", "action": "ACCEPT" }, { "recommendationId": "f37c9a1e-eec1-4727-b7b0-37aebb2e3780-targeting", "action": "REJECT" } ]
}'Response
| Element | Description | Nullable? | Type | Possible values |
|---|---|---|---|---|
| results | List of results corresponding to each action. | Y | Array |
results object
| Element | Description | Nullable? | Type | Possible values |
|---|---|---|---|---|
| code | Status of processing this specific action | string | success, failure | |
| details | List of detail messages and/or error codes for this action | Array | ||
| recommendationId | ID of the recommendation for which the action was processed. | Y | string | |
| action | Action that was requested for this recommendation | Y | string | ACCEPTED, REJECTED |
Sample Response : Act on active recommendations
{ "results": [ { "recommendationId": "6f0a9153-8049-4dca-97b7-35be7dec9710-targeting", "action": "ACCEPT", "code": "success" }, { "recommendationId": "f37c9a1e-eec1-4727-b7b0-37aebb2e3780-targeting", "action": "REJECT", "code": "success" } ]
} Sample Response : recommendationId does not exist, recommendation already applied or rejected
{ "results": [ { "recommendationId": "6f0a9153-8049-4dca-97b7-35be7dec9710-targeting", "action": "ACCEPT", "code": "failure", "details": ["RECOMMENDATION_DOES_NOT_EXIST"] }, { "recommendationId": "f37c9a1e-eec1-4727-b7b0-37aebb2e3780-targeting", "action": "REJECT", "code": "failure", "details": ["RECOMMENDATION_IS_ALREADY_ACCEPTED_OR_REJECTED"] } ]
}
Updated about 9 hours ago
Did this page help you?
