Get productType for creating a listing on amazon with SP API

283 Views Asked by At

Hello I am developing an integration with Amazon SS API to automate listing products for a specific client.

I have gotten to the point where I am able to generate access tokens.

I can fetch existing listings using get-listings2021-08-01itemsselleridsku endpoint.

I am now trying to create listings using use the put-listings2021-08-01itemsselleridsku endpoint.

I am following this tutorial, but when it describes the JSON object to submit the actual product details to make the listing everything goes super meta.

Apparently you are supposed to use a different api to fetch your product type and then look up the required fields for that specific product type in the schema to know how to represent them.

I have been able to use the product type search endpoint to search for product types, specifically get-definitions2020-09-01producttypes to do searches, but the options which come back are not useful. You can search by keyword or by product name. My client sells vinyl records. So I have searched for music, record, lp, vinyl about anything I can think of and I do not find a valid product type which is returned by that endpoint.

I have searched for this problem and have found an old github issue identifying the same issue, but following the links it circles back to what I already have found.

I am using Postman to make the requests and have imported the relevant models.

  • How do I find a valid productType for Vinyl Records?
  • Do different productType's have to be enabled somehow for why the get-definitions endpoint doesn't return useful results?
  • Is there a different endpoint for creating listings which is recommended which is better supported?
1

There are 1 best solutions below

3
lees2bytes On BEST ANSWER

I had this same problem with books... I was surprised that books doesn't have their own product type. Actually all media including records, do not have their own product type!

I did figure out that a productType of "PRODUCT" will work fro Books and I suspect it will work for records as well.

Here's a sample body for the PUT listing to help explain what worked for me:

PUT https://sellingpartnerapi-na.amazon.com/listings/2021-08-01/items/{your-seller-id}/{your-custom-sku}?marketplaceIds=ATVPDKIKX0DER

{
      "productType": "PRODUCT",
      "requirements": "LISTING_OFFER_ONLY",
      "attributes": {
        "purchasable_offer": [
          {
            "currency": "USD",
            "our_price": [
              {
                "schedule": [
                  {
                    "value_with_tax": 44.33
                  }
                ]
              }
            ],
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ],
        "condition_note": [
          {
            "language_tag": "en_US",
            "value": "Book in good condition. Cover is in good condition. Binding is good. Ships direct from Amazon!",
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ],
        "fulfillment_availability": [
          {
            "fulfillment_channel_code": "AMAZON_NA",
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ],
        "batteries_required": [
          {
            "value": "false",
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ],
        "merchant_suggested_asin": [
          {
            "value": "1718502443",
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ],`enter code here`
        "condition_type": [
          {
            "value": "used_very_good",
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ],
        "supplier_declared_dg_hz_regulation": [
          {
            "value": "unknown",
            "marketplace_id": "ATVPDKIKX0DER"
          },
          {
            "value": "unknown",
            "marketplace_id": "ATVPDKIKX0DER"
          },
          {
            "value": "unknown",
            "marketplace_id": "ATVPDKIKX0DER"
          },
          {
            "value": "unknown",
            "marketplace_id": "ATVPDKIKX0DER"
          },
          {
            "value": "unknown",
            "marketplace_id": "ATVPDKIKX0DER"
          }
        ]
      },
      "offers": [
        {
          "marketplaceId": "1718502443",
          "offerType": "B2C",
          "price": {
            "currency": "USD",
            "currencyCode": "USD",
            "amount": 44.33
          }
        }
      ]
    }

A few things to note:

  • requirements == LISTING_OFFER_ONLY (PRODUCT wont work with 'LISTING')
  • Everything in the body is required values.
  • For some reason the price is being set to 0.00 even though I am setting it in multiple places. I haven't figured that one out yet but I'll update when I do)
  • Last, I am using a known ASIN here so I am not creating a new product. If you are trying to create something not in the catalog then more complications will likely arise!

Hope this helps you out!