Skip to main content

customerAddListToCart

Requires a customer (portal or buyer app) session.

Merge a whole buying list into the shared cart via the CustomerCartService public API (repriced server-side). 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 CustomerAddListToCart($listId: ID!) {
customerAddListToCart(listId: $listId) {
id
name
itemCount
revision
subtotal
updatedAt
items {
id
createdAt
acceptAlternativeIfUnavailable
baseUnitPrice
lineTotal
notes
}
}
}

Variables:

{
"listId": "id"
}

Response:

{
"data": {
"customerAddListToCart": {
"id": "id",
"name": "string",
"itemCount": 0,
"revision": 0,
"subtotal": 0,
"updatedAt": "2025-01-15T00:00:00Z",
"items": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"acceptAlternativeIfUnavailable": true,
"baseUnitPrice": 0,
"lineTotal": 0,
"notes": "string"
}
]
}
}
}
customerAddListToCart(
listId: ID!
): CartType!

Arguments​

customerAddListToCart.listId ● ID! non-null scalar​

The ID of the buying list.

Type​

CartType object​

The customer's cart.