When removing a shipping line from an order through the Shopify admin UI, both the GraphQL and the REST admin API do not reflect the change correctly. Here are the reproduction steps:
- Through the admin UI, create a new order and add a custom shipping option by clicking the “Add shipping or delivery” link. For example, add a shipping option named “Delivery” with a price of $20.00:
- After the order is created, click “Edit” on the order and then “Edit shipping”. Remove the previously added shipping item:
Save the change by clicking the “Update order” button. Observe that the shipping item was successfully removed from the order.
- Query the order through the GraphQL API:
query {
order(id: "gid://shopify/Order/
Replace **<order_id>** with the ID of the order created in step 1.
4. Observe the GraphQL response:
```javascript
{
"data": {
"order": {
"totalShippingPriceSet": {
"shopMoney": {
"amount": "20.0"
}
},
"shippingLines": {
"nodes": []
}
}
}
}
Note that the shippingLines field was updated correctly, but the totalShippingPriceSet field still contains an amount of $20.00, which is not correct.
- Let’s now query the order through the REST API:
curl -X GET "https://<store_id>.myshopify.com/admin/api/2024-01/orders/<order_id>.json?status=any" -H "X-Shopify-Access-Token: <access_token>"
Replace <store_id>, <order_id>, and <access_token> with their values.
- Observe the REST response:
{
"order": {
// ...
"total_shipping_price_set": {
"shop_money": {
"amount": "20.00",
"currency_code": "CAD"
},
"presentment_money": {
"amount": "20.00",
"currency_code": "CAD"
}
},
// ...
"shipping_lines": [
{
// ...
"discounted_price": "20.00",
"discounted_price_set": {
"shop_money": {
"amount": "20.00",
"currency_code": "CAD"
},
"presentment_money": {
"amount": "20.00",
"currency_code": "CAD"
}
},
"phone": null,
"price": "20.00",
"price_set": {
"shop_money": {
"amount": "20.00",
"currency_code": "CAD"
},
"presentment_money": {
"amount": "20.00",
"currency_code": "CAD"
}
},
// ...
}
]
}
}
Note that both the total_shipping_price_set and the shipping_lines field still contain the shipping amount that was removed in step 2.
I hope this bug report attracts the eyes of someone at Shopify. Let me know if you need any other information.


