Queries and mutations for Shopping Lists in the Core Subgraph.
Queries
Get Shopping Lists
Returns the Shopping Lists visible to the session, most recently modified first, up to 100. With a Business Unit selected, only the lists the Associate may view are returned.
UNAUTHENTICATED error.query GetShoppingLists {
shoppingLists { id name lineCount updatedAt availableActions }
}
{
"data": {
"shoppingLists": [
{
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"name": "Dining room",
"lineCount": 1,
"updatedAt": "2026-09-14T10:15:00.000Z",
"availableActions": ["ADD_LINE", "REMOVE_LINE", "DELETE"]
}
]
}
}
Get Shopping List by ID
id. null if it doesn't exist or isn't visible to
the session.| Arguments | |
|---|---|
idID | id of the Shopping List. |
query GetShoppingList {
shoppingList(
id: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA"
) {
id
name
lineCount
lines { id sku productName quantity }
}
}
{
"data": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"name": "Dining room",
"lineCount": 1,
"lines": [
{
"id": "AQ4DAZmYmZiZmUmYqZiZmZmYmZgA9fX09VVVRVWkVVRVVVVVVQEAAAABAAEAAA",
"sku": "CHAIR-OAK-01",
"productName": "Oak Dining Chair",
"quantity": 1
}
]
}
}
}
Mutations
Create Shopping List
Creates a Shopping List for the signed-in customer.
FORBIDDEN_ACTION.| Arguments | |
|---|---|
input | The Shopping List to create. |
mutation CreateShoppingList {
createShoppingList(
input: {name: "Dining room", description: "Ideas for the new dining room"}
) {
shoppingList { id name description lineCount }
userErrors { code message field }
}
}
{
"data": {
"createShoppingList": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"name": "Dining room",
"description": "Ideas for the new dining room",
"lineCount": 0
},
"userErrors": []
}
}
}
Update Shopping List
Changes the name or description of a Shopping List.
FORBIDDEN_ACTION unless availableActions includes ADD_LINE,
and with LIST_NOT_FOUND if the list isn't visible to the session.| Arguments | |
|---|---|
input | The Shopping List and the values to change. |
mutation UpdateShoppingList {
updateShoppingList(
input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", name: "Dining room 2026"}
) {
shoppingList { id name }
userErrors { code message field }
}
}
{
"data": {
"updateShoppingList": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"name": "Dining room 2026"
},
"userErrors": []
}
}
}
Add SKU to Shopping List
Adds a Product Variant by SKU to a Shopping List.
FORBIDDEN_ACTION unless availableActions includes ADD_LINE,
and with LIST_NOT_FOUND if the list isn't visible to the session.| Arguments | |
|---|---|
input | The line to add. |
mutation AddShoppingListLine {
addShoppingListLine(
input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", sku: "CHAIR-OAK-01", quantity: 1}
) {
shoppingList {
id
lineCount
lines { sku quantity }
}
userErrors { code message field }
}
}
{
"data": {
"addShoppingListLine": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"lineCount": 1,
"lines": [{ "sku": "CHAIR-OAK-01", "quantity": 1 }]
},
"userErrors": []
}
}
}
Add SKU to Shopping List with arguments
addShoppingListLine, including its permission check and error codes, but
takes the values as arguments instead of an input object.| Arguments | |
|---|---|
listIdID | id of the Shopping List to add the line to. |
skuString | SKU of the Product Variant to add. An unknown SKU is refused with UNKNOWN_SKU. |
quantityInt | Number of items to add. Defaults to Default: 1. A quantity the platform doesn't accept
is refused with INVALID_QUANTITY.1 |
mutation AddToShoppingList {
addToShoppingList(
listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA"
sku: "CHAIR-OAK-01"
) {
shoppingList {
id
lines { sku quantity }
}
userErrors { code message field }
}
}
{
"data": {
"addToShoppingList": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"lines": [{ "sku": "CHAIR-OAK-01", "quantity": 1 }]
},
"userErrors": []
}
}
}
Change Line Item quantity in Shopping List
Changes the quantity of a line on a Shopping List.
FORBIDDEN_ACTION unless availableActions includes ADD_LINE,
and with LIST_NOT_FOUND if the list isn't visible to the session.| Arguments | |
|---|---|
The line and its new quantity. | |
mutation ChangeShoppingListLineQuantity {
changeShoppingListLineQuantity(
input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", lineId: "AQ4DAZmYmZiZmUmYqZiZmZmYmZgA9fX09VVVRVWkVVRVVVVVVQEAAAABAAEAAA", quantity: 4}
) {
shoppingList {
id
lineCount
lines { sku quantity }
}
userErrors { code message field }
}
}
{
"data": {
"changeShoppingListLineQuantity": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"lineCount": 1,
"lines": [{ "sku": "CHAIR-OAK-01", "quantity": 4 }]
},
"userErrors": []
}
}
}
Remove Line Item from Shopping List
Removes a line from a Shopping List.
FORBIDDEN_ACTION unless availableActions includes
REMOVE_LINE, and with LIST_NOT_FOUND if the list isn't visible to the
session.| Arguments | |
|---|---|
input | The line to remove. |
mutation RemoveShoppingListLine {
removeShoppingListLine(
input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", lineId: "AQ4DAZmYmZiZmUmYqZiZmZmYmZgA9fX09VVVRVWkVVRVVVVVVQEAAAABAAEAAA"}
) {
shoppingList { id lineCount }
userErrors { code message field }
}
}
{
"data": {
"removeShoppingListLine": {
"shoppingList": {
"id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"lineCount": 0
},
"userErrors": []
}
}
}
Delete Shopping List
Deletes a Shopping List.
FORBIDDEN_ACTION unless availableActions includes DELETE,
and with LIST_NOT_FOUND if the list isn't visible to the session.| Arguments | |
|---|---|
idID | id of the Shopping List to delete. |
mutation DeleteShoppingList {
deleteShoppingList(
id: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA"
) {
deletedId
userErrors { code message field }
}
}
{
"data": {
"deleteShoppingList": {
"deletedId": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
"userErrors": []
}
}
}
Output types
Shopping List
A saved list of Products: a Customer's wishlist, or a Business Unit's purchase list.
With a Business Unit selected, a session sees that Business Unit's lists. Without one, it sees the signed-in Customer's own lists.
idID | Unique identifier of the Shopping List. |
nameString | Name of the Shopping List in the session locale. Empty string if the list has no name in that locale. |
descriptionString | Description of the Shopping List in the session locale. |
slugString | Human-readable identifier of the Shopping List in the session locale, usually used in deep-link URLs. |
businessUnit | Business Unit the purchase list belongs to. Null for a Customer's own wishlist. |
lineCountInt | Number of lines on the Shopping List. |
linesArray of ShoppingListLine | Lines of the Shopping List. |
updatedAt | Date and time (UTC) the Shopping List was last updated. |
deleteDaysAfterLastModificationInt | Number of days after the last update before the platform deletes the Shopping List. Null if the list is never deleted for inactivity. |
anonymousIdString | Identifier of the anonymous session the Shopping List was created in. Null once a signed-in Customer owns the list, or if a signed-in Customer created it. |
availableActionsArray of ShoppingListAction | Actions the viewer can take on this Shopping List. Empty if the list is read-only for the viewer. On a Business Unit's list, the viewer's Associate Roles decide. A role can allow viewing a colleague's list without allowing changes to it. Can beADD_LINE, REMOVE_LINE, or DELETE |
Shopping List line
A Product Variant saved on a Shopping List, with its quantity.
idID | Unique identifier of the Shopping List line. |
skuString | SKU of the Product Variant. |
productNameString | Name of the Product in the session locale. Empty string if the Product has no name in that locale. |
quantityInt | Number of items of the Product Variant on the line. |
unitPrice | Price of one item in the session currency. If the Product Variant has no price in that currency, contains its first price, which can be in another currency. Null if the Product Variant has no price. |
addedAt | Date and time (UTC) the line was added to the Shopping List. |
Shopping List action
Kind of change a viewer can make to a Shopping List. Each value names the mutations it permits.
ADD_LINE- Add or change lines, and rename the list: `addShoppingListLine`, `addToShoppingList`, `changeShoppingListLineQuantity`, and `updateShoppingList`.
REMOVE_LINE- Remove a line with `removeShoppingListLine`.
DELETE- Delete the whole list with `deleteShoppingList`.
Shopping List result
Result of a mutation that changes a Shopping List.
shoppingList | The Shopping List after the change. null if the mutation was refused. |
userErrorsArray of UserError | Reasons the mutation was refused. Empty if it succeeded. |
Delete Shopping List result
deleteShoppingList mutation.deletedIdID | id of the deleted Shopping List, as passed to the mutation. Use it to remove the
Shopping List from a cached collection. null if the mutation was refused. |
userErrorsArray of UserError | Reasons the mutation was refused. Empty if it succeeded. |
Input types
Create Shopping List input
Initial values of a new Shopping List.
nameString | Name of the Shopping List, stored in the language of the session. A blank name is
refused with INVALID_INPUT. |
descriptionString | Description of the Shopping List, stored in the language of the session. If omitted or empty, the Shopping List has no description. |
Update Shopping List input
Changes to the name or description of a Shopping List.
listIdID | id of the Shopping List to update. |
nameString | New name of the Shopping List, stored in the language of the session. If omitted,
the current name is kept. A blank name is refused with INVALID_INPUT. |
descriptionString | New description of the Shopping List, stored in the language of the session. If omitted, the current description is kept. An empty string removes the description. |
Add Shopping List line input
A Product Variant and quantity to save on a Shopping List.
listIdID | id of the Shopping List to add the line to. |
skuString | SKU of the Product Variant to add. An unknown SKU is refused with UNKNOWN_SKU. |
quantityInt | Number of items to add. Defaults to Default: 1. A quantity the platform doesn't accept is
refused with INVALID_QUANTITY.1 |
Change Shopping List line quantity input
New quantity for a line on a Shopping List.
listIdID | id of the Shopping List that contains the line. |
lineIdID | id of the ShoppingListLine to update. A line that isn't on the Shopping List is
refused with LINE_NOT_FOUND. |
quantityInt | New quantity of the line. If 0, the line is removed from the Shopping List. A
quantity the platform doesn't accept is refused with INVALID_QUANTITY. |
Remove Shopping List line input
Identifies a line to remove from a Shopping List.
listIdID | id of the Shopping List that contains the line. |
lineIdID | id of the ShoppingListLine to remove. A line that isn't on the Shopping List is
refused with LINE_NOT_FOUND. |