orderEditSetQuantity 'response 'invilide id"

New Member
3 0 0

Hi , I am Awais and i am making order management app in with i have module of order editing i use "orderEditSetQuantity" mutation i have passed 4 parameters 1. calculatedOrderId 2. lineItemId (that's change quantity ) 3. quantity and 4. restock but i will get error of"Invilide id" can you please tell me the solution  thanks 

mutation orderEditSetQuantity($id: ID!, $lineItemId: ID!, $quantity: Int!) {
  orderEditSetQuantity(id: $id, lineItemId: $lineItemId, quantity: $quantity) {
    calculatedLineItem {
      id
    }
    calculatedOrder {
      id
    }
    userErrors {
      field
      message
    }
  }
}

{
	"id": "gid://shopify/CalculatedOrder/3371335829",
	"lineItemId": "gid://shopify/LineItem/5722631897237",
	"quantity": 1,
        "restock": true
}
0 Likes
Shopify Staff
Shopify Staff
705 81 151

Hey @Dev_Awais_ALi,

Double check that the id you're using is for the correct store, that error normally just means the id doesn't exist.

If you're still having trouble with it, please provide the X-Request-ID value from the response headers of the call, and we can use that to investigate further.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
New Member
1 0 0

@_JB Hello There, I am also having this issue with my GraphQL Requests for orderEditSetQuantity on the 2020-10 API:

 

x-request-id: 75a18a69-e583-40ef-96c6-d4f12e3333c3

0 Likes
Tourist
3 0 0

Hi all!

I saw you are using wrong line item id.

You need to use calculated line item id for example gid://shopify/CalculatedLineItem/6390811525278

Hope this helps!

0 Likes