customerUpdateBuyingListItem
Requires a customer (portal or buyer app) session.
Set a line's quantity and/or pack. Separate from customerAddBuyingListItem, which MERGES by bumping the quantity — an edit must set it. 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:
- GraphQL
- cURL
mutation CustomerUpdateBuyingListItem($input: CustomerUpdateBuyingListItemInput!) {
customerUpdateBuyingListItem(input: $input) {
id
name
createdByName
canDelete
canEdit
currency
items {
id
addedByName
productName
variantName
imageUrl
lineTotal
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CustomerUpdateBuyingListItem($input: CustomerUpdateBuyingListItemInput!) {\n customerUpdateBuyingListItem(input: $input) {\n id\n name\n createdByName\n canDelete\n canEdit\n currency\n items {\n id\n addedByName\n productName\n variantName\n imageUrl\n lineTotal\n }\n }\n}",
"variables": {
"input": {
"itemId": "id",
"listId": "id",
"quantity": 0
}
}
}
EOF
Variables:
{
"input": {
"itemId": "id",
"listId": "id",
"quantity": 0
}
}
Response:
{
"data": {
"customerUpdateBuyingListItem": {
"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
}
]
}
}
}
customerUpdateBuyingListItem(
input: CustomerUpdateBuyingListItemInput!
): CustomerBuyingListView!
Arguments
customerUpdateBuyingListItem.input ● CustomerUpdateBuyingListItemInput! non-null input
The details of the customer update buying list item request.
Type
CustomerBuyingListView object
A durable partner-shared buying list. screen 12.