For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
  • GraphQL
    • Overview
      • Playground
      • Explorer
          • MUTcreateCart
          • MUTdeleteCart
          • MUTaddCartLineItems
          • MUTupdateCartLineItem
          • MUTdeleteCartLineItem
          • MUTupdateCartCurrency
          • MUTassignCartToCustomer
          • MUTunassignCartFromCustomer
          • MUTcreateCartMetafield
          • MUTupdateCartMetafield
          • MUTdeleteCartMetafield
          • MUTcreateCartRedirectUrls
          • MUTcreateCheckout
          • MUTupdateCheckout
          • MUTaddCheckoutBillingAddress
          • MUTupdateCheckoutBillingAddress
          • MUTupdateCheckoutCustomerMessage
          • MUTselectCheckoutShippingOption
          • MUTapplyCheckoutCoupon
          • MUTunapplyCheckoutCoupon
          • MUTapplyCheckoutGiftCertificate
          • MUTunapplyCheckoutGiftCertificate
          • MUTapplyCheckoutSpamProtection
          • MUTaddCheckoutShippingConsignments
          • MUTupdateCheckoutShippingConsignment
          • MUTdeleteCheckoutConsignment
          • MUTcompleteCheckout
          • MUTlogin
          • MUTlogout
          • MUTcreateWishlist
          • MUTaddWishlistItems
          • MUTdeleteWishlistItems
          • MUTupdateWishlist
          • MUTdeleteWishlists
          • MUTloginWithCustomerLoginJwt
          • MUTsubmitContactUs
          • MUTgenerateSessionSyncJwt
          • MUTvalidateSessionSyncJwt
          • MUTproductViewedEvent
          • MUTpageViewedEvent
          • MUTvisitStartedEvent
          • MUTsearchProductEvent
          • MUTpreviewGiftCertificate
          • MUTregisterCompany
          • MUTaddProductReview
          • MUTchangePassword
          • MUTrequestResetPassword
          • MUTresetPassword
          • MUTregisterCustomer
          • MUTupdateCustomer
          • MUTaddCustomerAddress
          • MUTupdateCustomerAddress
          • MUTdeleteCustomerAddress
          • MUTpayment
          • MUTsubscribe
          • MUTunsubscribe
  • MCP
    • Overview
Dev Portal
LogoLogo
GraphQLStorefrontMutations

logout

Example Query
1mutation ExampleMutation($cartEntityId: String) {
2 logout(cartEntityId: $cartEntityId) {
3 result
4 cartUnassignResult {
5 cart
6 errors
7 }
8 }
9}
Variables
1{
2 "cartEntityId": "example"
3}
Example response
1{
2 "data": {
3 "logout": {
4 "result": "example",
5 "cartUnassignResult": {
6 "cart": {
7 "id": null,
8 "entityId": null,
9 "currencyCode": null,
10 "displayCurrencyCode": null,
11 "isTaxIncluded": null,
12 "baseAmount": null,
13 "baseAmountInDisplayCurrency": null,
14 "discountedAmount": null,
15 "discountedAmountInDisplayCurrency": null,
16 "amount": null
17 },
18 "errors": [
19 {
20 "message": null
21 }
22 ]
23 }
24 }
25 }
26}
Customer logout
Was this page helpful?
Previous

login

Next

createWishlist

Built with

Arguments

cartEntityIdStringOptional
The customer cart entity ID which should be unassigned on logout.

Returns

a LogoutResult
resultString
The result of a logout
cartUnassignResultCartUnassignResult
The result of the cart unassign operation which can be performed during logout.