putListingsItem example, to create/update offer for an ASIN

See original GitHub issue

I am trying to use the putListingsItem operation which was added by @altruer in #64.

const res = await sellingPartner.callAPI({
  operation: "putListingsItem",
  endpoint: "listingsItems",
  path: {
    sellerId: process.env.AMAZON_SELLER_ID,
    sku: PRODUCT_SKU
  },
  query: {
    marketplaceIds: [MARKETPLACE_ID],
  },
  body: {
    productType: "COMPUTER_DRIVE_OR_STORAGE",
    requirements: "LISTING_OFFER_ONLY",
    attributes: {
      "condition_type": [{
        "value": "new_new",
        "marketplace_id": MARKETPLACE_ID
      }],
      "external_product_id": [{
        "value": "B07FP5L3ZQ", // < This is the ASIN
        "marketplace_id": MARKETPLACE_ID
      }],
      "external_product_type": [{
        "value": "ASIN",
        "marketplace_id": MARKETPLACE_ID
      }],
    }
  }
})

The error I am getting is:

...
{ message: 'The attributes are invalid.',
severity: 'ERROR',
attributeName: 'item_sku' }
...

Any help on this would be highly appreciated.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
altruer-oldcommented, Nov 12, 2021

Let’s wait for their answers, we can try to check different body alternatives, but it sound like reverse engineeringđŸ˜€

0reactions
amz-toolscommented, Nov 24, 2021

@IonicaBizau Two more things that just came to me: Are you having the write permissions for the ASIN you are trying to update? And is maybe patchListingsItem what you want to use instead of putListingsItem? I just saw that putListingsItem creates or fully updates a listing, whereas patchListingsItem allows you to only update some parts of it.

This looks like a decent example: https://github.com/amzn/selling-partner-api-docs/issues/1714

Read more comments on GitHub >

github_iconTop Results From Across the Web

Listings API patchListingsItem operation possible ... - GitHub
putListingsItem example, to create/update offer for an ASIN ... Listings API putListingsItem How To Update price and quantity? #2167.
Read more >
Manage your product listings lifecycle with Selling Partner API
Retrieving listings eligibility details by ASIN or product type. Creating, querying, updating, and deleting listings (SKUs).
Read more >
How to create an offer for an existing ASIN on Amazon?
I am looking for creating an offer by having the ASIN, and the inventory options (SKU, quantity, price etc). We already have access...
Read more >
Guide on How To Create a new ASIN in amazon - Eva.guru
Duplicate ASINs. According to Amazon, if you want to sell something in the catalog, you must match your product to the existing ASIN...
Read more >
Using selling partner api to add product to Amazon - Forums
In step 2 (Construct a feed), I use data like example to create a feed. ... /listings-items-api/listingsItems_2020-09-01.md#putlistingsitem.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found