I’m trying to create an order with a specific (not custom) shipping line with the API. I’ve tried Rest and Graphql, but it always leads to the same result: Shopify ignores my handle and takes the cheapest delivery line available.
For example, in Graphql :
mutation draftOrderCreate($input: DraftOrderInput!) {
draftOrderCreate(input: $input) {
draftOrder {
id
name
shippingLine {
carrierIdentifier
code
custom
title
}
}
userErrors {
field
message
}
}
}
{
"input": {
"customerId": "gid://shopify/Customer/5997301825615",
"lineItems": [
{
"variantId": "gid://shopify/ProductVariant/40540689924175",
"quantity": 2
}
],
"shippingAddress": {
"firstName": "John",
"lastName": "(#66753) Smith",
"address1": "149 rue des potiers",
"address2": "",
"city": "Villers-les-nancy",
"zip": "54600",
"countryCode": "FR",
"country": "France",
"phone": "+33606401020"
},
"shippingLine": {
"shippingRateHandle": "shopify-shipping-test-3.00"
}
}
}
however, I managed to create an order with shopify-shipping-test-3.00 in the interface a few minutes before the test.
Do you have any ideas ?