Notifications#
- class sp_api.api.Notifications(marketplace: ~sp_api.base.marketplaces.Marketplaces = Marketplaces.US, *, refresh_token=None, account='default', credentials=None, restricted_data_token=None, proxies=None, verify=True, timeout=None, version=None, credential_providers=None, auth_token_client_class=<class 'sp_api.auth.access_token_client.AccessTokenClient'>)#
-
- grantless_scope: str = 'sellingpartnerapi::notifications'#
- add_subscription(self, notification_type, **kwargs) ApiResponse#
deprecated, use create_subscription
Examples
literal blocks:
Notifications().add_subscription("value")
- Parameters:
notification_type –
required**kwargs
- Returns:
ApiResponse
- create_subscription(self, notification_type, destination_id, **kwargs) ApiResponse#
Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Examples
literal blocks:
Notifications().create_subscription("value", "value")
- Parameters:
body – CreateSubscriptionRequest | required
param – object |
- Returns:
ApiResponse
- get_subscription(self, notification_type, **kwargs) ApiResponse#
Returns information about subscription of the specified notification type and payload version. payloadVersion is an optional parameter. When payloadVersion is not provided, it will return latest payload version subscription’s information. You can use this API to get subscription information when you do not have a subscription identifier.
Examples
literal blocks:
Notifications().get_subscription("value")
- Parameters:
notification_type –
required**kwargs
- Returns:
ApiResponse
- delete_notification_subscription(self, notification_type, subscription_id, **kwargs) ApiResponse#
Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Examples
literal blocks:
Notifications().delete_notification_subscription("value", "value")
- Parameters:
subscriptionId – object | required The identifier for the subscription that you want to delete.
param – object |
- Returns:
ApiResponse
- create_destination(self, name, arn, account_id, region, **kwargs) ApiResponse#
Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see “Grantless operations” in the Selling Partner API Developer Guide.
Examples
literal blocks:
Notifications().create_destination("value", "value", "value", "value")
- Parameters:
name –
requiredarn –
requiredaccount_id –
requiredregion –
required**kwargs
- Returns:
ApiResponse
- get_destinations(self, **kwargs) ApiResponse#
Returns information about all destinations. The getDestinations operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Examples
literal blocks:
Notifications().get_destinations()
- Parameters:
**kwargs
- Returns:
ApiResponse
- get_destination(self, destination_id, **kwargs) ApiResponse#
Returns information about the destination that you specify. The getDestination operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Examples
literal blocks:
Notifications().get_destination("value")
- Parameters:
destinationId – object | required The identifier generated when you created the destination.
- Returns:
ApiResponse
- delete_destination(self, destination_id, **kwargs) ApiResponse#
Deletes the destination that you specify. The deleteDestination operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Examples
literal blocks:
Notifications().delete_destination("value")
- Parameters:
destinationId – object | required The identifier for the destination that you want to delete.
- Returns:
ApiResponse
- get_subscription_by_id(self, notificationType, subscriptionId, **kwargs) ApiResponse#
Returns information about a subscription for the specified notification type. The getSubscriptionById operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Examples
literal blocks:
Notifications().get_subscription_by_id("value", "value")
- Parameters:
subscriptionId – object | required The identifier for the subscription that you want to get.
param – object |
- Returns:
ApiResponse