Cannot query all the available delivery options via subscriptionDraft

query GetSubscriptionContractDeliveryOptions {
      subscriptionDraft(id: "gid://shopify/SubscriptionDraft/123456789") {
        id
        deliveryOptions {
          ... on SubscriptionDeliveryOptionResultSuccess {
            deliveryOptions {
              ... on SubscriptionShippingOption {
                title
                presentmentTitle
                description
                code
                price {
                  amount
                  currencyCode
                }
              }
              # ... on SubscriptionPickupOption {
              #   title
              #   description
              #   code
              #   price {
              #     amount
              #     currencyCode
              #   }
              # }
              # ... on SubscriptionLocalDeliveryOption {
              #   title
              #   description
              #   code
              #   price {
              #     amount
              #     currencyCode
              #   }
              # }
            }
          }
          ... on SubscriptionDeliveryOptionResultFailure {
            message
          }
        }
      }
    }

The response looks like this:

{
  subscriptionDraft: {
    id: 'gid://shopify/SubscriptionDraft/123456789',
    deliveryOptions: {
      deliveryOptions: [
        {
          title: 'two dollars',
          presentmentTitle: 'two dollars',
          description: null,
          code: 'two dollars',
          price: { amount: '2.0', currencyCode: 'USD' }
        }
      ]
    }
  }
}

It should return all the available options but it just displays 1 instead. I tried to add another shipping rate, it shows the new one instead of both. Does anyone know how to fix this?

Hi @kimdonginsu01

Subscription contracts (and their drafts) are designed to have a single delivery option per delivery policy at any given time. When you update or add a shipping rate, you are effectively replacing the previous delivery option, not adding to a list of options. The deliveryOptions field reflects the current state of the draft, not a history or a list of all possible rates.

This is different from the checkout/cart APIs, where multiple delivery options can be presented to the customer for selection. For subscriptions, the delivery option is part of the contract and is not meant to be selected by the customer at each renewal; it’s set during contract creation or update.

Thanks @Liam-Shopify for clarification :smiley:
I think the document might cause a bit misunderstanding here

Currently I’m building a feature that help merchants change one contract’s delivery option. Is there any other way I can retrieve all the available options if this method doesn’t help?

Thanks