Skip to content

Conversation

kvydiuk
Copy link

@kvydiuk kvydiuk commented Aug 21, 2025

Hey mate!
Thanks for sharing this SDK - it is very useful as I don't need to duplicate all the code for interacting with Amazon PA API in my project.
However, I've noted one issue that blocks me from getting VariationAttributes data

q := query.NewGetVariations( client.Marketplace(), client.PartnerTag(), client.PartnerType(), ).ASIN(productID). EnableImages(). EnableItemInfo(). EnableOffers(). EnableVariationSummary(). ParentASIN()

I believe the issue is that the entity/entity.go type is not compatible with Amazon PA API response structure.
Current type VariationAttributes type location:
Item.ItemInfo.VariationAttributes
GetVariation operation VariationAttributes type location:
Item.VariationAttributes
Please, see:
https://webservices.amazon.com/paapi5/documentation/get-variations.html

@kvydiuk
Copy link
Author

kvydiuk commented Aug 28, 2025

@spiegel-im-spiegel , please review this tiny and straightforward PR when you have a chance

}
Offers *struct {
VariationAttributes []VariationAttribute `json:",omitempty"`
Copy link
Contributor

@Oakes6 Oakes6 Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the outer level member is VariationSummary.

@@ -182,9 +182,9 @@ type Item struct {
Currency string
}
} `json:",omitempty"`
VariationAttributes []VariationAttribute `json:",omitempty"`
Copy link
Contributor

@Oakes6 Oakes6 Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This member needs to stay. Their schema doesn't include it, but glance at the sample responses in the documentation. It includes it there and I'm able to get information by testing locally as well.

Copy link
Author

@kvydiuk kvydiuk Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, VariationAttributes is under the VariationsResult.Items[i] and not under VariationsResult.Items[i].ItemInfo in the sample response
Screenshot 2025-08-30 at 9 54 38 pm

@Oakes6
Copy link
Contributor

Oakes6 commented Aug 29, 2025

Disregard comments. This looks good to me.

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.

2 participants