Closed fanhaitao2021a closed 1 month ago
frist:
I invoke /definitions/2020-09-01/productTypes/LUGGAGE, return
second:
I invoke putListingsItem(/listings/2021-08-01/items/{sellerId}/{sku}), the request body paramter
I don't konw which attribute is must submit ,has 100+ attributes , submit 100+ attributes ?,which is equired I'm struggling with this matter since yesterday.
I also see schema link has "allOf", required attributes refer "allOf"? please tell me ,thanks ,thanks
@fanhaitao2021a The Definitions API provides standard JSON Schemas to describe which attributes are necessary for a product type and the conditionals which make them applicable. We do not provide support on JSON Schema itself, as that is an open source industry standard.
I would recommend starting here to understand these JSON Schemas along with some example implementations for validating your payloads using these JSON Schemas: https://developer-docs.amazon.com/sp-api/docs/product-type-definition-meta-schema
Additionally, the JSON Schema community has a LOT of documentation and getting started resources for using JSON Schema: https://json-schema.org/
@chapmanjw Hi, how are you, brother? I have encountered a problem now. When I use feed to submit products in batches, there is no problem. However, when I use put to submit, it always returns 400. However, if my product data triggers the interface verification, it will return normally. Why is this?
@wszwc I suspect there is a contractual piece missing or incorrect on the Listings API PUT submission. Can you share a timestamp + request id for me to investigate? Thanks.
@chapmanjw I have found the problem. My underlying SDK incorrectly added product data to the route, causing the URL to be too long and a 414 error. Thank you for your help
Hi @chapmanjw , "payload of putListingItem validation is being handled elsewhere, so ask them" . Sorry I don't understand English very well, but is that what you mean? but even after following the link you provided, I cannot figure out which attribute in the S3 schema is used for the required check.
Now, even if I tried to create a payload with an attribute that is "required" in the specified schema, I get Lots of errors "Required item missing 90220." In other words, I understand that the key is not field "required”
I just want to know what keywords I should use to search the S3 schema in order to find the requiredattributes for the payload in a putListingItem request. If you know where I can find more clear and understandable information, please let me know.
@Yurikohitomi Hello, I think he means that jsonschema is an open source structure and has nothing to do with Amazon. I have done relevant development here and can give you some suggestions: 1.The required items you are missing need to be obtained in the allof validation, which requires you to use jsonschema to additionally verify the data to obtain the required items. 2.In addition, if you do not plan to use jsonSchema for validation, it is almost impossible to use it to create a form for users to use. Because as you said, we have no way of knowing what the payload is unless all the attributes are filled in, but this is undoubtedly redundant. 3.However, as a person who has experienced it, I can tell you responsibly that the current validation is relatively difficult to use, and there are many unsatisfactory details. You need to do a lot of extra work to improve it.
@chapmanjw There are some problems in the validation. I sincerely report some of the problems I know:
Hello @wszwc,
Thank you for the advice. It was very helpful. I'll dig into the schema. I'm not really keen on it, though (lol)
hello, I ask a question,now I invoke putListingsItem publish a goods, a productType has many attributes ,I don't konw which attribute is must submit ,for example productType=LUGGAGE , has 100+ attributes ,now invoke putListingsItem, submit 100+ attributes ?,which is equired
My problem is also to avoid present the code 90220 (attribute_name is required but not supplied.)