BETA

My Shopping Lists

The My Shopping Lists endpoint creates and provides access to Shopping Lists scoped to a specific user. The endpoint requires an access token from the password flow or anonymous session flow.

The My Shopping Lists endpoint intentionally provides access to a limited subset of the fields on a Shopping List. This provides extra security in scenarios when the client application must communicate directly with the commercetools API on behalf of a customer, such as commerce in a mobile application. If you need to modify a field available on the full Shopping List resource, pass the response from the My Shopping List endpoint to an internal service in your client application which accesses the Shopping List resource.

Representations

All representations are JSON objects submitted or received as payload to API requests or responses. Responses are equal to the responses on the Shopping List endpoint, but requests may differ.

MyShoppingListDraft

A MyShoppingListDraft is the object submitted as payload to the Create MyShoppingList method. The customer field of ShoppingList is automatically set with a password flow token. The anonymousId is automatically set with a token for an anonymous session. The key and slug fields can not be set.

Get a ShoppingList

Get a ShoppingList by ID

Endpoint: /{projectKey}/me/shopping-lists/{id}
Method: GET
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: ShoppingList

Get a ShoppingList in a Store by ID

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists/{id}
Method: GET
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: ShoppingList

Returns a Shopping List by its ID from a specific Store. The {storeKey} path parameter maps to a Store's key.

Get a ShoppingList by Key

Endpoint: /{projectKey}/me/shopping-lists/key={key}
Method: GET
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: ShoppingList

Get a ShoppingList in a Store by Key

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists/key={key}
Method: GET
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: ShoppingList

Returns a Shopping List by its Key from a specific Store. The {storeKey} path parameter maps to a Store's key.

Query ShoppingLists

Endpoint: /{projectKey}/me/shopping-lists
Method: GET
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: PagedQueryResult with the results array of ShoppingList

Query Parameters:

Query ShoppingLists in a Store

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists
Method: GET
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: PagedQueryResult with the results array of ShoppingList

Query Parameters:

Queries Shopping Lists in a specific Store. The {storeKey} path parameter maps to a Store's key.

Create a ShoppingList

Endpoint: /{projectKey}/me/shopping-lists
Method: POST
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Request Representation: MyShoppingListDraft
Response Representation: ShoppingList

Create a ShoppingList in a Store

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists
Method: POST
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Request Representation: MyShoppingListDraft
Response Representation: ShoppingList

Creates a Shopping Lists in a specific Store. The {storeKey} path parameter maps to a Store's key.

Update a ShoppingList

Endpoint: /{projectKey}/me/shopping-lists/{id}
Method: POST
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: ShoppingList
Fields:

  • version - Number - Required
    The expected version of the Shopping List on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
  • actions - Array of UpdateAction - Required
    The list of update actions to be performed on the Shopping List.

Update a ShoppingList in a Store by ID

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists/{id}
Method: POST
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: ShoppingList
Fields:

  • version - Number - Required
    The expected version of the Shopping List on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
  • actions - Array of UpdateAction - Required
    The list of update actions to be performed on the Shopping List.

Updates a Shopping Lists in a specific Store. The {storeKey} path parameter maps to a Store's key.

Update a ShoppingList by Key

Endpoint: /{projectKey}/me/shopping-lists/key={key}
Method: POST
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: ShoppingList
Fields:

  • version - Number - Required
    The expected version of the Shopping List on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
  • actions - Array of UpdateAction - Required
    The list of update actions to be performed on the Shopping List.

Update a ShoppingList in a Store by Key

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists/key={key}
Method: POST
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: ShoppingList
Fields:

  • version - Number - Required
    The expected version of the Shopping List on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
  • actions - Array of UpdateAction - Required
    The list of update actions to be performed on the Shopping List.

Updates a Shopping Lists in a specific Store. The {storeKey} path parameter maps to a Store's key.

Update actions

Change Name

As described here.

Set Description

As described here.

Set Custom Type

As described here.

Set CustomField

As described here.

UpdateAction on Line Item

Add LineItem

As described here.

Remove LineItem

As described here.

Change LineItem Quantity

As described here.

Change LineItems Order

As described here.

Set LineItem Custom Type

As described here.

Set LineItem CustomField

As described here.

UpdateAction on TextLineItem

Add TextLineItem

As described here.

Remove TextLineItem

As described here.

Change TextLineItem Quantity

As described here.

Change TextLineItem Name

As described here.

Set TextLineItem Description

As described here.

Change TextLineItems Order

As described here.

Set TextLineItems Custom Type

As described here.

Set TextLineItems CustomField

As described here.

Set DeleteDaysAfterLastModification

As described here.

Delete a ShoppingList

Removes a ShoppingList.

Endpoint: /{projectKey}/me/shopping-lists/{id}
Method: DELETE
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: ShoppingList
Query parameters:

  • version - Number - Required

Delete a ShoppingList in a Store by ID

Removes a ShoppingList in a specific Store. The {storeKey} path parameter maps to a Store's key.

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists/{id}
Method: DELETE
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: ShoppingList
Query parameters:

  • version - Number - Required

Delete a ShoppingList by Key

Removes a ShoppingList found by its key.

Endpoint: /{projectKey}/me/shopping-lists/key={key}
Method: DELETE
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}
Response Representation: ShoppingList
Query parameters:

  • version - Number - Required

Delete a ShoppingList in a Store by Key

Removes a ShoppingList found by its key in a specific Store. The {storeKey} path parameter maps to a Store's key.

Endpoint: /{projectKey}/in-store/key={storeKey}/me/shopping-lists/key={key}
Method: DELETE
OAuth 2.0 Scopes: manage_my_shopping_lists:{projectKey}, manage_my_shopping_lists:{projectKey}:{storeKey}
Response Representation: ShoppingList
Query parameters:

  • version - Number - Required