B2B feature. Learn more

clearCustomerCart mutation

The clearCustomerCart mutation clears the customer's cart. B2B requisition lists must be enabled to execute this mutation.

This mutation requires a valid customer authentication token.

Syntax

Copied to your clipboard
mutation {
clearCustomerCart(
cartUid: String!
) {
ClearCustomerCartOutput
}
}

Reference

The clearCustomerCart reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example clears the customer's cart.

Request:

Copied to your clipboard
mutation {
clearCustomerCart(
cartUid: "8k0Q4MpH2IGahWrTRtqM61YV2MtLPApz"
) {
status
}
}

Response:

Copied to your clipboard
{
"data": {
"clearCustomerCart": {
"status": "true"
}
}
}