--- title: cartDeliveryAddressesRemove - Storefront API description: Removes delivery addresses from the cart. api_version: 2026-01 api_name: storefront type: mutation api_type: graphql source_url: html: >- https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesRemove md: >- https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesRemove.md --- # cart​Delivery​Addresses​Remove mutation Removes delivery addresses from the cart. ## Arguments * addressIds * cartId *** ## Cart​Delivery​Addresses​Remove​Payload returns * cart * userErrors * warnings *** ## Examples * ### Removes a delivery address from a cart #### Description Removes a delivery address from a cart #### Query ```graphql mutation CartDeliveryAddressesRemove($id: ID!, $addressIds: [ID!]!) { cartDeliveryAddressesRemove(cartId: $id, addressIds: $addressIds) { userErrors { message code field } warnings { message code target } cart { id delivery { addresses { id selected oneTimeUse address { ... on CartDeliveryAddress { firstName lastName } } } } } } } ``` #### Variables ```json { "id": "gid://shopify/Cart/c1-8f1f41212a211bb1502fd5e27fa5b413?key=f0c5f2509893edbafaab3de9c160b9a8", "addressIds": [ "gid://shopify/CartSelectableAddress/delivery-address-1" ] } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \ -d '{ "query": "mutation CartDeliveryAddressesRemove($id: ID!, $addressIds: [ID!]!) { cartDeliveryAddressesRemove(cartId: $id, addressIds: $addressIds) { userErrors { message code field } warnings { message code target } cart { id delivery { addresses { id selected oneTimeUse address { ... on CartDeliveryAddress { firstName lastName } } } } } } }", "variables": { "id": "gid://shopify/Cart/c1-8f1f41212a211bb1502fd5e27fa5b413?key=f0c5f2509893edbafaab3de9c160b9a8", "addressIds": [ "gid://shopify/CartSelectableAddress/delivery-address-1" ] } }' ``` #### React Router ```javascript import { unauthenticated } from "../shopify.server"; export const loader = async () => { const { storefront } = await unauthenticated.storefront( 'your-development-store.myshopify.com' ); const response = await storefront.graphql( `#graphql mutation CartDeliveryAddressesRemove($id: ID!, $addressIds: [ID!]!) { cartDeliveryAddressesRemove(cartId: $id, addressIds: $addressIds) { userErrors { message code field } warnings { message code target } cart { id delivery { addresses { id selected oneTimeUse address { ... on CartDeliveryAddress { firstName lastName } } } } } } }`, { variables: { "id": "gid://shopify/Cart/c1-8f1f41212a211bb1502fd5e27fa5b413?key=f0c5f2509893edbafaab3de9c160b9a8", "addressIds": [ "gid://shopify/CartSelectableAddress/delivery-address-1" ] }, }, ); const json = await response.json(); return json.data; } ``` #### Node.js ```javascript const client = new shopify.clients.Storefront({ domain: 'your-development-store.myshopify.com', storefrontAccessToken, }); const data = await client.query({ data: { "query": `mutation CartDeliveryAddressesRemove($id: ID!, $addressIds: [ID!]!) { cartDeliveryAddressesRemove(cartId: $id, addressIds: $addressIds) { userErrors { message code field } warnings { message code target } cart { id delivery { addresses { id selected oneTimeUse address { ... on CartDeliveryAddress { firstName lastName } } } } } } }`, "variables": { "id": "gid://shopify/Cart/c1-8f1f41212a211bb1502fd5e27fa5b413?key=f0c5f2509893edbafaab3de9c160b9a8", "addressIds": [ "gid://shopify/CartSelectableAddress/delivery-address-1" ] }, }, }); ``` #### Response ```json { "cartDeliveryAddressesRemove": { "userErrors": [], "warnings": [], "cart": { "id": "gid://shopify/Cart/c1-8f1f41212a211bb1502fd5e27fa5b413?key=f0c5f2509893edbafaab3de9c160b9a8", "delivery": { "addresses": [] } } } } ``` * ### cartDeliveryAddressesRemove reference