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

How can I POST new product? #811

Closed GrelaM100 closed 1 year ago

GrelaM100 commented 3 years ago

Hi, I am trying to POST product using SP-API. As far as I understand I should create feed using createFeed method from feeds-api with feedType = " POST_PRODUCT_DATA". However I don't know what feedOptions should I set. In use case guide I found request example for an Easy Ship order. Where can I find information about specific values of feedOptions parameter for every feedType?

roger-sanchez117 commented 3 years ago

In my experience, I recommend that you learn what is the process that Amazon establishes to load products. This involves learning about the product catalog, listings, product detail pages, and offers.

According to the tests I have done, you can load products with different types of files, each one has similar purposes but some are better adapted to some situations than others.

I have already been able to load products with the POST_PRODUCT_DATA feed for which you have to use an XML that you can generate from the schemas indicated here.

You can also use the POST_FLAT_FILE_INVLOADER_DATA feed, for this you will have to use an Excel template that later you will have to convert to a tab-separated-values file. This template can be obtained from Seller Central.

voronytskyi commented 3 years ago

For more details you can see here: https://github.com/amzn/selling-partner-api-docs/blob/main/guides/use-case-guides/feeds-api-use-case-guide-2020-09-04.md

madhupatel-hub commented 3 years ago

Hi, @roger-sanchez117 can you please provide me a sample working XML? create_product.txt create_product_error

Actually, I'm trying to create the product but it's giving me errors.

I'm not much familiar with the XSD format, I guess I'm doing something wrong. error say's i need to pass external_product_information,country_of_origin,size_name,color_name fields. But when I'm passing it, giving me the same error so, I'm a little bit confused about what I doing wrong. can you please help me? I have also attached my XML file and error screenshot. Thanks in Advance Madhu Patel

alpapazzo commented 3 years ago

In my experience, I recommend that you learn what is the process that Amazon establishes to load products. This involves learning about the product catalog, listings, product detail pages, and offers.

According to the tests I have done, you can load products with different types of files, each one has similar purposes but some are better adapted to some situations than others.

I have already been able to load products with the POST_PRODUCT_DATA feed for which you have to use an XML that you can generate from the schemas indicated here.

You can also use the POST_FLAT_FILE_INVLOADER_DATA feed, for this you will have to use an Excel template that later you will have to convert to a tab-separated-values file. This template can be obtained from Seller Central.

Hello Roger, I tried to upload a Flat file, but for each type: POST_FLAT_FILE_INVLOADER_DATA and POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA that are 2 differents files, I got the same error:

Exception when calling FeedsApi->createFeed: [400] Client error: POST https://sellingpartnerapi-eu.amazon.com/feeds/2020-09-04/feeds resulted in a 400 Bad Request response: { "errors": [ { "code": "InvalidInput", "message": "1 validation error detected: Value \u0027[]\u0027 (truncated...)

I call the createFeedDocument fist, so I get the documentId, and the signature elements. So I use utf8_encode to convert the file to utf8 and then I encrypt the and upload the file. When I call "createFeed" I get that error.

Do you have any suggestions ?

Thanks

wmh49877 commented 3 years ago

In my experience, I recommend that you learn what is the process that Amazon establishes to load products. This involves learning about the product catalog, listings, product detail pages, and offers.

According to the tests I have done, you can load products with different types of files, each one has similar purposes but some are better adapted to some situations than others.

I have already been able to load products with the POST_PRODUCT_DATA feed for which you have to use an XML that you can generate from the schemas indicated here.

You can also use the POST_FLAT_FILE_INVLOADER_DATA feed, for this you will have to use an Excel template that later you will have to convert to a tab-separated-values file. This template can be obtained from Seller Central.

hi @roger-sanchez117 , Do I need to write the xml file by myself, and then upload it encrypted through feeds? Is the process like this?

RRC92193 commented 3 years ago

I am having similar issues but am looking for a way to remove a listing.

iamsr commented 3 years ago

I am also getting external_product_information error even though I checked xsd there is no such field. In excel templates external_production_information is referred to HSN Code but not sure how or what variable needed in xml to input that. Need help.

mtkumar82 commented 3 years ago

I found out the issue. Please check the solution below it works for me.

<Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Product>
  <SKU>5678999993</SKU>
  <StandardProductID>
    <Type>ASIN</Type>
    <Value>5678999993</Value>
  </StandardProductID>
  <ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
  <DescriptionData>
    <Title>MULE 3L - Racing Red/Pitch Blue</Title>
    <Brand>CAMELBAK</Brand>
    <Description>This is a test product description.</Description>
    <BulletPoint>Perfect for hiking.</BulletPoint>
    <BulletPoint>Bladder for hydration.</BulletPoint>
    <MSRP currency="AUD">100.00</MSRP>
    <Manufacturer>CAMELBAK</Manufacturer>
    <ItemType>outdoor-backpacks</ItemType>
   <CountryOfOrigin>US</CountryOfOrigin>
  </DescriptionData>
  <ProductData>
    <Outdoors>
      <ProductType>
        <OutdoorRecreationProduct>
        </OutdoorRecreationProduct>
      </ProductType>
      <VariationData>
      </VariationData>      
    </Outdoors>
  </ProductData>
</Product>
</Message>

New to add <CountryOfOrigin>COUNTRY_CODE</CountryOfOrigin> COUNTRY_CODE should be like US, IT, UK etc, and <CountryOfOrigin> must be used inside the <DescriptionData> tag. Hope it should work and help other.

iamsr commented 2 years ago

where to put "LaunchDate"? Earlier it was inside the Product tag but now it won't work with that schema.

rugved1991 commented 2 years ago

Hi,

Please let us know if this issue persists. If you are still seeing an issue, please open a support case and provide us the case ID.

Best, Rugved Solutions Architect, SP API

github-actions[bot] commented 1 year ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

qiuzhiqiang18857889321 commented 1 year ago

Excel模板中格式是怎么样的?与后台手动模板刊登商品模板一致吗?为什么我一直在报错 { "errors": [ { "code": "InvalidInput", "message": "Invalid request parameters", "details": "" } ] }

rugved1991 commented 1 year ago

Hi,

When using the XSD or Flat_file options with the Feeds API, you have to generate an XML or CSV file first and then upload it to the Feeds API. The format of the XML and CSV file depends on the type of Feed you are working with. You can use this doc for more information on different types of Feeds and their attributes. For more information on how to generate a feed please refer to seller central help pages linked here.

You can also use the latest Listings API for 1x1 listing submission. If you are interested in bulk submissions, you can use the latest JSON_LISTINGS_FEED which uses the latest JSON schema as a reference for validating submissions.

Please refer to our Listings Management Workflow Guide for more information on how to build and manage listings workflows.

As always, if there are any specific issues with a feed submission, please open a developer support case to troubleshoot the issue in detail.

Best, Rugved Solutions Architect, SP API

albinsopaj commented 11 months ago

In my experience, I recommend that you learn what is the process that Amazon establishes to load products. This involves learning about the product catalog, listings, product detail pages, and offers.

According to the tests I have done, you can load products with different types of files, each one has similar purposes but some are better adapted to some situations than others.

I have already been able to load products with the POST_PRODUCT_DATA feed for which you have to use an XML that you can generate from the schemas indicated here.

You can also use the POST_FLAT_FILE_INVLOADER_DATA feed, for this you will have to use an Excel template that later you will have to convert to a tab-separated-values file. This template can be obtained from Seller Central.

@roger-sanchez117

Is it compulsory to use both of them (_POST_PRODUCTDATA and _POST_FLAT_FILE_INVLOADERDATA) to upload products to Amazon Marketplace or can I use only the latter (provided that I already possess a .xlsx file) and completely skip the former?

albinsopaj commented 11 months ago

In my experience, I recommend that you learn what is the process that Amazon establishes to load products. This involves learning about the product catalog, listings, product detail pages, and offers. According to the tests I have done, you can load products with different types of files, each one has similar purposes but some are better adapted to some situations than others. I have already been able to load products with the POST_PRODUCT_DATA feed for which you have to use an XML that you can generate from the schemas indicated here. You can also use the POST_FLAT_FILE_INVLOADER_DATA feed, for this you will have to use an Excel template that later you will have to convert to a tab-separated-values file. This template can be obtained from Seller Central.

hi @roger-sanchez117 , Do I need to write the xml file by myself, and then upload it encrypted through feeds? Is the process like this?

@wmh49877

I'm following this, and therefor waiting for an answer.

mtkumar82 commented 1 week ago

Hello Everyone,

I am getting below warning when trying to submit feed with feed type: "POST_PRODUCT_DATA". Below link saying

Feed types that will be sunset on March 31, 2025:

POST_PRODUCT_DATA
POST_INVENTORY_AVAILABILITY_DATA
POST_PRODUCT_OVERRIDES_DATA
POST_PRODUCT_PRICING_DATA
POST_PRODUCT_IMAGE_DATA
POST_PRODUCT_RELATIONSHIP_DATA
POST_FLAT_FILE_INVLOADER_DATA
POST_FLAT_FILE_LISTINGS_DATA
POST_FLAT_FILE_BOOKLOADER_DATA
POST_FLAT_FILE_CONVERGENCE_LISTINGS_DATA
POST_FLAT_FILE_LISTINGS_DATA
POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA
POST_UIEE_BOOKLOADER_DATA

The feed type used for this submission via the Selling Partner Feeds API will be sunset on March 31, 2025. To continue submitting listings data through APIs (including pricing and inventory updates), you will need to migrate to the Selling Partner Listings Items APIs or the JSON_LISTINGS_FEED feed type submitted via the Selling Partner Feeds API. If you have received this message through a third-party solution, please contact your solution provider. If you are using the Selling Partner Feeds API directly, more details on migrating can be found on the Selling Partner API developer documentation website here : https://developer-docs.amazon.com/sp-api/changelog/deprecation-of-feeds-api-support-for-xml-and-flat-file-listings-feeds.

Anybody can please help me how I can use JSON_LISTINGS_FEED for POST_PRODUCT_DATA POST_INVENTORY_AVAILABILITY_DATA POST_PRODUCT_OVERRIDES_DATA POST_PRODUCT_PRICING_DATA

feed types, I am able to find proper documenttation how to use these feed type with JSON_LISTINGS_FEED ?

Waiting for your valuable support