Add shipping cost in draft order API

Add shipping cost in draft order API

Annadurai
Visitor
1 0 1

 

Last few days We are creating draft order manuallly through the following api,

 

 

[POST] /admin/api/2022-07/draft_orders.json

 

 

In the above api , we can add shipping cost in the order.

 

 

Now we could not add shopping cost in the draft order.

 

 

Payload

{

   "shipping_line" : {

      "custom" : "true",

      "title" : "Shipping Cost",

      "price":200

   }

}

Reply 1 (1)

wisn_shaftler
Shopify Partner
9 0 0

"shipping_line": { "title": "standard shipping by wisn", "price": 20, "handle": null }

 

if you try that like this, it will work perfectly. see this documentation also https://shopify.dev/docs/api/admin-rest/2024-04/resources/draftorder#post-draft-orders (make sure to click on show hidden blah blah )

WISNSHAFTLER
want to connect? send me DM or mail me, wisnshaftler@gmail.com