# Shopping List

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-il:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-il:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-il:returnTypesList` field and a schema request returns a `ctp:gql-il:schema:<key>` field.

**Queries and mutations for Shopping Lists in the Core Subgraph.**

### Queries

#### Get Shopping Lists

[fetch SDL for query shoppingLists](#graphql-partial-sdls).

#### Get Shopping List by ID

[fetch SDL for query shoppingList](#graphql-partial-sdls).

### Mutations

#### Create Shopping List

[fetch SDL for mutation createShoppingList](#graphql-partial-sdls).

#### Update Shopping List

[fetch SDL for mutation updateShoppingList](#graphql-partial-sdls).

#### Add SKU to Shopping List

[fetch SDL for mutation addShoppingListLine](#graphql-partial-sdls).

#### Add SKU to Shopping List with arguments

[fetch SDL for mutation addToShoppingList](#graphql-partial-sdls).

#### Change Line Item quantity in Shopping List

[fetch SDL for mutation changeShoppingListLineQuantity](#graphql-partial-sdls).

#### Remove Line Item from Shopping List

[fetch SDL for mutation removeShoppingListLine](#graphql-partial-sdls).

#### Delete Shopping List

[fetch SDL for mutation deleteShoppingList](#graphql-partial-sdls).

### Output types

#### Shopping List

[fetch SDL for type ShoppingList](#graphql-partial-sdls).

#### Shopping List line

[fetch SDL for type ShoppingListLine](#graphql-partial-sdls).

#### Shopping List action

[fetch SDL for type ShoppingListAction](#graphql-partial-sdls).

#### Shopping List result

[fetch SDL for type ShoppingListResult](#graphql-partial-sdls).

#### Delete Shopping List result

[fetch SDL for type DeleteShoppingListResult](#graphql-partial-sdls).

### Input types

#### Create Shopping List input

[fetch SDL for type CreateShoppingListInput](#graphql-partial-sdls).

#### Update Shopping List input

[fetch SDL for type UpdateShoppingListInput](#graphql-partial-sdls).

#### Add Shopping List line input

[fetch SDL for type AddShoppingListLineInput](#graphql-partial-sdls).

#### Change Shopping List line quantity input

[fetch SDL for type ChangeShoppingListLineQuantityInput](#graphql-partial-sdls).

#### Remove Shopping List line input

[fetch SDL for type RemoveShoppingListLineInput](#graphql-partial-sdls).

## Related pages

- [Area overview page with navigation](/commerce-integration-layer.md)
- [Previous page: Account](/commerce-integration-layer/experience/account.md)
- [Next page: B2B](/commerce-integration-layer/experience/b2b.md)
- [Search documentation and API specs](/search.md)