Skip to main content

customerWriteBuyingLists

Requires a customer (portal or buyer app) session.

Write MANY buying lists in a SINGLE round trip — the batch form of customerAddBuyingListItem/customerRemoveBuyingListItem. Grouped by list so ONE call covers both axes the app needs: many variants into one list, and one variant across many lists, adds and removes together. Returns every touched list in full plus a per-line ok/error, so one bad line does not discard the rest. 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 CustomerWriteBuyingLists($input: CustomerWriteBuyingListsInput!) {
customerWriteBuyingLists(input: $input) {
lists {
id
name
createdByName
canDelete
canEdit
currency
}
}
}

Variables:

{
"input": {
"lists": [
{
"listId": "id"
}
]
}
}

Response:

{
"data": {
"customerWriteBuyingLists": {
"lists": [
{
"id": "id",
"name": "string",
"createdByName": "string",
"canDelete": true,
"canEdit": true,
"currency": "string"
}
]
}
}
}
customerWriteBuyingLists(
input: CustomerWriteBuyingListsInput!
): CustomerBuyingListsWriteView!

Arguments​

customerWriteBuyingLists.input ● CustomerWriteBuyingListsInput! non-null input​

The details of the customer write buying lists request.

Type​

CustomerBuyingListsWriteView object​

A batch write's outcome: every touched list in full (one authoritative cache write each) plus one result per submitted line.