Graph API - orderEditBegin Mutation

Highlighted
Tourist
5 1 0

Hello,

 

We have been trying to follow the steps listed out here in Shopify to edit an existing order with the Admin API .

 

The first step is to use the beginOrderMutation to create a calculatedOrderID. However some some of the orders in our store return the message: userErrors":[{"field":null,"message":"The order cannot be edited."}]

 

What could be causing this and how do we fix it? The error message doesn't provide much more information. I don't believe it's a permissions issue as we have other orders that do return a calculatedOrderIs.

 

Successful beingOrderMutation order IDs:

  • 3050030432447
  • 3050031087807
  • 3052819054783
  • 3049468002495
  • 3049467445439

Order IDs with error:

  • 3050026565823
  • 3049403383999
  • 3048823914687
  • 3026699911359
  • 3026698436799

 

0 Likes
Highlighted
Tourist
5 1 0

Chased this around some more...Shopify support team, at least their online chat, was not able to help in any way other than suggest I should hire a Shopify expert.

The private app that is used to hit the beginOrderMutation url does have write_order_edit permissions and the order is also less than 60 days old.

What confuses me is that it works for the majority of the orders in the store, then will fail on others. 

Does anyone know a way to get a more detailed error message out of the beginOrderMutation response? 

0 Likes
Highlighted
Tourist
5 1 0

Diving a bit deeper, I tried the following query.

 

query{
  orders(first:10, query:253739"){
    edges{
      node{
        name
        email
        merchantEditable
        merchantEditableErrors
        
      }
    }
  }
}

 

 
merchantEditableError came back with: 

"Orders with an invalid shipping address can’t be edited."
 
That error would probably explain why I can't edit specific orders. 
 
I saw in another post you ran into issues with Ireland but not US/UK. Perhaps this is why?
 
 
 
0 Likes