Skip to main content

customerCreateBuyingListFromCart

Requires a customer (portal or buyer app) session.

Snapshot the current cart's lines into a new buying list (quantities only, no prices). screen 12.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CustomerCreateBuyingListFromCart($input: CustomerCreateBuyingListInput!) {
customerCreateBuyingListFromCart(input: $input) {
id
name
createdByName
canDelete
canEdit
currency
items {
id
addedByName
productName
variantName
imageUrl
lineTotal
}
}
}

Variables:

{
"input": {
"name": "string"
}
}

Response:

{
"data": {
"customerCreateBuyingListFromCart": {
"id": "id",
"name": "string",
"createdByName": "string",
"canDelete": true,
"canEdit": true,
"currency": "string",
"items": [
{
"id": "id",
"addedByName": "string",
"productName": "string",
"variantName": "string",
"imageUrl": "string",
"lineTotal": 0
}
]
}
}
}
customerCreateBuyingListFromCart(
input: CustomerCreateBuyingListInput!
): CustomerBuyingListView!

Arguments​

customerCreateBuyingListFromCart.input ● CustomerCreateBuyingListInput! non-null input​

The details of the customer create buying list request.

Type​

CustomerBuyingListView object​

A durable partner-shared buying list. screen 12.