orderEditSetQuantity 'response 'invilide id"

Dev_Awais_ALi
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
}
Replies 3 (3)
_JB
Shopify Staff
Shopify Staff
836 100 219

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 | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

IsaiahN
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

NorioUmata
Tourist
3 0 4

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!