{"title":"Accounts Addresses Controller - Liquid Controller Reference","slug":"accounts-addresses-controller-reference","url":"https://support.storeconnect.com/articles/accounts-addresses-controller-reference","url_markdown":"https://support.storeconnect.com/articles/accounts-addresses-controller-reference.md","subtitle":null,"summary":"Hook the customer address book actions (list, add, edit, delete) with Liquid controller templates at controllers/accounts/addresses/. Use it to add checks or redirects around address book changes.","type":"Developer_Documentation","video_url":"","keywords":"liquid, controllers, accounts addresses, address book, storefront, storeconnect","last_modified":"2026-11-25T21:09:53+0000","body_markdown":"## Description\n\nThe Accounts Addresses controller serves the signed-in customer's [address book](customer-address-book). A customer must be signed in. Each customer sees only their own entries.\n\n| Property | Value |\n|----------|-------|\n| **Controller** | `Accounts::AddressesController` |\n| **Liquid Template Path** | `controllers/accounts/addresses/` |\n| **Namespace** | Accounts |\n\n## Actions\n\n| Action | HTTP Method | Route | Result |\n|--------|-------------|-------|--------|\n| `index` | GET | `/account/addresses` | Renders the `account` page |\n| `new` | GET | `/account/addresses/new` | Renders the `account` page |\n| `create` | POST | `/account/addresses` | Redirects to `/account/addresses`, or back to the form with errors |\n| `edit` | GET | `/account/addresses/:id/edit` | Renders the `account` page |\n| `update` | PATCH, PUT | `/account/addresses/:id` | Redirects to `/account/addresses`, or back to the form with errors |\n| `destroy` | DELETE | `/account/addresses/:id` | Redirects to `/account/addresses` |\n\nOn the pages it renders, `current_request.params.section` is `addresses`. On `edit`, `current_request.params.identifier` is the id of the entry being edited. Use these in the `account` page template to show the address book section.\n\nThe `create` and `update` actions accept `is_default_shipping` and `is_default_billing`. A true value makes the entry that default. Deleting a default entry moves the default to another entry.\n\n## Example\n\nCreate a theme template with the key `controllers/accounts/addresses/destroy` to keep a customer from deleting their last address:\n\n\n```liquid\n\n{% before %}\n  {% if current_customer.addresses.size \u003c= 1 %}\n    {% redirect to: current_store.addresses_path, alert: \"Keep at least one address in your address book.\" %}\n  {% endif %}\n{% endbefore %}\n```\n\n\nSee [how Liquid controllers work](liquid-controllers-guide) for the phases and the tags you can use in them."}