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
601 stars 730 forks source link

[BUG] Documentation #3010

Closed LONNIESAN closed 2 years ago

LONNIESAN commented 2 years ago

We are using the following interfaces

https://github.com/amzn/selling-partner-api-docs/blob/main/references/listings-items-api/listingsItems_2021-08-01.md

We can get the results from the get interface,but we cannot modify the price from the update interface

The following is the call information

get:

{ "code": 200, "msg": "success", "data": { "item": { "sku": "ZT002-MintGreen2026-1-New", "summaries": [ { "marketplaceId": "A2EUQ1WTGCTBG2", "asin": "B08XQ8KN8V", "productType": "PILLOWCASE", "conditionType": "NEW_NEW", "status": [ "BUYABLE", "DISCOVERABLE" ], "fnSku": "X002TJHLPN", "itemName": "HandSun 100% Mulberry Silk Pillowcase for Hair and Skin with Gift Package Both Side 19 Momme Silk Pillowcase, 1pc (Standard(20\"x26\")-New,Mint Green)", "createdDate": { "offset": { "totalSeconds": 0, "id": "Z", "rules": { "fixedOffset": true, "transitions": [], "transitionRules": [] } }, "dayOfYear": 76, "month": "MARCH", "dayOfWeek": "WEDNESDAY", "nano": 937000000, "year": 2021, "monthValue": 3, "dayOfMonth": 17, "hour": 6, "minute": 10, "second": 31 }, "lastUpdatedDate": { "offset": { "totalSeconds": 0, "id": "Z", "rules": { "fixedOffset": true, "transitions": [], "transitionRules": [] } }, "dayOfYear": 305, "month": "NOVEMBER", "dayOfWeek": "MONDAY", "nano": 361000000, "year": 2021, "monthValue": 11, "dayOfMonth": 1, "hour": 6, "minute": 48, "second": 14 }, "mainImage": { "link": "https://m.media-amazon.com/images/I/31EsRlc8cPL.jpg", "height": 500, "width": 500 } } ], "attributes": { "bulletPoint": [ { "languageTag": "en_CA", "value": "HandSun silk pillowcase is made of 19 momme 100% mulberry silk, 600 thread count. Mulberry silk pillowcase featuring a kind of natural organic fiber is soft, comfortable, strong and breathable. Sleeping on a silk pillow case will transform your sleep into a relaxing silky spa and offer you with a sweet dream." }, { "languageTag": "en_CA", "value": "PREMIUM SILK PILLOWCASE FOR HAIR AND SKIN: Mulberry silk pillowcase is abundant in animal protein with 18 kinds of essential amino acid, which allows silk pillowcase to nourish your hair and skin. In addition, pillow case silk doesn't absorb moisture from your hair and skin, making you wake up with fewer tangles, less frizzy and bedhead hair and keeping the skin better hydrated to prevent skin ageing. Sleeping on HandSun silky satin pillow case, you can SLEEP BEAUTIFULLY." }, { "languageTag": "en_CA", "value": "COMFORTABLE TEMPERATURE REGULATOR: Silk's natural protein structure makes silk pillow case ultra-soft and smooth. Mulberry silk pillowcase is breathable to maintain your body temperature by wicking your sweat away at summer nights. Silky satin pillow case keeps you cool in summer and warm in winter. Sleeping on HandSun silk pillowcase, you can SLEEP BETTER." }, { "languageTag": "en_CA", "value": "HIDDEN ZIPPER CLOSURE AND CARE: Silk pillow case has exquisite craftsmanship with neat stitches. The silk pillowcase with zipper hidden allows you to fit the pillow into pillow protector easily and hold your pillow perfectly overnight. Silk pillow cover performs best and wrinkle free when ironed damp in order to minimize the effects of the iron's heat. We recommend ironing right after an easy wash or heavy creases. Please follow the instructions on the washing label." }, { "languageTag": "en_CA", "value": "BEAUTIFUL MYSTERY GIFT: HandSun washable silk pillowcase with zipper has variable durable colors and sizes for choice. STANDARD size: 20x26 Inches (50x66 cm), QUEEN size: 20x30 Inches (50x75 cm), KING size: 20x36 Inches (50x90 cm). Silk pillowcase for hair and skin is a luxurious present for Birthday, Mother's Day, Valentine's Day, Christmas for you and your loved ones to keep young. If you aren't fond of your silk pillowcase in any way, only send us one email and you will get a great solution." } ], "genericKeyword": [], "description": [] }, "issues": [ { "code": null, "message": "Attributes tagged as relevant_attributes are incomplete. Provide values for the following attribute(s): pattern, number_of_pieces, item_display_dimensions", "severity": "WARNING", "attributeNames": [ "item_display_dimensions", "number_of_pieces", "pattern" ] } ], "offers": [ { "marketplaceId": "A2EUQ1WTGCTBG2", "offerType": "B2C", "price": { "amount": "26.99", "currencyCode": "CAD" }, "points": null }, { "marketplaceId": "A2EUQ1WTGCTBG2", "offerType": "B2B", "price": { "amount": "26.88", "currencyCode": "CAD" }, "points": null } ], "fulfillmentAvailability": [ { "fulfillmentChannelCode": "AMAZON_NA", "quantity": null } ], "procurement": [] }, "updateFlag": true, "listingItemFlag": 1 } }

When I use the above ProductType (PILLOWCASE) to request the update interface

{ code: 4000003 message: The Amazon product type specified is invalid or not supported. severity: ERROR attributeNames: null }

I want to know what ProductType is supported. It is not written in the document?

littleylv commented 2 years ago

Only ProductType defined here https://developer-docs.amazon.com/sp-api/docs/product-type-definitions-api-v2020-09-01-reference#searchdefinitionsproducttypes can be used in Listing Item API.

you can use POST_PRODUCT_PRICING_DATA feed type to update price if the product type is not defined.

chapmanjw commented 2 years ago

@LONNIESAN and @littleylv, for common attributes (like pricing), you can use the Listings Items API patchListingsItem operation with the PRODUCT product type to update these attributes individually (i.e., without having to do a full PUT on the listing). Until the applicable product type has been migrated to support the Product Type Definitions API and Listings Items API, the scope of attributes that you can edit are limited to the root PRODUCT product type.

I would suggest also subscribing to the product type changed notification to get push notifications as new product types are migrated to these APIs.

See https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide#tutorial-partially-update-a-listing for a tutorial on using the patch operation.