Updating inventory via updateInventory method removes variations on thelistings

292 views
Skip to first unread message

Alex Bayevskiy

unread,
May 11, 2021, 3:38:21 PM5/11/21
to Etsy API

Hello

I have a listing with two variations

Trying to update price/quantity via updateInventory

Sending the following JSON to /v2/listings/568572288/inventory

[
    {
        "sku": "1193.PACK_OF_1",
        "property_values": [],
        "offerings": [
            {
                "price": "10.00",
                "quantity": 999
            }
        ]
    },
    {
        "sku": "1193.PACK_OF_100",
        "property_values": [],
        "offerings": [
            {
                "price": "200.00",
                "quantity": 76
            }
        ]
    }
]

Call succeeds however Etsy pick only the last update for SKU 1193.PACK_OF_100 fully removing both variations making the listing as a no variation
This is the response:
{"count":4,"results":{"products":[{"product_id":6809446525,"sku":"1193.PACK_OF_100","property_values":[],"offerings":[{"offering_id":7031673476,"price":{"amount":20000,"divisor":100,"currency_code":"USD","currency_formatted_short":"$200.00","currency_formatted_long":"$200.00 USD","currency_formatted_raw":"200.00"},"quantity":76,"is_enabled":1,"is_deleted":0}],"is_deleted":0}],"price_on_property":[],"quantity_on_property":[],"sku_on_property":[]},"params":{"listing_id":"568572288","products":"[{"sku":"1193.PACK_OF_1","property_values":[],"offerings":[{"price":"10.00","quantity":999}]},{"sku":"1193.PACK_OF_100","property_values":[],"offerings":[{"price":"200.00","quantity":76}]}]","price_on_property":null,"quantity_on_property":null,"sku_on_property":null},"type":"ListingInventory","pagination":{}}
How can I update my variations  while keeping them :-(

Any help appreciated




Tima M

unread,
May 12, 2021, 2:45:59 PM5/12/21
to Etsy API
If there's more than one variation for a listing, you also need to pass  "price_on_property", "quantity_on_property" and "sku_on_property".

Alex Bayevskiy

unread,
May 13, 2021, 2:41:27 PM5/13/21
to Etsy API

Hello

Appreciate your help

Do you by any chance have a sample?

I tried before with a full JSON received from GET call to /v2/listings/568572288/inventory

It would include "price_on_property"  "quantity_on_property" and "sku_on_property"

Replaced the value for quantity elements but would  get an error back some thin like “price needed for all offerings”

 

Alex

Alex Bayevskiy

unread,
May 14, 2021, 3:05:40 PM5/14/21
to Etsy API

Finally was able to sort this out

 

I am using C++ to deal with it so it might add to the issue

 

This is the data I send:

products=[{"sku":"1193.PACK_OF_1","property_values":[{"property_id":513,"property_name":"Size","values":["Pack of 1"]}],"offerings":[{"price":"10.00","quantity":999}]},{"sku":"1193.PACK_OF_100","property_values":[{"property_id":513,"property_name":"Size","values":["Pack of 100"]}],"offerings":[{"price":"200.00","quantity":70}]}]&price_on_property=513&quantity_on_property=513&sku_on_property=513

 

It seems like ETSY wants price_on_property, quantity_on_property and sku_on_property to be part of the request and part of the OATH signature as separate parameters and not part of the JSON

Reply all
Reply to author
Forward
0 new messages