From 3009dc12a5948db0d68f693013fcef9d7ed0622f Mon Sep 17 00:00:00 2001 From: Sal Ricciardi Date: Wed, 18 May 2022 09:03:11 -0700 Subject: [PATCH] Add updated notifications model that supports processDirectives --- .../notifications.json | 132 ++++++++++++++++-- 1 file changed, 122 insertions(+), 10 deletions(-) diff --git a/models/notifications-api-model/notifications.json b/models/notifications-api-model/notifications.json index a5d99b1..9d22a6e 100644 --- a/models/notifications-api-model/notifications.json +++ b/models/notifications-api-model/notifications.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "description": "The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.\n\nFor more information, see the [Notifications Use Case Guide](doc:notifications-api-v1-use-case-guide)", + "description": "The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.\n\nFor more information, see the [Notifications Use Case Guide](doc:notifications-api-v1-use-case-guide).", "version": "v1", "title": "Selling Partner API for Notifications", "contact": { @@ -29,7 +29,7 @@ "tags": [ "notifications" ], - "description": "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.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "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.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "getSubscription", "parameters": [ { @@ -47,7 +47,19 @@ "payload": { "subscriptionId": "7fcacc7e-727b-11e9-8848-1681be663d3e", "payloadVersion": "1.0", - "destinationId": "3acafc7e-121b-1329-8ae8-1571be663aa2" + "destinationId": "3acafc7e-121b-1329-8ae8-1571be663aa2", + "processingDirective": { + "eventFilter": { + "marketplaceIds": [ + "ATVPDKIKX0DER", + "A2EUQ1WTGCTBG2" + ], + "aggregationSettings": { + "aggregationTimePeriod": "FiveMinutes" + }, + "eventFilterType":"ANY_OFFER_CHANGED" + } + } } } }, @@ -208,7 +220,7 @@ "tags": [ "notifications" ], - "description": "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.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "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.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "createSubscription", "parameters": [ { @@ -413,7 +425,7 @@ "tags": [ "notifications" ], - "description": "Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "getSubscriptionById", "parameters": [ { @@ -615,7 +627,7 @@ "tags": [ "notifications" ], - "description": "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.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "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](doc:grantless-operations) in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "deleteSubscriptionById", "parameters": [ { @@ -807,7 +819,7 @@ "tags": [ "notifications" ], - "description": "Returns information about all destinations. The getDestinations API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "Returns information about all destinations. The getDestinations API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "getDestinations", "parameters": [], "responses": { @@ -1010,7 +1022,7 @@ "tags": [ "notifications" ], - "description": "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.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "createDestination", "parameters": [ { @@ -1220,7 +1232,7 @@ "tags": [ "notifications" ], - "description": "Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "Returns information about the destination that you specify. The getDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "getDestination", "parameters": [ { @@ -1427,7 +1439,7 @@ "tags": [ "notifications" ], - "description": "Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.", + "description": "Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 1 | 5 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).", "operationId": "deleteDestination", "parameters": [ { @@ -1613,6 +1625,100 @@ } }, "definitions": { + "ProcessingDirective": { + "description": "Additional information passed to the subscription to control the processing of notifications. For example, you can use an eventFilter to customize your subscription to send notifications for only the specified marketplaceId's, or select the aggregation time period at which to send notifications (e.g. limit to one notification every five minutes for high frequency notifications). The specific features available vary depending on the notificationType.\n\nThis feature is limited to specific notificationTypes and is currently only supported by the ANY_OFFER_CHANGED notificationType.", + "type": "object", + "properties": { + "eventFilter": { + "description": "A notificationType specific filter.", + "$ref": "#/definitions/EventFilter" + } + } + }, + + "EventFilter": { + "description": "A notificationType specific filter. This object contains all of the currently available filters and properties that you can use to define a notificationType specific filter.", + "allOf": [ + { + "$ref": "#/definitions/AggregationFilter" + }, + { + "$ref": "#/definitions/MarketplaceFilter" + }, + { + "type": "object", + "properties": { + "eventFilterType": { + "type": "string", + "description": "An eventFilterType value that is supported by the specific notificationType. This is used by the subscription service to determine the type of event filter. Refer to the section of the [Notifications Use Case Guide](doc:notifications-api-v1-use-case-guide) that describes the specific notificationType to determine if an eventFilterType is supported." + } + }, + "required": [ + "eventFilterType" + ] + } + ] + }, + + "MarketplaceFilter" : { + "description": "Use this event filter to customize your subscription to send notifications for only the specified marketplaceId's.", + "type": "object", + "properties": { + "marketplaceIds": { + "$ref": "#/definitions/MarketplaceIds" + } + } + }, + + "MarketplaceIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of marketplace identifiers to subscribe to (e.g. ATVPDKIKX0DER). To receive notifications in every marketplace, do not provide this list." + }, + + "AggregationFilter" : { + "type": "object", + "properties": { + "aggregationSettings": { + "$ref": "#/definitions/AggregationSettings" + } + }, + "description": "Use this filter to select the aggregation time period at which to send notifications (e.g. limit to one notification every five minutes for high frequency notifications)." + }, + + "AggregationSettings": { + "type": "object", + "description": "A container that holds all of the necessary properties to configure the aggregation of notifications.", + "properties": { + "aggregationTimePeriod": { + "$ref": "#/definitions/AggregationTimePeriod", + "description": "The supported time period to use to perform marketplace-ASIN level aggregation." + } + }, + "required": [ + "aggregationTimePeriod" + ] + }, + "AggregationTimePeriod": { + "description": "The supported aggregation time periods. For example, if FiveMinutes is the value chosen, and 50 price updates occur for an ASIN within 5 minutes, Amazon will send only two notifications; one for the first event, and then a subsequent notification 5 minutes later with the final end state of the data. The 48 interim events will be dropped.", + "type": "string", + "enum": [ + "FiveMinutes", + "TenMinutes" + ], + "x-docgen-enum-table-extension": [ + { + "value": "FiveMinutes", + "description": "An aggregated notification will be sent every five minutes." + }, + { + "value": "TenMinutes", + "description": "An aggregated notification will be sent every ten minutes." + } + ] + }, "Subscription": { "type": "object", "required": [ @@ -1632,6 +1738,9 @@ "destinationId": { "type": "string", "description": "The identifier for the destination where notifications will be delivered." + }, + "processingDirective": { + "$ref": "#/definitions/ProcessingDirective" } }, "description": "Represents a subscription to receive notifications." @@ -1660,6 +1769,9 @@ "destinationId": { "type": "string", "description": "The identifier for the destination where notifications will be delivered." + }, + "processingDirective": { + "$ref": "#/definitions/ProcessingDirective" } }, "description": "The request schema for the createSubscription operation."