My Shopping Lists

This endpoint can only be used with an access token created with the password flow or with an anonymous session. It gives access to shopping lists that belong to the customer or the anonymous session linked to the access token.

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.

  • name - LocalizedString - Required
  • description - LocalizedString - Optional
  • lineItems - Array of LineItemDraft - Optional
  • textLineItems - Array of TextLineItemDraft - Optional
  • custom - CustomFieldsDraft - Optional
    The custom fields.
  • deleteDaysAfterLastModification - Number - Optional
    The shopping list will be deleted automatically if it hasn’t been modified for the specified amount of days.

Get ShoppingList by ID

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

Query ShoppingLists

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

Query Parameters:

Create a ShoppingList

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

Update ShoppingList

Endpoint: /{projectKey}/me/shopping-lists/{id}
Method: POST
OAuth2 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 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 ShoppingList

Removes a ShoppingList.

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

  • version - Number - Required