itemListingUpdate Mutation
Description
Updates an existing listing's fields. Only the provided fields will be updated. Prices are automatically adjusted based on the store's tax configuration.
mutation itemListingUpdate(
$listingRef: ID!
$itemListingInput: ItemListingInput!
) {
itemListingUpdate(
listingRef: $listingRef
itemListingInput: $itemListingInput
) {
_id
id
type
incId
uniqueId
oldId
created
modified
seo {
index
description
slug
title
}
isForbiddenForSale
logs {
action
description
date
ip
}
handle
path
uri
wants
bitly
descriptions {
main
}
listings {
_id
id
status
comments
privateComments
location
discogsId
taxDefinition
preventDiscogsListing
readOnly
onePerCustomer
supplierCode
sku
barcode
posted
available
preOrder
categories
archived
secondHand
}
data {
id
assetLink
thumb
title
discogsId
country
releaseDate
weight
genres
year
styles
manufacturer
cat
type
subtitle
authors
publisher
publishedDate
pageCount
categories
maturityRating
language
search
format
}
}
}
Variables
{
"listingRef": "4b874eae730c0ea9cc95f82e",
"itemListingInput": {
"stock": {
"quantity": 1
},
"status": "status",
"available": 1717433493636,
"posted": "posted",
"secondHand": true,
"location": "location",
"supplierCode": "supplierCode",
"categories": [
"categories"
],
"comments": "comments",
"taxDefinition": "taxDefinition",
"options": [
{
"name": "A name",
"value": "value"
}
],
"prices": {
"cost": 29.99,
"sale": 30.7,
"beforeTaxes": 30.7,
"compare": 30.7
},
"barcode": "barcode",
"sku": "sku",
"privateComments": "privateComments",
"onePerCustomer": true,
"preventDiscogsListing": true,
"preOrder": true,
"discogsId": 987654321
}
}
Response
{
"itemListingUpdate": {
"_id": "9ac8d9bff6113dfe1369852e",
"id": 1.23,
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1764024212434,
"modified": 1717971462844,
"seo": {
"index": true,
"description": "example",
"slug": "example",
"title": "example"
},
"isForbiddenForSale": true,
"logs": [
{
"action": "example",
"description": "example",
"date": 1748887723221,
"ip": "example"
}
],
"handle": "example",
"path": "/release/1763553751/release-artist-release-name",
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"wants": 42,
"bitly": "example",
"descriptions": {
"main": "example"
},
"listings": [
{
"_id": "584091cfd9c586dbf6828f75",
"id": 1.23,
"status": "example",
"comments": "example",
"privateComments": "example",
"location": "example",
"discogsId": 987654321,
"taxDefinition": "example",
"preventDiscogsListing": true,
"readOnly": true,
"onePerCustomer": true,
"supplierCode": "example",
"sku": "example",
"barcode": "example",
"posted": 1738949702836,
"available": 1750827382002,
"preOrder": true,
"categories": [
"example"
],
"archived": true,
"secondHand": true
}
],
"data": {
"id": 1.23,
"assetLink": "example",
"thumb": "example",
"title": "example",
"discogsId": 987654321,
"country": "example",
"releaseDate": 1730368882465,
"weight": 1.23,
"genres": [
"example"
],
"year": 42,
"styles": [
"example"
],
"manufacturer": "example",
"cat": "example",
"type": "example",
"subtitle": "example",
"authors": [
"example"
],
"publisher": "example",
"publishedDate": 1718499569279,
"pageCount": 42,
"categories": [
"example"
],
"maturityRating": "example",
"language": "example",
"search": "example",
"format": "example"
}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
listingRef | ID! | Reference ID of the listing to update. |
itemListingInput | ItemListingInput! | Updated listing data. Only provided fields will be updated. |
Returns
Item!