sp_api_clients 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c71c8c23330671f30dac0062ae042e7bd71023191bcd63d162ebd82b8ae84dbf
4
- data.tar.gz: 19f449b014108e97650d7919aa768c5a77d0e1361532ebfa256309ff1447a7bc
3
+ metadata.gz: 897a4bc54418f9753ad15d9f6249c2ecb8151a9212e115d885867a6c4b21b5c2
4
+ data.tar.gz: fa267bd3d910b86785fa740054fb668f42c370f58665ff7d6eb36331a29d8645
5
5
  SHA512:
6
- metadata.gz: 19b0f5eb3625e1150e2536598544f9a43be902a995d8fdb362003db4f553cc1b9a49f422f987035548db38a47aa7e524ea56d1340ff679c8921ef957aba48b3f
7
- data.tar.gz: 12f26dd1a81dc282579b186b5c4ac554888b321fdebb2a50dd1561df04e989f1d21138eac130f2587ad47f54a6f7321403d01829415d29a20ef8b48838407bf0
6
+ metadata.gz: 98f91b4ac8b5a1743d184276b28325e4fd02ebb2966b1265abce8e5e4ae5624738ee73062c945221eba72a6d523a687af03145f798aede11e578cd04484b745d
7
+ data.tar.gz: 900cda2cfafb4530e41eab09beb81c42cdcce92070e035a39137a148290e61f2296e7013e97b2b61b8cee42196a3f1ebc5489003e113d82ba1b164b74222057f
data/CHANGELOG.md CHANGED
@@ -6,6 +6,32 @@ Notable changes to this gem. The format follows
6
6
  Changes that only track updates to Amazon's API models are not
7
7
  considered breaking and do not trigger a major version bump.
8
8
 
9
+ ## [2.1.0] - 2026-09-07
10
+
11
+ ### Added
12
+
13
+ - `client.orders_2026`, the Orders API v2026-01-01, in V2 only.
14
+ `search_orders` replaces `get_orders`; `get_order` returns the items
15
+ and, through `included_data:`, the buyer, recipient and other blocks
16
+ that v0 served from separate operations. The API takes no restricted
17
+ data token, so the methods have no `rdt:` keyword. The body has no
18
+ `payload` wrapper: read `payload[:orders]` and
19
+ `payload.dig(:pagination, :nextToken)`. README, "Orders API
20
+ v2026-01-01", lists the differences; Amazon's migration guide maps
21
+ the fields.
22
+ - `rdt: false` in `codegen-config.yml` drops the `rdt:` keyword from a
23
+ module whose API never uses restricted data tokens.
24
+ - `get_feed_document` and `get_report_document` take
25
+ `enable_content_encoding_url_header:` (V2), or the same key in `opts`
26
+ (v1), new in Amazon's specs.
27
+
28
+ ### Changed
29
+
30
+ - The Amazon models pin moves from 2025-02-26 to 2026-08-26. Apart from
31
+ the parameter above, the regenerated code differs only in comments.
32
+ Amazon marks every Orders v0 operation deprecated; `orders_v0` stays
33
+ in v1 and V2 until v1 is removed.
34
+
9
35
  ## [2.0.1] - 2026-09-07
10
36
 
11
37
  ### Added
data/README.md CHANGED
@@ -118,10 +118,12 @@ client = AmazonSpClients::V2::Client.new(config) { store.access_token }
118
118
  # Or let the client exchange a refresh token itself (needs client_id and client_secret).
119
119
  client = AmazonSpClients::V2::Client.with_refresh_token(config, refresh_token)
120
120
 
121
- orders = client.orders_v0.get_orders(['ATVPDKIKX0DER'], created_after: '2026-09-01T00:00:00Z')
122
- orders.payload[:Orders] # symbol keys, as in v1
123
- orders.payload[:NextToken]
124
- orders.reported_rate_limit # Float from x-amzn-RateLimit-Limit, or nil
121
+ orders = client.orders_2026.search_orders(marketplace_ids: ['ATVPDKIKX0DER'],
122
+ created_after: '2026-09-01T00:00:00Z',
123
+ included_data: %w[BUYER RECIPIENT])
124
+ orders.payload[:orders] # symbol keys; the body has no payload wrapper
125
+ orders.payload.dig(:pagination, :nextToken) # absent on the last page
126
+ orders.reported_rate_limit # Float from x-amzn-RateLimit-Limit, or nil
125
127
  ```
126
128
 
127
129
  To read a rotated refresh token back, build the credentials yourself
@@ -140,9 +142,36 @@ as v1; optional ones are keywords. Unknown keywords raise
140
142
  `ArgumentError` (v1 ignored them), so pass only the parameters the
141
143
  operation has.
142
144
 
145
+ ### Orders API v2026-01-01
146
+
147
+ `orders_2026` is the current Orders API, and V2 only. Amazon marks every
148
+ Orders v0 operation deprecated; `orders_v0` stays until v1 is removed.
149
+ What a caller has to know:
150
+
151
+ - Two operations. `search_orders` replaces `get_orders`. `get_order`
152
+ returns the items and, with `included_data:`, the blocks v0 served
153
+ from separate operations: `BUYER`, `RECIPIENT`, `PROCEEDS`, `EXPENSE`,
154
+ `PROMOTION`, `CANCELLATION`, `FULFILLMENT`, `PACKAGES`, `TAX`,
155
+ `PAYMENT`, `FULFILLMENT_ORDERS`.
156
+ - No restricted data tokens. PII needs role permissions only, so the
157
+ methods have no `rdt:` keyword.
158
+ - Every `search_orders` parameter is optional, but Amazon wants exactly
159
+ one of `created_after:` and `last_updated_after:`.
160
+ - Pages with `pagination_token:`. The response carries
161
+ `payload.dig(:pagination, :nextToken)`, missing on the last page. A
162
+ token expires after 24 hours.
163
+ - Renamed values: `fulfillment_statuses:` takes `UNSHIPPED`, `SHIPPED`,
164
+ `CANCELLED` and so on; `fulfilled_by:` takes `MERCHANT` or `AMAZON`.
165
+ - The default rate of `search_orders` is 0.0056 requests per second
166
+ with a burst of 20. v0 `get_orders` had 0.0167.
167
+
168
+ Amazon's [migration guide](https://developer-docs.amazon/sp-api/docs/orders-api-migration-guide)
169
+ maps every v0 field to its new place.
170
+
143
171
  ### Restricted data tokens
144
172
 
145
173
  Operations that return PII take `rdt:`, a list of restricted resources.
174
+ The 2026 Orders API is the exception (see above).
146
175
  The client fetches the token, caches it until it expires, and sends it
147
176
  instead of the access token.
148
177
 
@@ -193,6 +222,7 @@ client.download_report_document(report_document_payload) # String, gunzipped whe
193
222
  | `TokenExchangeAuth.new(refresh_token).exchange` | `LWA.new(config).exchange(refresh_token: refresh_token)`. The config must carry `client_id` and `client_secret`; `LWA.new` raises `ArgumentError` when they are missing, where v1 sent the request and got an LWA error back. |
194
223
  | `response[:access_token]` | `token.access_token`, `token.expires_in`, `token.expires_at` |
195
224
  | `SpOrdersV0::OrdersV0Api.new(session)` | `client.orders_v0` |
225
+ | `get_orders`, then `get_order_items`, `get_order_buyer_info`, `get_order_address` per order | `client.orders_2026.search_orders(marketplace_ids: ids, ...)`, then `get_order(id, included_data: %w[BUYER RECIPIENT])`. The current Orders API; no `rdt:`. See "Orders API v2026-01-01". |
196
226
  | `get_orders(ids, opts)` with an options Hash | `get_orders(ids, **opts)` with real parameter names only |
197
227
  | `auth_names: [:orders_and_items]` | `rdt: RDT::ORDERS_AND_ITEMS` |
198
228
  | `auth_names: [{ method: 'GET', path: path }]` | `rdt: RDT.report_document(doc_id)` for a report document, `rdt: [RDT.resource('GET', path)]` for anything else |
@@ -230,7 +260,9 @@ bundle exec rake generate:update # pull latest specs, regenerate, advance the
230
260
  ```
231
261
 
232
262
  Which APIs get generated, and with which template sets (`v1`, `v2`), is
233
- controlled by `codegen-config.yml`. To adopt newer Amazon specs, run
263
+ controlled by `codegen-config.yml`. A module whose API never uses
264
+ restricted data tokens sets `rdt: false` there, and its V2 methods have
265
+ no `rdt:` keyword. To adopt newer Amazon specs, run
234
266
  `rake generate:update` and review the diff — the pin file change plus
235
267
  the regenerated files — in its own PR.
236
268
 
@@ -12,7 +12,7 @@ module AmazonSpClients
12
12
  #
13
13
  # OpenAPI spec version: 2021-06-30
14
14
  class Feeds2021 < Api
15
- # Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeeds) operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
15
+ # Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/reference/getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/reference/getfeeds) operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
16
16
  #
17
17
  # @param feed_id [String] The identifier for the feed. This identifier is unique only in combination with a seller ID.
18
18
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
@@ -21,7 +21,7 @@ module AmazonSpClients
21
21
  request(:delete, "/feeds/2021-06-30/feeds/#{encode(feed_id)}", rdt: rdt)
22
22
  end
23
23
 
24
- # Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#post-feeds2021-06-30feeds) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
24
+ # Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
25
25
  #
26
26
  # @param body [Hash] Information required to create the feed. (CreateFeedSpecification)
27
27
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
@@ -30,7 +30,7 @@ module AmazonSpClients
30
30
  request(:post, '/feeds/2021-06-30/feeds', body: body, rdt: rdt)
31
31
  end
32
32
 
33
- # Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
33
+ # Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
34
34
  #
35
35
  # @param body [Hash] Specifies the content type for the createFeedDocument operation. (CreateFeedDocumentSpecification)
36
36
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
@@ -51,10 +51,15 @@ module AmazonSpClients
51
51
  # Returns the information required for retrieving a feed document's contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
52
52
  #
53
53
  # @param feed_document_id [String] The identifier of the feed document.
54
+ # @param enable_content_encoding_url_header [Boolean, nil] When `true`, the Content-Encoding header on the returned URL is set to `gzip` instead of the default `identity` when `compressionAlgorithm` is `GZIP`. This allows automatic decompression by HTTP clients.
54
55
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
55
56
  # @return [AmazonSpClients::ApiResponse]
56
- def get_feed_document(feed_document_id, rdt: nil)
57
- request(:get, "/feeds/2021-06-30/documents/#{encode(feed_document_id)}", rdt: rdt)
57
+ def get_feed_document(feed_document_id, enable_content_encoding_url_header: nil, rdt: nil)
58
+ query = {
59
+ 'enableContentEncodingUrlHeader' => enable_content_encoding_url_header
60
+ }
61
+
62
+ request(:get, "/feeds/2021-06-30/documents/#{encode(feed_document_id)}", query: query, rdt: rdt)
58
63
  end
59
64
 
60
65
  # Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -32,8 +32,8 @@ module AmazonSpClients
32
32
 
33
33
  # Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
34
34
  #
35
- # @param body [Hash] CreateFulfillmentReturnRequest parameter (CreateFulfillmentReturnRequest)
36
- # @param seller_fulfillment_order_id [String] An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct `SellerFulfillmentOrderId` value based on the buyer's request to return items.
35
+ # @param body [Hash] The request body of the `createFulfillmentReturn` operation. (CreateFulfillmentReturnRequest)
36
+ # @param seller_fulfillment_order_id [String] An identifier the seller assigns to the fulfillment order at the time it was created. The seller uses their own records to find the correct `sellerFulfillmentOrderId` value based on the buyer's request to return items.
37
37
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
38
38
  # @return [AmazonSpClients::ApiResponse]
39
39
  def create_fulfillment_return(body, seller_fulfillment_order_id, rdt: nil)
@@ -49,12 +49,12 @@ module AmazonSpClients
49
49
  request(:post, '/fba/outbound/2020-07-01/deliveryOffers', body: body, rdt: rdt)
50
50
  end
51
51
 
52
- # Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api)..
52
+ # Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
53
53
  #
54
54
  # @param marketplace_id [String] The marketplace for which to return a list of the inventory that is eligible for the specified feature.
55
55
  # @param feature_name [String] The name of the feature for which to return a list of eligible inventory.
56
- # @param next_token [String, nil] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
57
- # @param query_start_date [String, nil] A date that you can use to select inventory that has been updated since a specified date. An update is defined as any change in feature-enabled inventory availability. The date must be in the format yyyy-MM-ddTHH:mm:ss.sssZ
56
+ # @param next_token [String, nil] A string token returned in the response to your previous request that is used to return the next response page. A value of `null` will return the first page.
57
+ # @param query_start_date [String, nil] A date that you can use to select inventory that has been updated since a specified date. An update is defined as any change in feature-enabled inventory availability. The date must be in the format `yyyy-MM-ddTHH:mm:ss.sssZ`
58
58
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
59
59
  # @return [AmazonSpClients::ApiResponse]
60
60
  def get_feature_inventory(marketplace_id, feature_name, next_token: nil, query_start_date: nil, rdt: nil)
@@ -67,11 +67,11 @@ module AmazonSpClients
67
67
  request(:get, "/fba/outbound/2020-07-01/features/inventory/#{encode(feature_name)}", query: query, rdt: rdt)
68
68
  end
69
69
 
70
- # Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn't eligible, the response will contain an empty skuInfo object. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
70
+ # Returns the number of items with the `sellerSku` you specify that can have orders fulfilled using the specified feature. Note that if the `sellerSku` isn't eligible, the response will contain an empty `skuInfo` object. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
71
71
  #
72
72
  # @param marketplace_id [String] The marketplace for which to return the count.
73
73
  # @param feature_name [String] The name of the feature.
74
- # @param seller_sku [String] Used to identify an item in the given marketplace. `SellerSKU` is qualified by the seller's `SellerId`, which is included with every operation that you submit.
74
+ # @param seller_sku [String] Used to identify an item in the given marketplace. `sellerSku` is qualified by the seller's `sellerId`, which is included with every operation that you submit.
75
75
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
76
76
  # @return [AmazonSpClients::ApiResponse]
77
77
  def get_feature_sku(marketplace_id, feature_name, seller_sku, rdt: nil)
@@ -115,7 +115,7 @@ module AmazonSpClients
115
115
 
116
116
  # Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
117
117
  #
118
- # @param package_number [Integer] The unencrypted package identifier returned by the `getFulfillmentOrder` operation.
118
+ # @param package_number [Integer] The unencrypted package identifier. You can obtain this value from the `getFulfillmentOrder` operation.
119
119
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
120
120
  # @return [AmazonSpClients::ApiResponse]
121
121
  def get_package_tracking_details(package_number, rdt: nil)
@@ -126,7 +126,7 @@ module AmazonSpClients
126
126
  request(:get, '/fba/outbound/2020-07-01/tracking', query: query, rdt: rdt)
127
127
  end
128
128
 
129
- # Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api)
129
+ # Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the `nextToken` parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api)
130
130
  #
131
131
  # @param query_start_date [String, nil] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
132
132
  # @param next_token [String, nil] A string token returned in the response to your previous request.
@@ -172,7 +172,7 @@ module AmazonSpClients
172
172
 
173
173
  # Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `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 have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
174
174
  #
175
- # @param body [Hash] UpdateFulfillmentOrderRequest parameter (UpdateFulfillmentOrderRequest)
175
+ # @param body [Hash] The request body of the `updateFulfillmentOrder` operation. (UpdateFulfillmentOrderRequest)
176
176
  # @param seller_fulfillment_order_id [String] The identifier assigned to the item by the seller when the fulfillment order was created.
177
177
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
178
178
  # @return [AmazonSpClients::ApiResponse]
@@ -8,16 +8,16 @@ module AmazonSpClients
8
8
  module V2
9
9
  # Selling Partner API for Listings Items
10
10
  #
11
- # The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
11
+ # The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you can use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, refer to the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
12
12
  #
13
13
  # OpenAPI spec version: 2021-08-01
14
14
  class ListingsItems2021 < Api
15
- # Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
15
+ # Delete a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
16
16
  #
17
17
  # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
18
- # @param sku [String] A selling partner provided identifier for an Amazon listing.
19
- # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
20
- # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
18
+ # @param sku [String] A selling partner-provided identifier for an Amazon listing.
19
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon store identifiers for the request.
20
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first Amazon store is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when localization is not available for the specified locale.
21
21
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
22
22
  # @return [AmazonSpClients::ApiResponse]
23
23
  def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rdt: nil)
@@ -29,12 +29,12 @@ module AmazonSpClients
29
29
  request(:delete, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, rdt: rdt)
30
30
  end
31
31
 
32
- # Returns details about a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
32
+ # Returns details about a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
33
33
  #
34
34
  # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
35
- # @param sku [String] A selling partner provided identifier for an Amazon listing.
36
- # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
37
- # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
35
+ # @param sku [String] A selling partner-provided identifier for an Amazon listing.
36
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon store identifiers for the request.
37
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first Amazon store is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when localization is not available for the specified locale.
38
38
  # @param included_data [Array<String>, nil] A comma-delimited list of data sets to include in the response. Default: `summaries`.
39
39
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
40
40
  # @return [AmazonSpClients::ApiResponse]
@@ -48,15 +48,15 @@ module AmazonSpClients
48
48
  request(:get, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, rdt: rdt)
49
49
  end
50
50
 
51
- # Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
51
+ # Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
52
52
  #
53
53
  # @param body [Hash] The request body schema for the `patchListingsItem` operation. (ListingsItemPatchRequest)
54
- # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
54
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon store identifiers for the request.
55
55
  # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
56
- # @param sku [String] A selling partner provided identifier for an Amazon listing.
56
+ # @param sku [String] A selling partner-provided identifier for an Amazon listing.
57
57
  # @param included_data [Array<String>, nil] A comma-delimited list of data sets to include in the response. Default: `issues`.
58
- # @param mode [String, nil] The mode of operation for the request.
59
- # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
58
+ # @param mode [String, nil] Describes the mode of operation for the request.
59
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first Amazon store is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when localization is not available for the specified locale.
60
60
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
61
61
  # @return [AmazonSpClients::ApiResponse]
62
62
  def patch_listings_item(body, marketplace_ids, seller_id, sku, included_data: nil, mode: nil, issue_locale: nil, rdt: nil)
@@ -70,15 +70,15 @@ module AmazonSpClients
70
70
  request(:patch, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, body: body, rdt: rdt)
71
71
  end
72
72
 
73
- # Creates or fully updates an existing listings item for a selling partner. **Note:** This operation has a throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
73
+ # Creates a new or fully-updates an existing listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
74
74
  #
75
75
  # @param body [Hash] The request body schema for the `putListingsItem` operation. (ListingsItemPutRequest)
76
- # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
76
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon store identifiers for the request.
77
77
  # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
78
- # @param sku [String] A selling partner provided identifier for an Amazon listing.
78
+ # @param sku [String] A selling partner-provided identifier for an Amazon listing.
79
79
  # @param included_data [Array<String>, nil] A comma-delimited list of data sets to include in the response. Default: `issues`.
80
- # @param mode [String, nil] The mode of operation for the request.
81
- # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
80
+ # @param mode [String, nil] Describes the mode of operation for the request.
81
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first Amazon store is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when localization is not available for the specified locale.
82
82
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
83
83
  # @return [AmazonSpClients::ApiResponse]
84
84
  def put_listings_item(body, marketplace_ids, seller_id, sku, included_data: nil, mode: nil, issue_locale: nil, rdt: nil)
@@ -95,9 +95,9 @@ module AmazonSpClients
95
95
  # Search for and return a list of selling partner listings items and their respective details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
96
96
  #
97
97
  # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
98
- # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
99
- # @param issue_locale [String, nil] A locale that is used to localize issues. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". When a localization is not available in the specified locale, localized messages default to "en_US".
100
- # @param included_data [Array<String>, nil] A comma-delimited list of datasets that you want to include in the response. Default: `summaries`.
98
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon store identifiers for the request.
99
+ # @param issue_locale [String, nil] A locale that is used to localize issues. When not provided, the default language code of the first Amazon store is used. Examples: "en_US", "fr_CA", "fr_FR". When a localization is not available in the specified locale, localized messages default to "en_US".
100
+ # @param included_data [Array<String>, nil] A comma-delimited list of data sets that you want to include in the response. Default: `summaries`.
101
101
  # @param identifiers [Array<String>, nil] A comma-delimited list of product identifiers that you can use to search for listings items. **Note**: 1. This is required when you specify `identifiersType`. 2. You cannot use 'identifiers' if you specify `variationParentSku` or `packageHierarchySku`.
102
102
  # @param identifiers_type [String, nil] A type of product identifiers that you can use to search for listings items. **Note**: This is required when `identifiers` is provided.
103
103
  # @param variation_parent_sku [String, nil] Filters results to include listing items that are variation children of the specified SKU. **Note**: You cannot use `variationParentSku` if you include `identifiers` or `packageHierarchySku` in your request.
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by lib/generator (bundle exec rake generate). Do not edit.
4
+
5
+ require 'amazon_sp_clients/v2/api'
6
+
7
+ module AmazonSpClients
8
+ module V2
9
+ # The Selling Partner API for Orders
10
+ #
11
+ # The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
12
+ #
13
+ # OpenAPI spec version: 2026-01-01
14
+ class Orders2026 < Api
15
+ # Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
16
+ #
17
+ # @param order_id [String] An Amazon-defined order identifier.
18
+ # @param included_data [Array<String>, nil] A list of datasets to include in the response.
19
+ # @return [AmazonSpClients::ApiResponse]
20
+ def get_order(order_id, included_data: nil)
21
+ query = {
22
+ 'includedData' => csv(included_data)
23
+ }
24
+
25
+ request(:get, "/orders/2026-01-01/orders/#{encode(order_id)}", query: query)
26
+ end
27
+
28
+ # Returns orders created or updated during the time period that you specify. You can filter the response for specific types of orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0056 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
29
+ #
30
+ # @param created_after [String, nil] The response includes orders created at or after this time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one of `createdAfter` and `lastUpdatedAfter` in your request. If `createdAfter` is provided, neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
31
+ # @param created_before [String, nil] The response includes orders created at or before this time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include `createdAfter` in the request, `createdBefore` is optional, and if provided must be equal to or after the `createdAfter` date and at least two minutes before the time of the request. If `createdBefore` is provided, neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
32
+ # @param last_updated_after [String, nil] The response includes orders updated at or after this time. An update is any change made by Amazon or the seller, including changes to order status. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one of `createdAfter` and `lastUpdatedAfter`. If `lastUpdatedAfter` is provided, neither `createdAfter` nor `createdBefore` may be provided.
33
+ # @param last_updated_before [String, nil] The response includes orders updated at or before this time. An update is any change made by Amazon or the seller, including changes to order status. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include `lastUpdatedAfter` in the request, `lastUpdatedBefore` is optional, and if provided must be equal to or after the `lastUpdatedAfter` date and at least two minutes before the time of the request. If `lastUpdatedBefore` is provided, neither `createdAfter` nor `createdBefore` may be provided.
34
+ # @param fulfillment_statuses [Array<String>, nil] A list of `FulfillmentStatus` values you can use to filter the results.
35
+ # @param marketplace_ids [Array<String>, nil] The response includes orders that were placed in marketplaces you include in this list. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of `marketplaceId` values.
36
+ # @param fulfilled_by [Array<String>, nil] The response includes orders that are fulfilled by the parties that you include in this list.
37
+ # @param max_results_per_page [Integer, nil] The maximum number of orders that can be returned per page. The value must be between 1 and 100. **Default:** 100.
38
+ # @param pagination_token [String, nil] Pagination occurs when a request produces a response that exceeds the `maxResultsPerPage`. This means that the response is divided into individual pages. To retrieve the next page, you must pass the `nextToken` value as the `paginationToken` query parameter in the next request. You will not receive a `nextToken` value on the last page.
39
+ # @param included_data [Array<String>, nil] A list of datasets to include in the response.
40
+ # @return [AmazonSpClients::ApiResponse]
41
+ def search_orders(created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, fulfillment_statuses: nil, marketplace_ids: nil, fulfilled_by: nil, max_results_per_page: nil, pagination_token: nil, included_data: nil)
42
+ query = {
43
+ 'createdAfter' => created_after,
44
+ 'createdBefore' => created_before,
45
+ 'lastUpdatedAfter' => last_updated_after,
46
+ 'lastUpdatedBefore' => last_updated_before,
47
+ 'fulfillmentStatuses' => csv(fulfillment_statuses),
48
+ 'marketplaceIds' => csv(marketplace_ids),
49
+ 'fulfilledBy' => csv(fulfilled_by),
50
+ 'maxResultsPerPage' => max_results_per_page,
51
+ 'paginationToken' => pagination_token,
52
+ 'includedData' => csv(included_data)
53
+ }
54
+
55
+ request(:get, '/orders/2026-01-01/orders', query: query)
56
+ end
57
+ end
58
+ end
59
+ end
@@ -12,7 +12,7 @@ module AmazonSpClients
12
12
  #
13
13
  # OpenAPI spec version: v0
14
14
  class OrdersV0 < Api
15
- # Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
15
+ # Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
16
16
  #
17
17
  # @param body [Hash] Request body of `confirmShipment`. (ConfirmShipmentRequest)
18
18
  # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
@@ -22,7 +22,7 @@ module AmazonSpClients
22
22
  request(:post, "/orders/v0/orders/#{encode(order_id)}/shipmentConfirmation", body: body, rdt: rdt)
23
23
  end
24
24
 
25
- # Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
25
+ # Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
26
26
  #
27
27
  # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
28
28
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
@@ -31,25 +31,25 @@ module AmazonSpClients
31
31
  request(:get, "/orders/v0/orders/#{encode(order_id)}", rdt: rdt)
32
32
  end
33
33
 
34
- # Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
34
+ # Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
35
35
  #
36
- # @param order_id [String] An `orderId` is an Amazon-defined order identifier, in 3-7-7 format.
36
+ # @param order_id [String] The Amazon order identifier in 3-7-7 format.
37
37
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
38
38
  # @return [AmazonSpClients::ApiResponse]
39
39
  def get_order_address(order_id, rdt: nil)
40
40
  request(:get, "/orders/v0/orders/#{encode(order_id)}/address", rdt: rdt)
41
41
  end
42
42
 
43
- # Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
43
+ # Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
44
44
  #
45
- # @param order_id [String] An `orderId` is an Amazon-defined order identifier, in 3-7-7 format.
45
+ # @param order_id [String] The Amazon order identifier in 3-7-7 format.
46
46
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
47
47
  # @return [AmazonSpClients::ApiResponse]
48
48
  def get_order_buyer_info(order_id, rdt: nil)
49
49
  request(:get, "/orders/v0/orders/#{encode(order_id)}/buyerInfo", rdt: rdt)
50
50
  end
51
51
 
52
- # Returns detailed order item information for the order that you specify. If `NextToken` is provided, it's used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
52
+ # Returns detailed order item information for the order that you specify. If `NextToken` is provided, it's used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
53
53
  #
54
54
  # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
55
55
  # @param next_token [String, nil] A string token returned in the response of your previous request.
@@ -63,7 +63,7 @@ module AmazonSpClients
63
63
  request(:get, "/orders/v0/orders/#{encode(order_id)}/orderItems", query: query, rdt: rdt)
64
64
  end
65
65
 
66
- # Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
66
+ # Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
67
67
  #
68
68
  # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
69
69
  # @param next_token [String, nil] A string token returned in the response of your previous request.
@@ -77,16 +77,16 @@ module AmazonSpClients
77
77
  request(:get, "/orders/v0/orders/#{encode(order_id)}/orderItems/buyerInfo", query: query, rdt: rdt)
78
78
  end
79
79
 
80
- # Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
80
+ # Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
81
81
  #
82
- # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
82
+ # @param order_id [String] The Amazon order identifier in 3-7-7 format.
83
83
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
84
84
  # @return [AmazonSpClients::ApiResponse]
85
85
  def get_order_regulated_info(order_id, rdt: nil)
86
86
  request(:get, "/orders/v0/orders/#{encode(order_id)}/regulatedInfo", rdt: rdt)
87
87
  end
88
88
 
89
- # Returns orders that are created or updated during the specified time period. If you want to return specific types of orders, you can apply filters to your request. `NextToken` doesn't affect any filters that you include in your request; it only impacts the pagination for the filtered orders response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
89
+ # Returns orders that are created or updated during the specified time period. If you want to return specific types of orders, you can apply filters to your request. `NextToken` doesn't affect any filters that you include in your request; it only impacts the pagination for the filtered orders response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
90
90
  #
91
91
  # @param marketplace_ids [Array<String>] A list of `MarketplaceId` values. Used to select orders that were placed in the specified marketplaces. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of `marketplaceId` values.
92
92
  # @param created_after [String, nil] Use this date to select orders created after (or at) a specified time. Only orders placed after the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the `CreatedAfter` parameter or the `LastUpdatedAfter` parameter is required. Both cannot be empty. `LastUpdatedAfter` and `LastUpdatedBefore` cannot be set when `CreatedAfter` is set.
@@ -97,7 +97,7 @@ module AmazonSpClients
97
97
  # @param fulfillment_channels [Array<String>, nil] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. **Possible values**: `AFN` (fulfilled by Amazon), `MFN` (fulfilled by seller).
98
98
  # @param payment_methods [Array<String>, nil] A list of payment method values. Use this field to select orders that were paid with the specified payment methods. **Possible values**: `COD` (cash on delivery), `CVS` (convenience store), `Other` (Any payment method other than COD or CVS).
99
99
  # @param buyer_email [String, nil] The email address of a buyer. Used to select orders that contain the specified email address.
100
- # @param seller_order_id [String, nil] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If `SellerOrderId` is specified, then `FulfillmentChannels`, `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`, LastUpdatedBefore, and `BuyerEmail` cannot be specified.
100
+ # @param seller_order_id [String, nil] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If `SellerOrderId` is specified, then `FulfillmentChannels`, `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`, `LastUpdatedBefore`, and `BuyerEmail` cannot be specified.
101
101
  # @param max_results_per_page [Integer, nil] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.
102
102
  # @param easy_ship_shipment_statuses [Array<String>, nil] A list of `EasyShipShipmentStatus` values. Used to select Easy Ship orders with statuses that match the specified values. If `EasyShipShipmentStatus` is specified, only Amazon Easy Ship orders are returned. **Possible values:** - `PendingSchedule` (The package is awaiting the schedule for pick-up.) - `PendingPickUp` (Amazon has not yet picked up the package from the seller.) - `PendingDropOff` (The seller will deliver the package to the carrier.) - `LabelCanceled` (The seller canceled the pickup.) - `PickedUp` (Amazon has picked up the package from the seller.) - `DroppedOff` (The package is delivered to the carrier by the seller.) - `AtOriginFC` (The packaged is at the origin fulfillment center.) - `AtDestinationFC` (The package is at the destination fulfillment center.) - `Delivered` (The package has been delivered.) - `RejectedByBuyer` (The package has been rejected by the buyer.) - `Undeliverable` (The package cannot be delivered.) - `ReturningToSeller` (The package was not delivered and is being returned to the seller.) - `ReturnedToSeller` (The package was not delivered and was returned to the seller.) - `Lost` (The package is lost.) - `OutForDelivery` (The package is out for delivery.) - `Damaged` (The package was damaged by the carrier.)
103
103
  # @param electronic_invoice_statuses [Array<String>, nil] A list of `ElectronicInvoiceStatus` values. Used to select orders with electronic invoice statuses that match the specified values. **Possible values:** - `NotRequired` (Electronic invoice submission is not required for this order.) - `NotFound` (The electronic invoice was not submitted for this order.) - `Processing` (The electronic invoice is being processed for this order.) - `Errored` (The last submitted electronic invoice was rejected for this order.) - `Accepted` (The last submitted electronic invoice was submitted and accepted.)
@@ -106,8 +106,8 @@ module AmazonSpClients
106
106
  # @param actual_fulfillment_supply_source_id [String, nil] The `sourceId` of the location from where you want the order fulfilled.
107
107
  # @param is_ispu [Boolean, nil] When true, this order is marked to be picked up from a store rather than delivered.
108
108
  # @param store_chain_store_id [String, nil] The store chain store identifier. Linked to a specific store in a store chain.
109
- # @param earliest_delivery_date_before [String, nil] Use this date to select orders with a earliest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
110
- # @param earliest_delivery_date_after [String, nil] Use this date to select orders with a earliest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
109
+ # @param earliest_delivery_date_before [String, nil] Use this date to select orders with an earliest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
110
+ # @param earliest_delivery_date_after [String, nil] Use this date to select orders with an earliest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
111
111
  # @param latest_delivery_date_before [String, nil] Use this date to select orders with a latest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
112
112
  # @param latest_delivery_date_after [String, nil] Use this date to select orders with a latest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
113
113
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
@@ -141,7 +141,7 @@ module AmazonSpClients
141
141
  request(:get, '/orders/v0/orders', query: query, rdt: rdt)
142
142
  end
143
143
 
144
- # Update the shipment status for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
144
+ # Update the shipment status for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
145
145
  #
146
146
  # @param body [Hash] The request body for the `updateShipmentStatus` operation. (UpdateShipmentStatusRequest)
147
147
  # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
@@ -151,10 +151,10 @@ module AmazonSpClients
151
151
  request(:post, "/orders/v0/orders/#{encode(order_id)}/shipment", body: body, rdt: rdt)
152
152
  end
153
153
 
154
- # Updates (approves or rejects) the verification status of an order containing regulated products. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
154
+ # Updates (approves or rejects) the verification status of an order containing regulated products. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
155
155
  #
156
156
  # @param body [Hash] The request body for the `updateVerificationStatus` operation. (UpdateVerificationStatusRequest)
157
- # @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
157
+ # @param order_id [String] The Amazon order identifier in 3-7-7 format.
158
158
  # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
159
159
  # @return [AmazonSpClients::ApiResponse]
160
160
  def update_verification_status(body, order_id, rdt: nil)