# Shopping Lists

## 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-sphere: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-sphere: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-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Shopping Lists in the platform.**

To access Shopping Lists as an Associate of a Business Unit, see [AsAssociateArgument](/api/graphql/business-units.md#asassociateargument).

## Queries

### Query Shopping Lists

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

### Get Shopping List

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

### Delete Shopping List

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

### Create My Shopping List

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

### Update My Shopping List

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

### Delete My Shopping List

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

## Output types

### ShoppingList

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

### ShoppingListQueryResult

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

## Input types

### ShoppingListDraft

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

### MyShoppingListDraft

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

### ShoppingListUpdateAction

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

### MyShoppingListUpdateAction

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

### Update actions

#### Add LineItem

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

#### Add TextLineItem

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

#### Change LineItem Quantity

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

#### Change LineItems Order

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

#### Change Name

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

#### Change TextLineItem Name

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

#### Change TextLineItem Quantity

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

#### Change TextLineItems Order

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

#### Remove LineItem

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

#### Remove TextLineItem

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

#### Set AnonymousId

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

#### Set Business Unit &#x20;

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

#### Set CustomField

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

#### Set Custom Type

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

#### Set Customer

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

#### Set DeleteDaysAfterLastModification

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

#### Set Description

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

#### Set Key

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

#### Set LineItem CustomField

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

#### Set LineItem Custom Type

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

#### Set Slug

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

#### Set Store

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

#### Set TextLineItem CustomField

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

#### Set TextLineItem Custom Type

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

#### Set TextLineItem Description

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

## Related pages

- [Area overview page with navigation](/api.md)
- [Previous page: REST](/api/projects/shoppingLists.md)
- [Search documentation and API specs](/search.md)