# 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).

## Manage Shopping Lists

### Create Shopping List

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

### Update Shopping List

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

### Delete Shopping List

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

## Manage Shopping List lines

### 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).

## Output types

### ShoppingList

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

#### ShoppingListLine

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

#### ShoppingListAction

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

### Results

#### ShoppingListResult

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

#### DeleteShoppingListResult

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

## Input types

### Shopping List Inputs

#### CreateShoppingListInput

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

#### UpdateShoppingListInput

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

### Line Inputs

#### AddShoppingListLineInput

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

#### ChangeShoppingListLineQuantityInput

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

#### RemoveShoppingListLineInput

[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)