Fix: Convert marketplaceIds and sellerSkus arrays to comma-separated …#890
Open
Sgroove wants to merge 12 commits intojlevers:mainfrom
Open
Fix: Convert marketplaceIds and sellerSkus arrays to comma-separated …#890Sgroove wants to merge 12 commits intojlevers:mainfrom
Sgroove wants to merge 12 commits intojlevers:mainfrom
Conversation
…strings for FBA Inventory API (v6.0.1) Amazon's FBA Inventory API expects marketplaceIds and sellerSkus as comma-separated strings, not as array-encoded query parameters (marketplaceIds[0]=VALUE). This fixes the 'Bad Request (400) Invalid Input' error when calling getInventorySummaries. Fixes issue where Saloon HTTP client was encoding arrays as bracket notation which Amazon rejects. Based on v6.0.1 for Laravel 9 compatibility.
Amazon's FBA Inventory API expects boolean parameters as strings ('true'/'false'),
not integers (1/0). This was causing 'Invalid Input' errors even after the
marketplaceIds fix was applied.
Both fixes are now included:
1. marketplaceIds array -> comma-separated string
2. details boolean -> 'true'/'false' string
Tested and working with Laravel 9 + PHP 8.3.
The v6.0.1 branch should use Saloon\Http\Request instead of SellingPartnerApi\Request (which doesn't exist in v6). This was causing a 'Class not found' error when using the library.
BaseResponse was introduced in v7.0.0 but is required by all response classes in the library. This implementation matches BaseDto pattern for consistency. Fixes: Class 'Crescat\SaloonSdkGenerator\BaseResponse' not found error when using any API response classes (235+ classes depend on this base class).
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.
Fix: FBA Inventory API marketplaceIds array encoding
Amazon's FBA Inventory API rejects array-encoded query parameters
(marketplaceIds[0]=VALUE). This PR converts marketplaceIds and
sellerSkus arrays to comma-separated strings as required by Amazon's API.
Fixes "Bad Request (400) Invalid Input" error when calling getInventorySummaries.
Tested in production with Laravel 9 + PHP 8.3.