Fix batch pricing API: flatten queryParams to top-level properties (Amazon API contract change 2026-04-23)#929
Merged
abuzuhri merged 1 commit intoApr 25, 2026
Conversation
Amazon changed their SP-API batch pricing endpoints contract on 2026-04-23.
The previously accepted nested queryParams format now returns HTTP 400:
Requested MarketplaceId is invalid, unsupported, or does not exist.
The endpoints affected are:
POST /batches/products/pricing/v0/itemOffers
POST /batches/products/pricing/v0/listingOffers
Previously accepted (now broken):
{ uri: ..., method: GET, queryParams: { MarketplaceId: ATVPDKIKX0DER, ... } }
Now required (flat top-level):
{ uri: ..., method: GET, MarketplaceId: ATVPDKIKX0DER, ... }
Fix: mark QueryParams as [JsonIgnore] in both ItemOffersRequest and
ListingOffersRequest, and expose MarketplaceId, ItemCondition, CustomerType
as direct [JsonProperty] computed properties delegating to QueryParams.
This preserves the existing public API surface while correcting the wire format.
|
|
Thanks for fixing this. We're using the NuGet package, so can you update it there, too, please? Thanks |
abuzuhri
approved these changes
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Starting 2026-04-23, all calls to the batch pricing endpoints began failing with HTTP 400:
The affected endpoints are:
POST /batches/products/pricing/v0/itemOffersPOST /batches/products/pricing/v0/listingOffersAmazon changed their API contract to require query parameters to be serialized at the top level of each individual request object, rather than nested under a
queryParamskey.Previously accepted (now broken)
{ "uri": "/products/pricing/v0/items/B0001/offers", "method": "GET", "queryParams": { "MarketplaceId": "ATVPDKIKX0DER", "ItemCondition": "New", "CustomerType": "Consumer" } }Now required
{ "uri": "/products/pricing/v0/items/B0001/offers", "method": "GET", "MarketplaceId": "ATVPDKIKX0DER", "ItemCondition": "New", "CustomerType": "Consumer" }Fix
Marked
QueryParamsas[JsonIgnore]in bothItemOffersRequestandListingOffersRequest, and addedMarketplaceId,ItemCondition, andCustomerTypeas direct[JsonProperty]computed properties that delegate to the existingQueryParamsobject.This is a non-breaking change — the public API surface (
QueryParamsproperty, all parameter classes) is unchanged. Only the JSON wire format is affected.