Skip to content

Conversation

@murdercode
Copy link

This PR add support to new Offers for Prime, min 30 days price and all new features.
Successfully tested in production with a large database of products (22k). Official documentation here.


This pull request updates the way offers are handled in both the GetItems and GetVariations operations by introducing a new resource, OffersV2Full, which includes additional deal details. The main changes ensure that when the "OffersV2" option is selected, the more comprehensive OffersV2Full resource (with deal details) is used instead of the previous OffersV2.

Resource enhancements:

  • Added a new OffersV2Full resource in src/resources/OffersV2Full.php, which extends the base Resource class and includes additional fields such as Listings.DealDetails for more comprehensive offer information.

Updates to operations:

  • Updated the resource list in both GetItems and GetVariations to use OffersV2Full instead of OffersV2, ensuring that deal details are included when the V2 offers option is selected. (src/operations/GetItems.php, [1]; src/operations/GetVariations.php, [2]
  • Modified the constructors in both GetItems and GetVariations so that the conditional logic now selects OffersV2Full (with deal details) instead of the previous OffersV2 resource when the $isOffersV2 flag is true. (src/operations/GetItems.php, [1]; src/operations/GetVariations.php, [2]

murdercode and others added 2 commits October 7, 2025 10:29
Adds support for Deal Details in the OffersV2 API resource to retrieve Prime-exclusive deals and promotional information.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Remove Listings.DealDetails from OffersV2 (not supported by SearchItems)
- Create OffersV2Full with DealDetails for GetItems and GetVariations
- Update GetItems and GetVariations to use OffersV2Full when OffersV2 is enabled

This allows SearchItems to use OffersV2 base resources while GetItems/GetVariations can access full deal details including DealDetails for Prime-exclusive offers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant