Stream Subscription

Vendor docs

https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/openapi#tag/Stream-Subscription

Subscriptions to the Amazon Marketing Stream data feed: create a subscription, update it, read one and list them. All four live on /streams/subscriptions in ad_api/api/stream.py, class Stream.

class ad_api.api.Stream(account: str = 'default', marketplace: Marketplaces = Marketplaces.EU, credentials: Dict[str, str] | None = None, proxies: Dict[str, str] | None = None, verify: bool = True, timeout: int | None = None, debug: bool = False, access_token: str | None = None, verify_additional_credentials: bool = True)

Amazon Marketing Stream

Documentation: https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/openapi#tag/Stream-Subscription

create_subscription(**kwargs) → ApiResponse

Request the creation a new subscription

Request body
notes (string): [optional] Additional details associated with the subscription
clientRequestToken (string): [required] Unique value supplied by the caller used to track identical API requests. Should request be re-tried, the caller should supply the same value.
dataSetId (string): [required] Identifier of data set, callers can be subscribed to. Please refer to https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/data-guide for the list of all data sets.
destinationArn (string): [required] AWS ARN of the destination endpoint associated with the subscription. Supported destination type - SQS.
Returns:

ApiResponse

update_subscription(subscription_id: str, **kwargs) → ApiResponse

Update an existing subscription

Request body
notes (string): [optional] Additional details associated with the subscription
status (string): [optional] Update the status of the entity. Supported value: ‘ARCHIVED’
Returns:

ApiResponse

get_subscription(subscription_id: str, **kwargs) → ApiResponse

Fetch a specific subscription by ID

Keyword Args
path subscriptionId (string): [required] Unique subscription identifier
Returns:

ApiResponse

list_subscriptions(**kwargs) → ApiResponse

List subscriptions

query maxResults:string | Optional. [1-5000] Desired number of entries in the response, defaults to maximum value

query startingToken:string | Optional. Token which can be used to get the next page of results, if more entries exist

Returns:

ApiResponse