Skip to main content

setCartDirections

Requires a customer (portal or buyer app) session.

Set free-text delivery instructions on the cart (max 200 chars).

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 SetCartDirections($input: SetCartDirectionsInput!) {
setCartDirections(input: $input) {
id
addressId
directions
itemCount
subtotal
updatedAt
items {
id
productName
acceptAlternativeIfUnavailable
addedAt
blurhash
conversionFactor
}
}
}

Variables:

{
"input": {
"directions": "string"
}
}

Response:

{
"data": {
"setCartDirections": {
"id": "id",
"addressId": "id",
"directions": "string",
"itemCount": 0,
"subtotal": 0,
"updatedAt": "2025-01-15T00:00:00Z",
"items": [
{
"id": "id",
"productName": "string",
"acceptAlternativeIfUnavailable": true,
"addedAt": "2025-01-15T00:00:00Z",
"blurhash": "string",
"conversionFactor": 0
}
]
}
}
}
setCartDirections(
input: SetCartDirectionsInput!
): MobileCart!

Arguments​

setCartDirections.input ● SetCartDirectionsInput! non-null input​

The fields of the cart directions to change.

Type​

MobileCart object​

One shared cart per buyer (not per delivery address — the address is chosen at placeOrder). The same cart the customer portal reads and writes (one per branch in branch mode).