Associate Shopping Lists

Elevate, May 20-22-2025, Miami Beach, Florida

This feature is part of Composable Commerce for B2B and will be subject to additional terms and pricing.

Associate Shopping Lists allow Associates to interact with Shopping Lists on behalf of a Business Unit.

Associates can view, create, update, and delete Shopping Lists on behalf of a Business Unit. The actions a given Associate is allowed to perform depends on the specific roles and permissions they hold within the Business Unit.

Get ShoppingList in BusinessUnit

The Associate must have the ViewMyShoppingLists or ViewOthersShoppingLists Permission. If the required Permission is missing, an AssociateMissingPermission error is returned.

Get ShoppingList in BusinessUnit by ID

GET
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id}

If the ShoppingList exists in the Project but does not reference the requested BusinessUnit, this method returns an InvalidOperation error.

OAuth 2.0 Scopes:
view_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

id
​
String
​

id of the ShoppingList.

Query parameters:
expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
Response:
200

ShoppingList

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}

Get ShoppingList in a BusinessUnit by Key

GET
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}

If the ShoppingList exists in the Project but does not reference the requested BusinessUnit, this method returns an InvalidOperation error.

OAuth 2.0 Scopes:
view_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

key
​
String
​

key of the ShoppingList.

Query parameters:
expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
Response:
200

ShoppingList

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}

Query ShoppingLists in BusinessUnit

GET
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists
OAuth 2.0 Scopes:
view_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

Query parameters:
where
​​
The parameter can be passed multiple times.
sort
​​
The parameter can be passed multiple times.
expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
limit
​
Int
​

Number of results requested.

Default: 20​
offset
​
Int
​

Number of elements skipped.

Default: 0​
withTotal
​
Boolean
​

Controls the calculation of the total number of query results. Set to false to improve query performance when the total is not needed.

Default: true​
var.<varName>
​
String
​

Predicate parameter values.

The parameter can be passed multiple times.
Response:
200

ShoppingListPagedQueryResponse

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ShoppingListPagedQueryResponsejson
{
  "limit": 20,
  "offset": 0,
  "count": 1,
  "total": 1,
  "results": [
    {
      "id": "9693f04b-5aec-467f-baa1-fc74da7d0c3d",
      "version": 1,
      "name": {
        "en": "test"
      },
      "key": "test",
      "lineItems": [],
      "textLineItems": [],
      "businessUnit": {
        "key": "bu-345-france",
        "typeId": "business-unit"
      },
      "createdAt": "2017-03-30T11:49:40.904Z",
      "lastModifiedAt": "2017-03-30T11:49:40.904Z"
    }
  ]
}

Check if ShoppingList exists in BusinessUnit

Whether a Shopping List is visible to the Associate depends on their role and the associated Permissions.

Check if ShoppingList exists in BusinessUnit by ID

HEAD
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id}

Checks if a ShoppingList exists for a given id. Returns a 200 OK if the ShoppingList exists; otherwise, returns a ResourceNotFound error.

OAuth 2.0 Scopes:
view_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

id
​
String
​

id of the ShoppingList.

Response:
200
Request Example:cURL
curl --head https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 

Check if ShoppingList exists in BusinessUnit by Key

HEAD
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}

Checks if a ShoppingList exists for a given key. Returns a 200 OK if the ShoppingList exists; otherwise, returns a ResourceNotFound error.

OAuth 2.0 Scopes:
view_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

key
​
String
​

key of the ShoppingList.

Response:
200
Request Example:cURL
curl --head https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 

Check if ShoppingList exists in BusinessUnit by Query Predicate

HEAD
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists

Checks if a ShoppingList exists for a given Query Predicate. Returns a 200 OK if any ShoppingLists match the Query Predicate; otherwise, returns a ResourceNotFound error.

OAuth 2.0 Scopes:
view_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

Query parameters:
where
​​
The parameter can be passed multiple times.
Response:
200
Request Example:cURL
curl --head https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 

Create ShoppingList in BusinessUnit

The Associate must have the CreateMyShoppingLists or CreateOthersShoppingLists Permission. If the required Permission is missing, an AssociateMissingPermission error is returned.

POST
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

OAuth 2.0 Scopes:
manage_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

Query parameters:
expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
Request Body:ShoppingListDraftasapplication/json
Response:
201

ShoppingList

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "name" : {
    "en" : "My shopping list"
  },
  "slug" : {
    "en" : "my-shopping-list"
  },
  "customer" : {
    "typeId" : "customer",
    "id" : "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "key" : "my-shopping-list",
  "deleteDaysAfterLastModification" : 100,
  "lineItems" : [ {
    "sku" : "product-variant-sku",
    "quantity" : 5
  }, {
    "productId" : "0e131f46-8d1a-4761-9c83-b45ab5d3501e",
    "variantId" : 2
  } ],
  "textLineItems" : [ {
    "name" : {
      "en" : "My shopping list item"
    },
    "description" : {
      "en" : "This is a good gift idea"
    },
    "quantity" : 5
  } ],
  "businessUnit" : {
    "key" : "bu-345-france",
    "typeId" : "business-unit"
  }
}
DATA
201 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}

Update ShoppingList in BusinessUnit

The Associate must have the UpdateMyShoppingLists or UpdateOthersShoppingLists Permission. If the required Permission is missing, an AssociateMissingPermission error is returned.

Update ShoppingList in BusinessUnit by ID

POST
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id}

If the ShoppingList exists in the Project but does not reference the requested BusinessUnit, this method returns an InvalidOperation error.

OAuth 2.0 Scopes:
manage_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

id
​
String
​

id of the ShoppingList.

Query parameters:
expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
Request Body:
application/json
version​
Int​

Expected version of the ShoppingList on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

actions​
Array of ShoppingListUpdateAction​

List of update actions to be performed on the ShoppingList.

Response:
200

ShoppingList

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "version" : 1,
  "actions" : [ {
    "action" : "changeName",
    "name" : {
      "en" : "New Name"
    }
  } ]
}
DATA
200 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}

Update ShoppingList in BusinessUnit by Key

POST
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}

If the Shopping List exists in the Project but does not reference the requested BusinessUnit, this method returns an InvalidOperation error.

OAuth 2.0 Scopes:
manage_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

key
​
String
​

key of the ShoppingList.

Query parameters:
expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
Request Body:
application/json
version​
Int​

Expected version of the ShoppingList on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

actions​
Array of ShoppingListUpdateAction​

List of update actions to be performed on the ShoppingList.

Response:
200

ShoppingList

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "version" : 1,
  "actions" : [ {
    "action" : "changeName",
    "name" : {
      "en" : "New Name"
    }
  } ]
}
DATA
200 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}

Delete ShoppingList in BusinessUnit

The Associate must have the DeleteMyShoppingLists or DeleteOthersShoppingLists Permission. If the required Permission is missing, an AssociateMissingPermission error is returned.

Delete ShoppingList in BusinessUnit by ID

DELETE
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id}

If the ShoppingList exists in the Project but does not reference the requested BusinessUnit, this method returns an InvalidOperation error.

OAuth 2.0 Scopes:
manage_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

id
​
String
​

id of the ShoppingList.

Query parameters:
version
​
Int
​

Last seen version of the resource.

expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
dataErasure
​
Boolean
​

To erase all related personal data in compliance with GDPR, set to true.

Default: false​
Response:
200

ShoppingList

asapplication/json
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{id}?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
200 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}

Delete ShoppingList in BusinessUnit by Key

DELETE
https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}

If the ShoppingList exists in the Project but does not reference the requested BusinessUnit, this method returns an InvalidOperation error.

OAuth 2.0 Scopes:
manage_shopping_lists:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

associateId
​
String
​

id of the Customer who is acting on behalf of the BusinessUnit.

businessUnitKey
​
String
​

key of the BusinessUnit.

key
​
String
​

key of the ShoppingList.

Query parameters:
version
​
Int
​

Last seen version of the resource.

expand
​​

When expanding variant and productSlug on ShoppingListLineItem, expand the entire array; you cannot expand only a single element of the array—for example, expand=lineItems[0].variant is not supported.

The parameter can be passed multiple times.
dataErasure
​
Boolean
​

To erase all related personal data in compliance with GDPR, set to true.

Default: false​
Response:
200

ShoppingList

asapplication/json
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
200 Response Example: ShoppingListjson
{
  "id": "acb58513-ccfd-4ee8-8f28-9b7238fb91cd",
  "version": 1,
  "name": {
    "en": "My shopping list"
  },
  "key": "my-shopping-list",
  "customer": {
    "typeId": "customer",
    "id": "e73cd97f-846e-44a0-b418-3ed044a8e398"
  },
  "slug": {
    "en": "my-shopping-list"
  },
  "lineItems": [
    {
      "id": "ade85d60-736b-4ca8-87ed-01fde78f92c5",
      "productId": "077bb11b-0d00-4e00-aced-48f493a79da0",
      "name": {
        "en": "Product name"
      },
      "productType": {
        "typeId": "product-type",
        "id": "a941b0b1-5c8f-41de-99e4-de965714d89f"
      },
      "variantId": 2,
      "quantity": 1,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "textLineItems": [
    {
      "id": "c25aaca9-bb25-4a9f-bb1f-be0a78e98dcb",
      "name": {
        "en": "My shopping list item"
      },
      "description": {
        "en": "This is a good gift idea"
      },
      "quantity": 5,
      "addedAt": "2022-08-22T14:11:03.572Z"
    }
  ],
  "businessUnit": {
    "key": "bu-345-france",
    "typeId": "business-unit"
  },
  "deleteDaysAfterLastModification": 100,
  "createdAt": "2022-08-22T14:11:03.587Z",
  "lastModifiedAt": "2022-08-22T14:11:03.587Z"
}