Questions, troubleshooting, and feedback on Subscription APIs
Hello there,
We are following https://shopify.dev/apps/subscriptions/shipping-delivery#request-a-new-shipping-rate-for-a-subscript... this as a reference to get new shipping rate when customer changes their shipping address.
We have followed the exact things mentioned in the document, but we always failed to get new shipping rates, It always returns null or some internal server error from Shopify.
Here is the query we are using
{
subscriptionDraft(id: "gid://shopify/SubscriptionDraft/3492610236") {
shippingOptions(
deliveryAddress: {
address1: "5922 Ladd Road"
address2: ""
countryCode:US
provinceCode:"MD"
city: "Suitland"
country: "United States"
zip: "20746"
province: "Maryland"
}
) {
__typename
... on SubscriptionShippingOptionResultSuccess {
shippingOptions {
title
price {
amount
currencyCode
}
}
}
... on SubscriptionShippingOptionResultFailure {
message
}
}
}
}
And here is the response we get all the times
[ { message:
'Internal error. Looks like something went wrong on our end.\nRequest ID: 2e68a134-e7e6-4cca-b226-7ebbbeb6b9cd (include this in support requests).',
extensions:
{ code: 'INTERNAL_SERVER_ERROR',
requestId: '2e68a134-e7e6-4cca-b226-7ebbbeb6b9cd' } } ]
Or we get
{ subscriptionDraft: { shippingOptions: null } }
We have already seen that some other apps related to subscriptions are providing this feature, how do they achieve that.
So my question is how we can get the new shipping rate to update shipping address properly when some customer changes their shipping address.
Is there any other way to do that or is something wrong that I am trying?
Solved! Go to the solution
This is an accepted solution.
Hello makasanas,
It seems your app is missing a scope, either `read_shipping` or `write_shipping`.
You can find the list of scopes required for this functionality here: https://shopify.dev/apps/subscriptions/shipping-delivery#scopes
Thanks!
This is an accepted solution.
Hello makasanas,
It seems your app is missing a scope, either `read_shipping` or `write_shipping`.
You can find the list of scopes required for this functionality here: https://shopify.dev/apps/subscriptions/shipping-delivery#scopes
Thanks!
User | RANK |
---|---|
3 | |
3 | |
1 | |
1 | |
1 |
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023