Skip to content

Commit

Permalink
sb keyword and target bid recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler committed Jan 29, 2020
1 parent 3e8c8c9 commit 40f0f5d
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions amazon_advertising_api/advertising_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,81 @@ def get_keyword_bid_recommendations(self, ad_group_id, keywords):

return self._operation(interface, data, method='POST')

def get_sb_keyword_bid_recommendations(self, campaign_id, keywords):
interface = 'recommendations/bids'

data = {
'campaignId': campaign_id,
'keywords': keywords
}

return self._operation(interface, data, method='POST')

def get_sb_target_bid_recommendations(self, campaign_id, keywords):
interface = 'recommendations/bids'

data = {
'campaignId': campaign_id,
'targets': keywords
}

return self._operation(interface, data, method='POST')

def get_bid_recommendations(self, expressions, keywords):
"""
Request bid recommendations for:
* a list of up to 100 targets
Keywords Example
{
"expressions": [
[
{
"type": "queryExactMatches",
"value": "oranges"
}
]
],
"adGroupId": 217706707887211
}
Auto Example
{
"expressions": [
[
{
"type": "queryBroadRelMatches",
"value": "apples"
}
]
],
"adGroupId": 163368712670649
}
{
"expressions": [
[
{
"type": "asinCategorySameAs",
"value": "166099011"
},
{
"type": "asinReviewRatingBetween",
"value": "4.5-5"
}
]
],
"adGroupId": 163368712670649
}
"""
interface = 'targets/bidRecommendations'

data = {
'adGroupId': ad_group_id,
'expressions': expressions
}

return self._operation(interface, data, method='POST')

def _download(self, location):
headers = {'Authorization': 'Bearer {}'.format(self._access_token),
'Content-Type': 'application/json',
Expand Down

0 comments on commit 40f0f5d

Please sign in to comment.