question

Dev MerchSalad avatar image
Dev MerchSalad asked

Using selling partner api to add product to Amazon

Hello Amazon,

I want to add product to Amazon using API. I find 2 ways to do this.


First way:

I use this guide to add product to Amazon.

https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/feeds-api-use-case-guide/feeds-api-use-case-guide_2021-06-30.md

In step 2 (Construct a feed), I use data like example to create a feed.

<?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.01</DocumentVersion>
          <MerchantIdentifier>A1606NREA01GW4</MerchantIdentifier> 
        </Header>
        <MessageType>Product</MessageType>
        <PurgeAndReplace>false</PurgeAndReplace>
        <Message>
          <MessageID>1</MessageID>
          <Product>
            <SKU>MSFEED-PRODUCT</SKU>
            <StandardProductID>
              <Type>ASIN</Type>
              <Value>B0EXAMPLEG</Value>
            </StandardProductID>
            <LaunchDate>2005-07-26T00:00:01</LaunchDate> 
            <DescriptionData>
              <Title>Example Product Title</Title>
              <Brand>Example Product Brand</Brand>
              <Description>This is an example product description.</Description>
              <BulletPoint>Example Bullet Point 1</BulletPoint>
              <BulletPoint>Example Bullet Point 2</BulletPoint>
              <MSRP currency="USD">25.19</MSRP>
              <Manufacturer>Example Product Manufacturer</Manufacturer>
              <ItemType>example-item-type</ItemType>
            </DescriptionData>
            <ProductData>
              <Health>
                <ProductType>
                  <HealthMisc>
                    <Ingredients>Example Ingredients</Ingredients>
                    <Directions>Example Directions</Directions>
                  </HealthMisc>
                </ProductType>
              </Health>
            </ProductData>
          </Product>
        </Message>
      </AmazonEnvelope>

In step 4 (Create a feed), I sent feedType is POST_PRODUCT_DATA.

In step 5 (Confirm feed processing), I received processingStatus is FATAL (expected of processingStatus is DONE)

{
  processingEndTime: '2021-09-19T20:22:36+00:00',
  processingStatus: 'FATAL',
  marketplaceIds: [ 'ATVPDKIKX0DER' ],
  feedId: '50318018889',
  feedType: 'POST_PRODUCT_DATA',
  createdTime: '2021-09-19T02:21:12+00:00',
  processingStartTime: '2021-09-19T02:21:20+00:00'
}

It fail without any reason. And no resultFeedDocumentId field to get report. Any wrong here?


Second way:

I use this function to add product to Amazon.

https://github.com/amzn/selling-partner-api-docs/blob/main/references/listings-items-api/listingsItems_2020-09-01.md#putlistingsitem

I fill all data as below for this function

      sellerId: 'A1606NREA01GW4'
      sku: 'MSL00302-PIL20-P'
      marketplaceIds: 'ATVPDKIKX0DER'
      productType: 'LUGGAGE',
      requirements: 'LISTING_PRODUCT_ONLY',
      attributes: {
        number_of_items:[{ value: 10 }],
        list_price: [{ value: 10 }],
        gift_options: [{ value: 'no' }],
        wheel: [{ type:[{value:'inline'}] }],
        fabric_type: [{ value: '' }],
        item_type_keyword: [{ value: 'value' }],
        material: [{ value: 'value' }],
        department: [{ value: 'value' }],
        color: [{ value: 'blue' }],
        max_order_quantity: [{ value: 10 }],
        item_package_dimensions: [
          {
            value: 'value',
            width: { value: 10, unit: 'inches' },
            height: { value: 10, unit: 'inches' },
            length: { value: 10, unit: 'inches' },
            marketplace_id: 'ATVPDKIKX0DER',
            language_tag: 'en_US',
          },
        ],
        batteries_required: [{ value: false }],
        item_package_weight: [{ value: 10, unit: 'pounds' }],
        style: [{ value: '1' }],
        model_number: [{ value: '123' }],
        supplier_declared_material_regulation: [{ value: 'wool' }],
        model_name: [{ value: '1' }],
        bullet_point: [{ value: '' }],
        product_description: [{ value: '' }],
        brand: [{ value: 'MERCH SALAD' }],
        item_type_name: [{ value: '' }],
        externally_assigned_product_identifier: [{ value: 'Unique' }],
        supplier_declared_dg_hz_regulation: [{ value: 'unknown' }],
        country_of_origin: [{ value: 'US' }],
        merchant_suggested_asin: [{ value: 'B09G8DTJQG' }],
        condition_type: [
          {
            value: 'new_new',
            marketplace_id: 'ATVPDKIKX0DER',
          },
        ],
        item_name: [
          {
            value: 'Beauty Bag',
            language_tag: 'en_US',
            marketplace_id: 'ATVPDKIKX0DER',
          },
        ],
      },
    }

after call this function, I received a response is

{"sku":"MSL00302-PIL20-P","status":"ACCEPTED","submissionId":"849d650eb4554665aacf53f9a9357788","issues":[]}


After doing 2 ways above, It have no new product in https://sellercentral.amazon.com/inventory . Please help me to add new product to Amazon using api.

Did i do something wrong with the API?

Thank you.

apiseller centralnew productsnew product
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Mike@Amazon avatar image
Mike@Amazon answered

Hi,

Thank you for posting in the Amazon Developer forums.

For questions about Marketplace Web Services, please use the Amazon Services Seller Forums: https://sellercentral.amazon.com/forums/c/amazon-marketplace-web-service-mws/marketplace-web-service-amazon-mws-questions

You can also contact Amazon Selling Partner Support: https://sellercentral.amazon.com/gp/contact-us/contact-amazon-form.html

Thanks,

Mike

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.