Skip to main content

mobileAddListToCart

Requires a customer (portal or buyer app) session.

Add every line of a partner-shared buying list onto the buyer's shared cart (the same cart the customer portal shows). Returns a summary — a buyer who taps once must be told what was added and what was skipped.

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 MobileAddListToCart($listId: ID!) {
mobileAddListToCart(listId: $listId) {
addedCount
cart {
id
addressId
directions
itemCount
subtotal
updatedAt
}
}
}

Variables:

{
"listId": "id"
}

Response:

{
"data": {
"mobileAddListToCart": {
"addedCount": 0,
"cart": {
"id": "id",
"addressId": "id",
"directions": "string",
"itemCount": 0,
"subtotal": 0,
"updatedAt": "2025-01-15T00:00:00Z"
}
}
}
}
mobileAddListToCart(
listId: ID!
): MobileAddListToCartResult!

Arguments​

mobileAddListToCart.listId ● ID! non-null scalar​

The ID of the buying list.

Type​

MobileAddListToCartResult object​

Result of adding a partner-shared buying list to the MOBILE cart. Returns a summary, not a bare cart: a buyer who taps once must be told what was added and what was skipped, or they discover it at checkout.