I am trying to use the newly stable draftOrderAvailableDeliveryOptions graphql api call.
Here is my query:
query GetAvailableDeliveryOptions(
$input: DraftOrderAvailableDeliveryOptionsInput!
) {
draftOrderAvailableDeliveryOptions(input: $input) {
availableShippingRates {
handle
title
code
}
availableLocalDeliveryRates {
handle
title
code
source
price {
amount
currencyCode
}
}
availableLocalPickupOptions {
handle
title
code
locationId
source
}
}
}
I am able to successfully retrieve local pickup options via this call. However, I am struggling to apply the local pickup rate to the draftorder via the draftOrderCreate mutation.
When I supply the handle and title to the shippingLine field, it doesn’t go through. When I include a price field, I get an error back “A destination address is required in order to continue.”
When applying a local pickup option through the admin ui in Shopify, the request looks like this:
...
"shippingLine":
{
"price": "0",
"title": "630 Shannonville Rd",
"shippingRateHandle": "2e6d17352d193a561152fd91eac544c4",
"code": "630 Shannonville Rd",
"source": "shopify",
"deliveryMethodType": "PICK_UP",
"locationId": "gid://shopify/Location/73026928928"
}
...
I can’t find any further documentation surrounding how to apply this to draft orders via the graphql mutations. The structure of the shipping line input is just this:
Thanks in advance!