FROM CACHE - en_header

GraphQL Access Denied - orderEditBegin

Solved
schnepple
Tourist
3 0 2

Platform: Shopify Plus

 

I have granted my private app read & write access to every scope available in the API permissions section including write_order_edits. Screenshot https://d.pr/i/WtCQ09

 

The private app is also set to 2020-01 (Latest) webhooks API version in case that matters. 

 

Below is the mutation I am posting to admin/api/2020-01/graphql.json as well as the access denied response received. 

 

Request:

 

mutation { orderEditBegin(id: "gid://shopify/Order/1955740057670") {
                calculatedOrder {
                  id
                }
                userErrors {
                  field
                  message
                }
              }
          }

 

Response:

 

{"data":{"orderEditBegin":{"calculatedOrder":null,"userErrors":[{"field":null,"message":"Access
Denied."}]}},"extensions":{"cost":{"requestedQueryCost":10,"actualQueryCost":10,"throttleStatus":{"maximumAvailable":2000,"currentlyAvailable":1990,"restoreRate":100}}}}
Is there something I am missing here? Why am I getting access denied when all the appropriate permissions are set on the private app? 
 
Thanks!
Accepted Solution (1)

Accepted Solutions
vix
Shopify Staff
Shopify Staff
537 103 115

This is an accepted solution.

Hi @puda_cb @schnepple 

 

With Shopify Plus, order editing is not quite rolled out yet! Here is where this is stated: https://help.shopify.com/en/manual/orders/edit-orders

 

You can contact your MSM to have this enabled on a development store for testing in the meantime. 

 

Vix | Developer 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

View solution in original post

Replies 16 (16)
puda_cb
Tourist
7 0 0

Same issue here..

 

Any updates on this?

puda_cb
Tourist
7 0 0

I don't think the Shopify API team actually committed these changes..

vix
Shopify Staff
Shopify Staff
537 103 115

This is an accepted solution.

Hi @puda_cb @schnepple 

 

With Shopify Plus, order editing is not quite rolled out yet! Here is where this is stated: https://help.shopify.com/en/manual/orders/edit-orders

 

You can contact your MSM to have this enabled on a development store for testing in the meantime. 

 

Vix | Developer 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

puda_cb
Tourist
7 0 0

So having Shopify Plus is actually a disadvantage at the moment? I'll see what my MSM says.

schnepple
Tourist
3 0 2

Thanks @vix - I discovered the section disclaiming that shortly after. I appreciate the response and am looking forward to order editing being live on Shopify Plus. I'm all ready to test as soon as it is! 

 

Best of luck @puda_cb !

BoxUp
Shopify Partner
38 1 15

Hey @vix 

We're having the issue with a Shopify plus app user. It's not on every order, only on a few. OrderEditBegin, on these occasions, returns null:

{"extensions":{"cost":{"actualQueryCost":10,"throttleStatus":{"maximumAvailable":2000,"restoreRate":100,"currentlyAvailable":1990},"requestedQueryCost":17}},"data":{"orderEditBegin":{"calculatedOrder":null}}}

An order only a few hours before (and many others) work absolutely fine. The edit we're making is also the same. Removing the same product from the order and adding another.

Please could you investigate? Happy to provide exact order IDs and the store privately.

vix
Shopify Staff
Shopify Staff
537 103 115

Can you post the request ID?

 
 

Vix | Developer 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

BoxUp
Shopify Partner
38 1 15

Ah, not something we have available any more. Can I send over anything else?

vix
Shopify Staff
Shopify Staff
537 103 115

I'd go over the standard troubleshooting: 

  • Does the call you are making succeed outside of bulk ops
  • Are you utilizing the same API key that started it to access the data
  • Is there a concern of a timeout
  • etc. 

There are lots of other ideas on the forum board. If you can't get that to work, note the next time this happens and get the request-id and we can check into the logs! 

 
 

Vix | Developer 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

BoxUp
Shopify Partner
38 1 15

Thanks, @vix 

I have to pass this on, so please could you let me know where they'll find the request ID you'll need? Is it passed back in a header or something?

Will_Perspectiv
Tourist
4 0 1

Is this still and issue?

I ran the graphQL on a development store (not shopify-plus) and had no problems.

After deploying to production (shopify plus) - I'm getting the calculatedOrder returning null ?

Note: the order was generated through reCharge.

@vix 

 

"data" => array:1 [
    "orderEditBegin" => array:1 [
      "calculatedOrder" => null
    ]
  ]
  "extensions" => array:1 [
    "cost" => array:3 [
      "requestedQueryCost" => 162
      "actualQueryCost" => 10
      "throttleStatus" => array:3 [
        "maximumAvailable" => 2000.0
        "currentlyAvailable" => 1990
        "restoreRate" => 100.0
      ]
    ]
  ]

 

 

BoxUp
Shopify Partner
38 1 15

Hi @Will_Perspectiv 

Is the order a local delivery/pick up? Shopify have let me know that these aren't editable but didn't really give a reason just yet. It sounds like it's a bug but no timeline for a fix.

Thanks.

Will_Perspectiv
Tourist
4 0 1

@BoxUp 

Order is standard delivery.

I read elsewhere other people haven’t been able to edit orders that have been imported from 3rd part applications.

Very frustrating!!

Andrew-W
Shopify Partner
24 3 11

@Will_Perspectiv - I'm getting the same issue today. Did you find anything else about this?

 

I'm having it happen on a Plus store with a standard delivery option placed through the Online Store channel. The order was placed two days ago.

 

The same code runs fine on a development store with a similar order (Bogus Gateway payment tho).

 

@vix - I have a request ID I believe that I can send you if's possible to investigate further.

Will_Perspectiv
Tourist
4 0 1

Due to the order being imported via a 3rd party application (in this case it was ReCharge), I wasn't able to edit the order. 

 

The solution we had to use was to delete the order and recreate the order with the updated information we needed. 

 

I don't like this method but it was the only option. 

Andrew-W
Shopify Partner
24 3 11

@Will_Perspectiv - Thanks for the quick reply! Ah I see. My order wasn't created by a 3rd party app so it must be something else. 🤔