End the current session (logout), optionally unregister the customer.
Change Note: new API
| HTTP Status | Error Code | Description |
|---|---|---|
| 403 | not_auth | User is not authenticated |
| 409 | hascart | Logout denied: an unsaved cart exists. Resend with confirmed=true to discard it. |
Result of a logout/unregister action
| # | Field | Type | Description |
|---|---|---|---|
| 0 | action | string | the action that was performed |
| 1 | result | string | logout_ok = session ended; unregistered = customer unregistered and session ended. (A denied logout due to an unsaved cart returns HTTP 409 hascart instead.) |
Data (1 record)
| action | result |
|---|---|
| Logout | logout_ok |