HELP: updateListingInventory return 400 #1007
Unanswered
m4ntr4r4m4
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
i m trying to update the SKU of a listing.
first i get the listing inventory with getListingInventory.
then i update the sku inside the object and i try to PUT the modified object with updateListingInventory.
then i get a 400 response.
here it is my object product_data :
{
products: [
{
product_id: 5055113869,
sku: 'YOUR_SKU',
is_deleted: false,
offerings: [Array],
property_values: []
}
],
price_on_property: [],
quantity_on_property: [],
sku_on_property: [],
listing: null
}
and here it is my fetch line:
const requestOptions = {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'x-api-key': clientID, // Your client ID
'Authorization':
Bearer ${accessToken}
,},
body: JSON.stringify(product_data),
};
const response = await fetch(
https://openapi.etsy.com/v3/application/listings/${listingId}/inventory
, requestOptions);Beta Was this translation helpful? Give feedback.
All reactions