Unable to edit Draft Order lines with put Operation

nidhivyas
New Member
2 0 0

Hi Team,

I'm facing unusual issue while updating Draft Order. I'm unable to edit draft order line items using rest api.

I'm sending following request body :
{ "id": 848600203309, "draft_order" : { "customer": { "id": 3882414604333 }, "total_price" : "1120.00", "applied_discount" : null, "phone" : "", "email" : "vyasnidhi0115@gmail.com", "note" : "nv test", "tags" : "Wholesale,Portal Order", "shipping_line" : { "title" : "Standard Shipping", "custom": false, "handle": "Advanced Shipping Rules-by-weight-0.00", "price" : "0.00"}, "shipping_address": { "first_name" : null , "company" : "[TEST] New Business Manager" , "phone" : "+12678138190" , "address1" : "25 Sage Street" , "province" : "Texas" , "zip" : "76901" , "last_name" : "[TEST] Thee Only Business Manager" , "country" : "United States" , "city" : "San Angelo" }, "billing_address": { "first_name" : null , "company" : "[TEST] New Business Manager" , "address1" : "25 Sage Street" , "province" : "Texas" , "zip" : "76901" , "last_name" : "[TEST] Thee Only Business Manager" , "country" : "United States" , "city" : "San Angelo" } , "line_items" : [ {"id": 57157079302189, "product_id": 5225971974189, "variant_id": 34923333419053, "title": "THE PEAK EMPIRE GLASS 4 - Avocado 4", "quantity": 1, "price": "365.00", "properties": [ { "name": "quote_line_id", "value": "a0u0v000000s03lAAA" } ] , "applied_discount": null }, {"id": 57157079334957, "product_id": 5225971974189, "variant_id": 34923333451821, "title": "THE PEAK EMPIRE GLASS 4 - Sriracha 5", "quantity": 1, "price": "365.00", "properties": [ { "name": "quote_line_id", "value": "a0u0v000000s03mAAA" } ] , "applied_discount": null }, {"id": 57157079367725, "product_id": 5236337573933, "variant_id": 34940649242669, "title": "The Peak Travel Glass (6-Pack) Royal Blue Wholesale - IP", "quantity": 3, "price": "390.00", "properties": [ { "name": "quote_line_id", "value": "a0u0v000000s03nAAA" } ] , "applied_discount": null }, {"id": null, "product_id": 6563490857005, "variant_id": 39344843980845, "title": "SHIPPING & HANDLING (PER CARTON)", "quantity": 1, "price": "18.00", "properties": [ { "name": "quote_line_id", "value": "a0u0v000000s03qAAA" } ] , "applied_discount": null } ] } }

I'm getting this response :
{
"draft_order": {
"currency": "USD",
"email": "vyasnidhi0115@gmail.com",
"note": "nv test",
"tax_exempt": true,
"taxes_included": true,
"id": 848600203309,
"invoice_sent_at": null,
"created_at": "2021-06-14T13:47:53-04:00",
"updated_at": "2021-06-14T14:01:03-04:00",
"completed_at": null,
"name": "#D377",
"status": "open",
"line_items": [
{
"id": null,
"variant_id": 34923333419053,
"product_id": 5225971974189,
"title": "THE PEAK EMPIRE GLASS 4",
"variant_title": "Avocado 4",
"sku": "10851788007473",
"vendor": "Puffco Sandbox",
"quantity": 1,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 1211,
"tax_lines": [],
"applied_discount": null,
"name": "THE PEAK EMPIRE GLASS 4 - Avocado 4",
"properties": [
{
"name": "quote_line_id",
"value": "a0u0v000000s03lAAA"
}
],
"custom": false,
"price": "365.00"
},
{
"id": null,
"variant_id": 34923333451821,
"product_id": 5225971974189,
"title": "THE PEAK EMPIRE GLASS 4",
"variant_title": "Sriracha 5",
"sku": "10851788007474",
"vendor": "Puffco Sandbox",
"quantity": 1,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 1211,
"tax_lines": [],
"applied_discount": null,
"name": "THE PEAK EMPIRE GLASS 4 - Sriracha 5",
"properties": [
{
"name": "quote_line_id",
"value": "a0u0v000000s03mAAA"
}
],
"custom": false,
"price": "365.00"
},
{
"id": null,
"variant_id": 34940649242669,
"product_id": 5236337573933,
"title": "The Peak Travel Glass (6-Pack) Royal Blue Wholesale - IP",
"variant_title": null,
"sku": "810028440845",
"vendor": "Puffco Sandbox",
"quantity": 3,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 1634,
"tax_lines": [],
"applied_discount": null,
"name": "The Peak Travel Glass (6-Pack) Royal Blue Wholesale - IP",
"properties": [
{
"name": "quote_line_id",
"value": "a0u0v000000s03nAAA"
}
],
"custom": false,
"price": "390.00"
},
{
"id": null,
"variant_id": 39344843980845,
"product_id": 6563490857005,
"title": "SHIPPING & HANDLING (PER CARTON)",
"variant_title": null,
"sku": "S&H - CARTON",
"vendor": "Puffco Sandbox",
"quantity": 1,
"requires_shipping": false,
"taxable": false,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 0,
"tax_lines": [],
"applied_discount": null,
"name": "SHIPPING & HANDLING (PER CARTON)",
"properties": [
{
"name": "quote_line_id",
"value": "a0u0v000000s03qAAA"
}
],
"custom": false,
"price": "18.00"
}
],
"shipping_address": {
"latitude": null,
"longitude": null,
"first_name": null,
"last_name": "[TEST] Thee Only Business Manager",
"company": "[TEST] New Business Manager",
"address1": "25 Sage Street",
"city": "San Angelo",
"province": "Texas",
"zip": "76901",
"country": "United States",
"phone": "+12678138190",
"address2": "",
"name": "[TEST] Thee Only Business Manager",
"country_code": "US",
"province_code": "TX"
},
"billing_address": {
"first_name": null,
"address1": "25 Sage Street",
"phone": null,
"city": "San Angelo",
"zip": "76901",
"province": "Texas",
"country": "United States",
"last_name": "[TEST] Thee Only Business Manager",
"address2": null,
"company": "[TEST] New Business Manager",
"latitude": null,
"longitude": null,
"name": "[TEST] Thee Only Business Manager",
"country_code": "US",
"province_code": "TX"
},
"invoice_url": "https://puffco-sandbox.myshopify.com/30742052909/invoices/6b29b59711729b06b4b227c7fc4506f0",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [],
"tags": "Portal Order, Wholesale",
"note_attributes": [],
"total_price": "1918.00",
"subtotal_price": "1918.00",
"total_tax": "0.00",
"admin_graphql_api_id": "gid://shopify/DraftOrder/848600203309",
"customer": {
"id": 3882414604333,
"email": "vyasnidhi0115@gmail.com",
"accepts_marketing": false,
"created_at": "2020-12-17T11:15:37-05:00",
"updated_at": "2021-06-13T11:40:10-04:00",
"first_name": "",
"last_name": "[TEST] New Business Manager",
"orders_count": 1,
"state": "disabled",
"total_spent": "0.00",
"last_order_id": 2933907030061,
"note": "Wow this Account really is great.",
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": true,
"phone": "+12678138190",
"tags": "Wholesale",
"last_order_name": "#1073",
"currency": "USD",
"accepts_marketing_updated_at": "2021-06-13T11:35:49-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/3882414604333",
"default_address": {
"id": 4486545276973,
"customer_id": 3882414604333,
"first_name": "",
"last_name": "[TEST] Thee Only Business Manager",
"company": "[TEST] Excellent Organization",
"address1": "25 Sage Street",
"address2": "",
"city": "San Angelo",
"province": "Texas",
"country": "United States",
"zip": "76901",
"phone": "",
"name": "[TEST] Thee Only Business Manager",
"province_code": "TX",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
}
}

0 Likes
nidhivyas
New Member
2 0 0

Hi,

 

Can anybody help me? I'm not able to update Draft Order Lines using put operation.

 

Thanks

 

0 Likes
GrahamS
Shopify Staff
Shopify Staff
92 17 17

Hello,

Can I ask for you to provide me with the x-request-id from the most recent unsuccessful API call? I'll take a closer look at this for you.

Graham S | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes