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:
- GraphQL
- cURL
mutation CustomerWriteBuyingLists($input: CustomerWriteBuyingListsInput!) {
customerWriteBuyingLists(input: $input) {
lists {
id
name
createdByName
canDelete
canEdit
currency
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CustomerWriteBuyingLists($input: CustomerWriteBuyingListsInput!) {\n customerWriteBuyingLists(input: $input) {\n lists {\n id\n name\n createdByName\n canDelete\n canEdit\n currency\n }\n }\n}",
"variables": {
"input": {
"lists": [
{
"listId": "id"
}
]
}
}
}
EOF
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.