Discussing APIs and development related to customers, discounts, and order management.
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
}
}
"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 )