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(notification_type: NotificationType, **kwargs)
deprecated, use create_subscription
- create_subscription(self, notification_type: NotificationType or str, destination_id: str = None, **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.
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(NotificationType.MFN_ORDER_STATUS_CHANGE, destination_id='dest_id')
- Parameters:
notification_type – NotificationType or str
destination_id – str
**kwargs
- Return type:
- get_subscription(self, notification_type: NotificationType or str, **kwargs) ApiResponse
Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier.
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(NotificationType.REPORT_PROCESSING_FINISHED)
- Parameters:
notification_type – NotificationType or str
**kwargs
- Return type:
- delete_notification_subscription(self, notification_type: NotificationType or str, subscription_id: str, **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 API is grantless. For more information, see “Grantless operations” in the Selling Partner API Developer Guide.
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
Notifications().delete_notification_subscription(NotificationType.MFN_ORDER_STATUS_CHANGE, ‘subscription_id’)
- Parameters:
notification_type – NotificationType or str
subscription_id – str
**kwargs
- Return type:
- create_destination(self, name: str, arn: str, **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.
Usage Plan:
Rate (requests per second)
Burst
1
5
Examples
literal blocks:
Notifications().create_destination(name='test', arn='arn:aws:sqs:us-east-2:444455556666:queue1')
- Parameters:
account_id
region
name – str
arn – str
**kwargs
- Return type:
- get_destinations(self, **kwargs) ApiResponse
Returns information about all destinations. The getDestinations API is grantless. For more information, see “Grantless operations” in the Selling Partner API Developer Guide.
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
- Parameters:
**kwargs
- Return type:
- get_destination(self, destination_id: str, **kwargs) ApiResponse
Returns information about all destinations. The getDestinations API is grantless. For more information, see “Grantless operations” in the Selling Partner API Developer Guide.
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
- Parameters:
destination_id – str
**kwargs
- Return type:
- delete_destination(self, destination_id: str, **kwargs) ApiResponse
Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see “Grantless operations” in the Selling Partner API Developer Guide.
Usage Plan:
Rate (requests per second)
Burst
1
5
For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
- Parameters:
destination_id – str
**kwargs
- Return type: