Skip to content

Releases: denisneuf/python-amazon-ad-api

v0.1.3

12 Nov 14:58
b2a1096
Compare
Choose a tag to compare

Support for environment variables

import os

os.environ.setdefault('AD_API_REFRESH_TOKEN', 'Your-Token-Here')
os.environ.setdefault('AD_API_CLIENT_ID', 'Your-Client_Id-Here')
os.environ.setdefault('AD_API_CLIENT_SECRET', 'Your-Client_Secret-Here')
os.environ.setdefault('AD_API_PROFILE_ID', 'Your-Profile_Id-Here')

Support for Default marketplace operations

os.environ.setdefault('AD_API_DEFAULT_MARKETPLACE', 'DE')

***Default Marketplace if not set is Marketplaces.EU which covers (ES, FR, DE, UK, IT)

Solved Problem Installation

pytest
requests~=2.26.0
six>=1.16,<2
cachetools~=4.2.4
setuptools~=58.0.4
pycryptodome~=3.11.0
python-dotenv~=0.19.1
pytz~=2021.3
confuse~=1.6.0

@saleweaver

v0.1.2

10 Nov 14:50
Compare
Choose a tag to compare

Added support for Sponsored Display Advertising Modules:

  • Reports

Added support for Sponsored Display Advertising Modules:

  • Reports

v0.1.0

09 Nov 16:12
Compare
Choose a tag to compare

Added support for Sponsored Display Advertising Modules:

  • Campaigns
  • Ad Groups

Added Debug

Added a kwarg parameter debug=True will provide log info about header sent, method and URL and raw Response. Example:

try:
    states = 'enabled'
    result = Campaigns(debug=True).list_campaigns_extended(
        stateFilter=states
    )
    logging.info(result.payload)

except AdvertisingApiException as error:
    logging.info(ex)

Will return:

Header:

INFO:{'User-Agent': 'python-ad-api-0.1.0', 'Amazon-Advertising-API-ClientId': 'Your-Client-ID', 'Authorization': 'Bearer Your-Token', 'Amazon-Advertising-API-Scope': 'Your-Scope', 'Content-Type': 'application/json'}

Method URL:

INFO:GET https://advertising-api-test.amazon.com/v2/sp/campaigns/extended

Raw Response:

INFO:{'_content': b'[{"campaignId":215197523378948,"name":"CAMPAIGN.TEST.AD.API.SANDBOX.MANUAL.011","campaignType":"sponsoredProducts","targetingType":"manual","premiumBidAdjustment":false,"dailyBudget":20.0,"startDate":"20211201","state":"enabled","bidding":{"strategy":"legacyForSales","adjustments":[]},"portfolioId":214026997044134,"tags":{"PONumber":"10322924","accountManager":"Manager-ES"},"servingStatus":"PENDING_START_DATE","creationDate":1635272586000,"lastUpdatedDate":1635272586000}]', '_content_consumed': True, '_next': None, 'status_code': 200, 'headers': {'Server': 'Server', 'Date': 'Tue, 09 Nov 2021 15:51:39 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'x-amz-rid': '1CN2T09DBD8KF94501D1', 'x-amz-request-id': '1CN2T09DBD81925701D1', 'Vary': 'Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent', 'Permissions-Policy': 'interest-cohort=()'}, 'raw': <urllib3.response.HTTPResponse object at 0x1062610d0>, 'url': 'https://advertising-api-test.amazon.com/v2/sp/campaigns/extended?stateFilter=enabled', 'encoding': 'utf-8', 'history': [], 'reason': '', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(seconds=2, microseconds=379280), 'request': <PreparedRequest [GET]>, 'connection': <requests.adapters.HTTPAdapter object at 0x106201c10>}

Added Marketplaces Missing:

North America (NA, US, CA, MX)
Far East (JP, AU)
Europe (UK alias GB, AE) EU can be used as wildcard when currency is EUR
Thanks to @mkdir700

v0.0.9

01 Oct 10:36
Compare
Choose a tag to compare

Added endpoints as dict to get sandbox and production api endpoints in the same marketplace, EU (ES, GB, FR, DE, IT) NA (US not tested)

v0.0.8

29 Sep 20:25
Compare
Choose a tag to compare

Added support for Sponsored Product Advertising Modules:

  • Reports
  • Snapshots

v0.0.7

23 Sep 23:21
Compare
Choose a tag to compare

Added support for Sponsored Brands:

  • Campaigns
  • AdGroups
  • Keywords
  • Negative Keywords
  • Product Targeting
  • Negative Product Targeting
  • Targeting Recommendations
  • Bid Recommendations
  • Stores
  • Landing Page Asins
  • Media
  • Brands
  • Moderation

v0.0.6

20 Sep 21:05
Compare
Choose a tag to compare

Complete support for Common Resources:

  • History
  • Localization
  • Audiences
  • Portfolios
  • Insights

v0.0.5

18 Sep 19:39
Compare
Choose a tag to compare

Added support for Common Resources:

  • Profiles
  • Invoices
  • Eligibility
  • Metadata

v0.0.1

11 Sep 21:36
Compare
Choose a tag to compare
v0.0.1 Pre-release
Pre-release

First Release support for Sponsored Product Advertising

v0.0.4

17 Sep 19:52
Compare
Choose a tag to compare

Added support for Sponsored Product Advertising Modules:

  • Campaign negative keywords