amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
590 stars 728 forks source link

Up to date schemas #458

Closed NoxArt closed 4 months ago

NoxArt commented 11 months ago

Hi, how is it possible to get up-to-date XML product feed schema? None of those available anywhere on the internet are up to date as Amazon keeps making stealth changes, e.g. adding new required elements to certain products.

image

Right now they added required BatteryCellComposition into CE somewhere ... I keep trying to update the feed by trial and error, but that's a crazy approach

I asked on official support, but success with Amazon support in general is extremely low

Thank you

NoxArt commented 11 months ago

Also the XSD I have says that CEBattery has no required element, when I use BatteryCellType as per schema it says it has to be BatteryType When I use BatteryType it says "The Message/Product/ProductData/CE/ProductType/CEBattery/BatteryType field heading is invalid, so values in this field were ignored. To correct this error, download the template again and use the new copy, or fix the field heading in your existing file." ... template? I'm using XML... Also BatteryCellType should be BatteryCellTypeValues which does not exist in any schema

GJ-JG commented 11 months ago

Hi @NoxArt , thanks for raising this question.

Have you tried our Listings API along with Product Type Definitions API? You can fetch the latest product types from Product Type Definitions API and use the schema to call Listings API to CRUD the listing items.

Here are the references: Product Type Definitions API: https://developer-docs.amazon.com/sp-api/docs/product-type-definitions-api-v2020-09-01-reference Listings API: https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-reference

Best, Jiang

NoxArt commented 11 months ago

Thank you

The schema doesn't seem to match what is expected on Amazon's production servers though

Setting aside that the properties use underscore case instead of pascal case, so that are_batteries_included are actually AreBatteriesIncluded

The schema says that cell_composition should be inside battery element after are_batteries are included ... but if I do that I get an error that there should be battery_subgroup instead ... which is not present in the schema anywhere

I mean that's as far as XML feed goes

We cannot use ListingsApi, we have far too many listings for that

wszwc commented 7 months ago

你好@NoxArt,感谢您提出这个问题。

您是否尝试过我们的 Listings API 和 Product Type Definitions API? 您可以从产品类型定义 API 获取最新的产品类型,并使用架构调用 Listings API 对列表项进行 CRUD。

以下是参考资料: 产品类型定义 API: https: //developer-docs.amazon.com/sp-api/docs/product-type-definitions-api-v2020-09-01-reference 列表 API:https:// developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-reference

最好, 蒋

Hi, When I try to use the ListingItem API, I get the JSON Schema for the product type. I need to make it into an html form for users to fill in product data. During this process, I encountered the following problems.

  1. How to filter required attributes for users to fill in like Amazon backend
  2. How do variant themes correspond to specific attributes? In the returned JSON Schema, there are enumerations of more than 60 variant themes. Not all of them belong to the current product type, and it is impossible to determine what attributes correspond to the variant themes. This leads me to wonder how to allow users to create multi-variant projects
  3. How to effectively use the "anyof" part of the validation? I can't translate his logic into a warning to constrain the data filled in by the user.