Snapshots

Warning

Currently, the Ads API does not support snapshots for Sponsored Brands video campaigns or campaigns created using the version 4 endpoints. Snapshots include records for version 3, non-video campaigns only.

class ad_api.api.sb.Snapshots(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)

Use the Amazon Advertising API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the Sponsored Products Support Center. For onboarding information, see the account setup topic.

post_snapshot(self, recordType, **kwargs) ApiResponse:
Returns:

ApiResponse

get_snapshot(self, reportId, **kwargs) ApiResponse:

Gets the status of a requested snapshot.

Returns:

ApiResponse

download_snapshot(self, **kwargs) ApiResponse:

Downloads the snapshot previously get report specified by location (this is not part of the official Amazon Advertising API, is a helper method to download the snapshot). Take in mind that a direct download of location returned in get_snapshot will return 401 - Unauthorized.

kwarg parameter file if not provided will take the default amazon name from path download (add a path with slash / if you want a specific folder, do not add extension as the return will provide the right extension based on format choosed if needed)

kwarg parameter format if not provided a format will return a url to download the snapshot (this url has a expiration time)

Keyword Args
url (string): The location obatined from get_snapshot [required]
file (string): The path to save the file if mode is download json, zip or gzip. [optional]
format (string): The mode to download the snapshot: data (list), raw, url, json, zip, gzip. Default (url) [optional]
Returns:

ApiResponse