GraphQL API doesn't return any delivery options

Hello,

Sometimes, we have issues with getting available delivery options for subscription drafts - there is a successful response, but the deliveryOptions array is empty. For example:

Subscription Contract ID: gid://shopify/SubscriptionContract/10152509491

Subscription Draft ID: gid://shopify/SubscriptionDraft/207372910643

Query (PII is redacted):

curl --location 'https://<redacted>.myshopify.com/admin/api/2024-04/graphql.json' \
--header 'Content-Type: application/json' \
--header 'x-shopify-access-token: <redacted>' \
--data '{"query":"query subscriptionDraft($id: ID!, $address: MailingAddressInput!) {\n    subscriptionDraft(id: $id) {\n        deliveryOptions(deliveryAddress: $address) {\n            __typename\n            ... on SubscriptionDeliveryOptionResultSuccess {\n                deliveryOptions {\n                    __typename\n                }\n            }\n            ... on SubscriptionDeliveryOptionResultFailure {\n                message\n            }\n        }\n    }\n}","variables":{"id":"gid://shopify/SubscriptionDraft/207372910643","address":{"address1":"<redacted>","address2":"<redacted>","phone":"<redacted>","city":"<redacted>","countryCode":"<redacted>","firstName":"<redacted>","lastName":"<redacted>","provinceCode":"<redacted>","zip":"<redacted>"}}}'

returns SubscriptionDeliveryOptionResultSuccess, but the delivery options array is empty:

x-request-id: 93a75154-9a14-46da-84c2-c09364de4352-1727809376
CF-RAY: 8cbeb5bb1c0c5a4c-IAD

{
    "data": {
        "subscriptionDraft": {
            "deliveryOptions": {
                "__typename": "SubscriptionDeliveryOptionResultSuccess",
                "deliveryOptions": []
            }
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 3,
            "actualQueryCost": 3,
            "throttleStatus": {
                "maximumAvailable": 20000.0,
                "currentlyAvailable": 19997,
                "restoreRate": 1000.0
            }
        }
    }
}

The Checkout page is able to get available shipping rates for this item.

  • Is it known why Successful responses don’t have any available delivery options?
  • What is the best way to get delivery options for subscription contract drafts?

I’ve reported a partner support ticket #51248048.