Anchor to section titled 'undefined'

cartSelectedDeliveryOptionsUpdate
mutation

Update the selected delivery options for a delivery group.


Anchor to cartId
cartId
required

The ID of the cart.

The selected delivery options.

The input must not contain more than 250 values.


Was this section helpful?

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation cartSelectedDeliveryOptionsUpdate($cartId: ID!, $selectedDeliveryOptions: [CartSelectedDeliveryOptionInput!]!) {
  cartSelectedDeliveryOptionsUpdate(cartId: $cartId, selectedDeliveryOptions: $selectedDeliveryOptions) {
    cart {
      # Cart fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "cartId": "gid://shopify/<objectName>/10079785100",
  "selectedDeliveryOptions": [
    {
      "deliveryGroupId": "gid://shopify/<objectName>/10079785100",
      "deliveryOptionHandle": "<your-deliveryOptionHandle>"
    }
  ]
}
input CartSelectedDeliveryOptionInput {
  deliveryGroupId: ID!
  deliveryOptionHandle: String!
}