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

Unable to Create a new Asin for new product via the Product Data FeedType (SP-API) #2581

Closed dmedawar closed 1 year ago

dmedawar commented 1 year ago

Hi!

I'm having an issue when attempting to create a new product (and create a new ASIN) for a product that doesn't yet exist on Amazon. We recently purchased a UPC and are attempting to use the UPC as the external product identifier when submitting a feed using the Product Data feed type.

Here's my input payload for the new watch:

<?xml version="1.0" encoding="utf-16"?>
<AmazonEnvelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <DocumentVersion>2.0</DocumentVersion>
    <MerchantIdentifier>A3BQGG45UFCAQT</MerchantIdentifier>
  </Header>
  <MessageType>Product</MessageType>
  <PurgeAndReplace>false</PurgeAndReplace>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Product>
      <SKU>4465027</SKU>
      <StandardProductID>
        <Type>UPC</Type>
        <Value>727785397742</Value>
      </StandardProductID>
      <ProductTaxCode>A_GEN_TAX</ProductTaxCode>
      <DescriptionData>
        <Title>Pre-Owned Omega De Ville Prestige 424.23.33.20.09.001</Title>
        <Brand>Omega</Brand>
        <Manufacturer>Omega</Manufacturer>
        <ItemType>watches</ItemType>
        <RecommendedBrowseNode>6358540011</RecommendedBrowseNode>
      </DescriptionData>
    </Product>
  </Message>
</AmazonEnvelope>

The feed submission is successful, and I do retrieve a feedId. When using that feedId to then download the feed report via url, this is what I get back:

<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
    <Header>
        <DocumentVersion>1.02</DocumentVersion>
        <MerchantIdentifier>A3BQGG45UFCAQT</MerchantIdentifier>
    </Header>
    <MessageType>ProcessingReport</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <ProcessingReport>
            <DocumentTransactionID>71816019490</DocumentTransactionID>
            <StatusCode>Complete</StatusCode>
            <ProcessingSummary>
                <MessagesProcessed>1</MessagesProcessed>
                <MessagesSuccessful>0</MessagesSuccessful>
                <MessagesWithError>1</MessagesWithError>
                <MessagesWithWarning>0</MessagesWithWarning>
            </ProcessingSummary>
            <Result>
                <MessageID>1</MessageID>
                <ResultCode>Error</ResultCode>
                <ResultMessageCode>8560</ResultMessageCode>
                <ResultDescription>SKU 4465027, Missing Attributes product_type. SKU 4465027 doesn&apos;t match any ASINs. Make sure that all standard product ids (such as UPC, ISBN, EAN, or JAN codes) are correct. To create a new ASIN, include the following attributes: product_type. Feed ID: 0. For more troubleshooting help, see http://sellercentral.amazon.com/gp/errorcode/200692370</ResultDescription>
                <AdditionalInfo>
                    <SKU>4465027</SKU>
                </AdditionalInfo>
            </Result>
        </ProcessingReport>
    </Message>
</AmazonEnvelope>

This is a little misleading to me as there's no product_type attribute that I can see in this schema: https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/Product.xsd

We also are a US merchant looking to list this on the US marketplace, and so I imagine the RecommendedBrowseNode isn't required (I've tried with and without that specified in the payload).

Traditionally, we've manually submitted feed flat files as have an excel template for the watch inventory type. I cross-referenced that template with the programmatic way of submitting this payload here using the SP-APIs and in XML format. Some of the field names differ between the two FeedTypes, and with the limited documentation that I can find, it's hard to make of what other possibly required attributes I may be missing here.

I know there's a programmatic way of using the flat file submission instead, but we're trying to stay away from that if at all possible. My understanding is that the product data feed type here should allow us to create a new ASIN that doesn't exist on the marketplace yet. Can someone please help?

Thank you David

dmedawar commented 1 year ago

This is now resolved. I needed the ProductData section, which contains the ProductType nested section. Leaving a snippet here for anyone else this may help as it's a minimally viable payload that allowed me to successfully create a listing (though incomplete, which is fine). At the time of this ticket, this automated the creation of a new ASIN once I hit the save and finish button in Seller Central afterwards.

<?xml version="1.0" encoding="utf-16"?>
<AmazonEnvelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>A3BQGG45UFCAQT</MerchantIdentifier>
  </Header>
  <MessageType>Product</MessageType>
  <PurgeAndReplace>false</PurgeAndReplace>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Product>
      <SKU>4465027</SKU>
      <StandardProductID>
        <Type>UPC</Type>
        <Value>727785397742</Value>
      </StandardProductID>
      <ProductTaxCode>A_GEN_TAX</ProductTaxCode>
      <DescriptionData>
        <Title>Pre-Owned Omega De Ville Prestige 424.23.33.20.09.001</Title>
        <Brand>Omega</Brand>
        <Manufacturer>Omega</Manufacturer>
        <MfrPartNumber>424.23.33.20.09.001</MfrPartNumber>
        <MSRP currency="USD">3950</MSRP>
        <ItemType>watch</ItemType>
      </DescriptionData>
      <ProductData>
        <Jewelry>
          <ProductType>
            <Watch>
              <DepartmentName>Mens</DepartmentName>
            </Watch>
          </ProductType>
        </Jewelry>
      </ProductData>
    </Product>
  </Message>
</AmazonEnvelope>