Queries and mutations for Shopping Lists in the Core Subgraph.

Queries

Get Shopping Lists

QUERYshoppingLists

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.

An anonymous session gets an UNAUTHENTICATED error.
Request Example:graphql
query GetShoppingLists {
  shoppingLists { id name lineCount updatedAt availableActions }
}
Response Example:json
{
  "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

QUERYshoppingList
Returns a Shopping List by id. null if it doesn't exist or isn't visible to the session.
Arguments
id​
ID​
id of the Shopping List.
Request Example:graphql
query GetShoppingList {
  shoppingList(
    id: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA"
  ) {
    id
    name
    lineCount
    lines { id sku productName quantity }
  }
}
Response Example:json
{
  "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

MUTATIONcreateShoppingList

Creates a Shopping List for the signed-in customer.

With a Business Unit selected in the session, the Shopping List belongs to that Business Unit and the Store of the session. Without one, it's a personal wishlist. A missing associate permission is refused with FORBIDDEN_ACTION.
Arguments
input​

The Shopping List to create.

Request Example:graphql
mutation CreateShoppingList {
  createShoppingList(
    input: {name: "Dining room", description: "Ideas for the new dining room"}
  ) {
    shoppingList { id name description lineCount }
    userErrors { code message field }
  }
}
Response Example:json
{
  "data": {
    "createShoppingList": {
      "shoppingList": {
        "id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
        "name": "Dining room",
        "description": "Ideas for the new dining room",
        "lineCount": 0
      },
      "userErrors": []
    }
  }
}

Update Shopping List

MUTATIONupdateShoppingList

Changes the name or description of a Shopping List.

Refused with 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.

Request Example:graphql
mutation UpdateShoppingList {
  updateShoppingList(
    input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", name: "Dining room 2026"}
  ) {
    shoppingList { id name }
    userErrors { code message field }
  }
}
Response Example:json
{
  "data": {
    "updateShoppingList": {
      "shoppingList": {
        "id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
        "name": "Dining room 2026"
      },
      "userErrors": []
    }
  }
}

Add SKU to Shopping List

MUTATIONaddShoppingListLine

Adds a Product Variant by SKU to a Shopping List.

Refused with 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.

Request Example:graphql
mutation AddShoppingListLine {
  addShoppingListLine(
    input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", sku: "CHAIR-OAK-01", quantity: 1}
  ) {
    shoppingList {
      id
      lineCount
      lines { sku quantity }
    }
    userErrors { code message field }
  }
}
Response Example:json
{
  "data": {
    "addShoppingListLine": {
      "shoppingList": {
        "id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
        "lineCount": 1,
        "lines": [{ "sku": "CHAIR-OAK-01", "quantity": 1 }]
      },
      "userErrors": []
    }
  }
}

Add SKU to Shopping List with arguments

MUTATIONaddToShoppingList
Same as addShoppingListLine, including its permission check and error codes, but takes the values as arguments instead of an input object.
Arguments
listId​
ID​
id of the Shopping List to add the line to.
sku​
String​
SKU of the Product Variant to add. An unknown SKU is refused with UNKNOWN_SKU.
quantity​
Int​
Number of items to add. Defaults to 1. A quantity the platform doesn't accept is refused with INVALID_QUANTITY.
Default: 1​
Request Example:graphql
mutation AddToShoppingList {
  addToShoppingList(
    listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA"
    sku: "CHAIR-OAK-01"
  ) {
    shoppingList {
      id
      lines { sku quantity }
    }
    userErrors { code message field }
  }
}
Response Example:json
{
  "data": {
    "addToShoppingList": {
      "shoppingList": {
        "id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
        "lines": [{ "sku": "CHAIR-OAK-01", "quantity": 1 }]
      },
      "userErrors": []
    }
  }
}

Change Line Item quantity in Shopping List

MUTATIONchangeShoppingListLineQuantity

Changes the quantity of a line on a Shopping List.

Refused with 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 and its new quantity.

Request Example:graphql
mutation ChangeShoppingListLineQuantity {
  changeShoppingListLineQuantity(
    input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", lineId: "AQ4DAZmYmZiZmUmYqZiZmZmYmZgA9fX09VVVRVWkVVRVVVVVVQEAAAABAAEAAA", quantity: 4}
  ) {
    shoppingList {
      id
      lineCount
      lines { sku quantity }
    }
    userErrors { code message field }
  }
}
Response Example:json
{
  "data": {
    "changeShoppingListLineQuantity": {
      "shoppingList": {
        "id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
        "lineCount": 1,
        "lines": [{ "sku": "CHAIR-OAK-01", "quantity": 4 }]
      },
      "userErrors": []
    }
  }
}

Remove Line Item from Shopping List

MUTATIONremoveShoppingListLine

Removes a line from a Shopping List.

Refused with 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.

Request Example:graphql
mutation RemoveShoppingListLine {
  removeShoppingListLine(
    input: {listId: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA", lineId: "AQ4DAZmYmZiZmUmYqZiZmZmYmZgA9fX09VVVRVWkVVRVVVVVVQEAAAABAAEAAA"}
  ) {
    shoppingList { id lineCount }
    userErrors { code message field }
  }
}
Response Example:json
{
  "data": {
    "removeShoppingListLine": {
      "shoppingList": {
        "id": "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA",
        "lineCount": 0
      },
      "userErrors": []
    }
  }
}

Delete Shopping List

MUTATIONdeleteShoppingList

Deletes a Shopping List.

Refused with FORBIDDEN_ACTION unless availableActions includes DELETE, and with LIST_NOT_FOUND if the list isn't visible to the session.
Arguments
id​
ID​
id of the Shopping List to delete.
Request Example:graphql
mutation DeleteShoppingList {
  deleteShoppingList(
    id: "AQgAAZmYmZiZmUmYqZiZmZmYmZgAAAABAAAAAAABAAEAAAAAAAEAAAABAAEAAA"
  ) {
    deletedId
    userErrors { code message field }
  }
}
Response Example:json
{
  "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.

id​
ID​

Unique identifier of the Shopping List.

name​
String​

Name of the Shopping List in the session locale. Empty string if the list has no name in that locale.

description​
String​

Description of the Shopping List in the session locale.

slug​
String​

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.

lineCount​
Int​

Number of lines on the Shopping List.

lines​
Array of ShoppingListLine​

Lines of the Shopping List.

updatedAt​

Date and time (UTC) the Shopping List was last updated.

deleteDaysAfterLastModification​
Int​

Number of days after the last update before the platform deletes the Shopping List. Null if the list is never deleted for inactivity.

anonymousId​
String​

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.

availableActions​
Array 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 be ADD_LINE, REMOVE_LINE, or DELETE​

Shopping List line

A Product Variant saved on a Shopping List, with its quantity.

id​
ID​

Unique identifier of the Shopping List line.

sku​
String​

SKU of the Product Variant.

productName​
String​

Name of the Product in the session locale. Empty string if the Product has no name in that locale.

quantity​
Int​

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.
userErrors​
Array of UserError​

Reasons the mutation was refused. Empty if it succeeded.

Delete Shopping List result

Result of the deleteShoppingList mutation.
deletedId​
ID​
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.
userErrors​
Array of UserError​

Reasons the mutation was refused. Empty if it succeeded.

Input types

Create Shopping List input

Initial values of a new Shopping List.

name​
String​
Name of the Shopping List, stored in the language of the session. A blank name is refused with INVALID_INPUT.
description​
String​

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.

listId​
ID​
id of the Shopping List to update.
name​
String​
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.
description​
String​

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.

listId​
ID​
id of the Shopping List to add the line to.
sku​
String​
SKU of the Product Variant to add. An unknown SKU is refused with UNKNOWN_SKU.
quantity​
Int​
Number of items to add. Defaults to 1. A quantity the platform doesn't accept is refused with INVALID_QUANTITY.
Default: 1​

Change Shopping List line quantity input

New quantity for a line on a Shopping List.

listId​
ID​
id of the Shopping List that contains the line.
lineId​
ID​
id of the ShoppingListLine to update. A line that isn't on the Shopping List is refused with LINE_NOT_FOUND.
quantity​
Int​
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.

listId​
ID​
id of the Shopping List that contains the line.
lineId​
ID​
id of the ShoppingListLine to remove. A line that isn't on the Shopping List is refused with LINE_NOT_FOUND.