Product Ads

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

Version 3 of the Sponsored Products API

Warning

This replaces the version 2 of Product Ads

list_product_ads(*args, **kwargs)

Lists Sponsored Products Ads.

Request Body (optional): Include the body for specific filtering, or leave empty to get all ad groups.
startIndex:integer | Optional. 0-indexed record offset for the result set. Default value : 0
stateFilter:string | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
campaignIdFilter:string | Optional. A comma-delimited list of campaign identifiers.
adGroupIdFilter:string | Optional. Restrict results to keywords associated with ad groups specified by identifier in the comma-delimited list.
adIdFilter:string | Optional. Restrict results to product ads associated with the product ad identifiers specified in the comma-delimited list. | next_token (string) Token value allowing to navigate to the next response page. [optional]
max_results (int) Number of records to include in the paginated response. Defaults to max page size for given API. Minimum 10 and a Maximum of 100 [optional]
includeExtendedDataFields (boolean) Whether to get entity with extended data fields such as creationDate, lastUpdateDate, servingStatus [optional]
Returns:

ApiResponse

create_product_ads(*args, **kwargs)

Create one or more SP Product Ads.

Request body: (Required) A list of product ads for creation. Note that the SKU field is used by sellers and the ASIN field is used by vendors.
campaignId’: (string) The campaign identifier.
customText (string) : The custom text to use for creating a custom text ad for the associated ASIN. Defined only for KDP Authors and Book Vendors in US marketplace.
adGroupId’: (string) The ad group identifier.
sku’: (string) The SKU associated with the product. Defined for seller accounts only.
asin’: (string) The ASIN associated with the product. Defined for vendors only.
state’: (string) The current resource state. ‘Enum’:[ enabled, paused, archived ]

Prefer (header) : You can use the prefer header to specify whether you want the full object representation as part of the response. If you don’t specify the prefer header, you will see just the ID of the created entity in the response.

Returns:

ApiResponse

edit_product_ads(*args, **kwargs)

Updates one or more product ads specified by identifier.

Request Body: (REQUIRED) A list of product ad objects with updated values for the state field.
adId: string The identifier of an existing product ad to update.
state: string The current resource state.’, ‘Enum’: [ enabled, paused, archived ]

Prefer (header) : You can use the prefer header to specify whether you want the full object representation as part of the response. If you don’t specify the prefer header, you will see just the ID of the created entity in the response.

Returns:

ApiResponse

delete_product_ads(*args, **kwargs)

Delete one or multiple sponsored product ads.

Request Body (required) : a dictionary to filter with ad ids that should be deleted. Sets the state of a specified product ad to archived

adIdFilter ({}) | include [string] : string list of ad object identifier.
Returns
ApiResponse