Shopify POST draft order not respecting passed shipping_line

Shopify POST draft order not respecting passed shipping_line

bluepnume
Shopify Partner
9 0 4

Hi,

We're calling shopify's draft order api using a custom app and passing a shipping line:

shopify api request POST https://REDACTED.myshopify.com/admin/api/2023-07/draft_orders.json {
  "content-type": "application/json",
  "accept": "application/json",
  "x-shopify-access-token": "REDACTED"
} {
  "draft_order": {
    "currency": "USD",
    "line_items": [
      {
        "variant_id": "REDACTED",
        "quantity": 1
      }
    ],
    "shipping_line": {
      "handle": "REDACTED",
      "title": "Standard Shipping (8-13 Days)",
      "price": "5.96",
      "custom": false
    },
    "shipping_address": {
      "first_name": "REDACTED",
      "last_name": "REDACTED",
      "address1": "REDACTED",
      "city": "San Jose",
      "province_code": "CA",
      "province": "CA",
      "country": "US",
      "zip": "95118",
      "country_code": "US"
    }
  }
}

But when we get a response, the shipping line is null:

"shipping_line": null,

We are still able to go to the shopify draft order dashboard and manually add a shipping line. But the draft order admin api just always returns null.

This started yesterday. The only clue we have so far is that the store owner enabled a new "UPS Next Day Air" shipping option which falls under "Carrier and app rates", and for which he had to enable some kind of shopify shipping app?

 

This is causing a serious problem for us so any help would be appreciated. Thanks! 

Replies 5 (5)

bluepnume
Shopify Partner
9 0 4

We temporarily removed the new shipping option and everything started working again. So is there a known issue with draft orders and "Carrier and app rates"?

jc-wagster
Shopify Partner
3 0 2

We are experiencing the exact same problem.

 

With "Carrier and app rates" enabled, both creating and updating a draft order via the Admin REST API will completely ignore the provided "shipping_line" attribute, unless it's set to "custom":true

 

We can also confirm that disabling "Carrier and app rates" makes the Admin REST API handle "shipping_line" as expected again, but this is not a feasible solution.

bluepnume
Shopify Partner
9 0 4

Aha! Any luck with support tickets? We've gotten nothing back yet despite seeing the same issue on a bunch of different stores.

Also, do you have any idea when this started? We noticed it when a store using our app added a carrier rate, but we're not sure when the actually issue on the shopify side started.

OlegArtisan
Visitor
2 0 0

Same issue here.

I can confirm that it worked correctly in the end of October as we just did extensive testing and launch of this feature.

 

Everything was working on 20th of October and it stopped work after 8.11. We haven't had any orders in between, so I am not sure exact date, but it is in between them. 

nikhilyayloh
Shopify Partner
4 0 0

This is a big problem for us as well. Why is Shopify not responding to this?